Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250603
b: refs/heads/master
c: 9c23f7f
h: refs/heads/master
i:
  250601: 945fd09
  250599: 6d08402
v: v3
  • Loading branch information
Chris Wilson authored and Keith Packard committed May 10, 2011
1 parent c045385 commit 118dfde
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93dfb40cd887c4f39e38f047c4d9ea0b7188a58a
refs/heads/master: 9c23f7fc4cef14b46830b7f9eb0dc1b2d6f55d4d
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2878,6 +2878,17 @@ i915_gem_clflush_object(struct drm_i915_gem_object *obj)
if (obj->pages == NULL)
return;

/* If the GPU is snooping the contents of the CPU cache,
* we do not need to manually clear the CPU cache lines. However,
* the caches are only snooped when the render cache is
* flushed/invalidated. As we always have to emit invalidations
* and flushes when moving into and out of the RENDER domain, correct
* snooping behaviour occurs naturally as the result of our domain
* tracking.
*/
if (obj->cache_level != I915_CACHE_NONE)
return;

trace_i915_gem_object_clflush(obj);

drm_clflush_pages(obj->pages, obj->base.size / PAGE_SIZE);
Expand Down

0 comments on commit 118dfde

Please sign in to comment.