]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Drop the overzealous warning from i915_gem_set_cache_level
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Aug 2013 10:46:17 +0000 (11:46 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 Aug 2013 11:31:46 +0000 (13:31 +0200)
commit7e8be2aa3bf06f795efadf899cac92b4154f2022
tree1a550198a5a8ece87dfa54bc928bda2dd14f2e7e
parent3f571f9abbe13c2f0de8b44274b589232dbf64f9
drm/i915: Drop the overzealous warning from i915_gem_set_cache_level

By our earlier reckoning, move from a snooped/llc setting to an uncached
setting, leaves the CPU cache in a consistent state irrespective of our
domain tracking - so we can forgo the warning about the lack of
invalidation. Similarly for any writes posted to the snooped CPU domain,
we know will be safely clflushed to the uncached PTEs after forcing the
domain change.

This WARN started to pop up with

commit 3a507cc27111001a01dd082c4c4d3a820a63df31
Author:     Chris Wilson <chris@chris-wilson.co.uk>
AuthorDate: Thu Aug 8 14:41:06 2013 +0100

    drm/i915: Allow the GPU to cache stolen memory

Ville brought up a scenario where the interaction of a set_caching
ioctl call from userspace on a scanout buffer (i.e. obj->pin_display
is set) resulted in the code getting confused and not properly
flushing stale cpu cachelines. Luckily we already prevent this by
rejecting caching changes when obj->pin_count is set.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68040
Tested-by: cancan,feng <cancan.feng@intel.com>
[danvet: Add buglink, bisect result and explain why Ville's scenario
is already taken care of.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c