[Intel-gfx] [PATCH] drm/i915: Drop the overzealous warning from i915_gem_set_cache_level

Ben Widawsky ben at bwidawsk.net
Mon Aug 12 23:02:09 CEST 2013


On Mon, Aug 12, 2013 at 11:46:17AM +0100, Chris Wilson wrote:
> 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.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>

I ran into this several times while doing the PPGTT development, and was
always scared to just remove it. Does it make sense to keep the
write_domain assertion with this gone?

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 925c77d..1d3e57e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3520,7 +3520,6 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
>  		 * Just set it to the CPU cache for now.
>  		 */
>  		WARN_ON(obj->base.write_domain & ~I915_GEM_DOMAIN_CPU);
> -		WARN_ON(obj->base.read_domains & ~I915_GEM_DOMAIN_CPU);
>  
>  		old_read_domains = obj->base.read_domains;
>  		old_write_domain = obj->base.write_domain;
> -- 
> 1.8.4.rc2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ben Widawsky, Intel Open Source Technology Center



More information about the Intel-gfx mailing list