Re: [PATCH v2] drm/i915: Avoid snooping with userptr where not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 02, 2016 at 10:16:34AM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
>    commit e5756c10d841ddb448293c849392f3d6b809561f
>    Author: Imre Deak <imre.deak@xxxxxxxxx>
>    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)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_dma.c         | 3 +++
>  drivers/gpu/drm/i915/i915_drv.h         | 2 ++
>  drivers/gpu/drm/i915/i915_gem.c         | 2 +-
>  drivers/gpu/drm/i915/i915_gem_userptr.c | 7 +++++++
>  4 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 36c0cf131e93..615935e6fa3f 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -853,6 +853,9 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
>  	else if (INTEL_INFO(dev)->gen >= 9)
>  		gen9_sseu_info_init(dev);
>  
> +	/* Snooping is broken on BXT A stepping. */
	info->has_snoop = !info->has_llc;
> +	info->has_snoop &= !IS_BXT_REVID(dev, 0, BXT_REVID_A1);

LLC and FSB-snooping are two very different coherency protocols and I do
believe it is important that we avoid conflating the two.

With that change,
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux