drm/i915: Avoid snooping with userptr where not supported
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 2 Mar 2016 12:10:31 +0000 (12:10 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 2 Mar 2016 13:46:21 +0000 (13:46 +0000)
commitca377809d657ea3ba249e97d073a7373e383ab6a
tree85e5ddd7d1165277645b4925c6cb96d415180dc5
parent32fff610f7cf05260300f6c18700e9e0ac5910fb
drm/i915: Avoid snooping with userptr where not supported

   commit e5756c10d841ddb448293c849392f3d6b809561f
   Author: Imre Deak <imre.deak@intel.com>
   Date:   Fri Aug 14 18:43:30 2015 +0300

       drm/i915/bxt: don't allow cached GEM mappings on A stepping

Added an exception of disallowing snooping for Broxton A
stepping hardware but userptr was still enabling it regardless.

Move the check to HAS_SNOOP now that it is used from multiple
call sites and use it.

v2: Userptr cannot be supported when it cannot be coherent and
    generalize the code better. (Chris Wilson)

v3: Make has_snoop true only when !has_llc. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1456920631-34302-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_userptr.c