[Intel-gfx] [PATCH 15/37] drm/i915: Remove redundant equality check on write_domain

Daniel Vetter daniel at ffwll.ch
Thu Mar 11 00:42:37 CET 2010


Can't we just completely drop this check? There's only the render cache,
after all. Perhaps add a check in the execbuf path to make sure that
userspace can't claim to write into the map cache ..

-Daniel

On Wed, Mar 10, 2010 at 10:45:02PM +0000, Chris Wilson wrote:
> During flush processing, include any object with a matching
> write_domain.
> 
> Also since an object can only exist in a single write_domain, the
> equality check is redundant.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index b6467f3..1dc352b 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1569,8 +1569,7 @@ i915_gem_process_flushing_list(struct drm_device *dev,
>  				 gpu_write_list) {
>  		struct drm_gem_object *obj = obj_priv->obj;
>  
> -		if ((obj->write_domain & flush_domains) ==
> -		    obj->write_domain) {
> +		if (obj->write_domain & flush_domains) {
>  			uint32_t old_write_domain = obj->write_domain;
>  
>  			obj->write_domain = 0;
> -- 
> 1.7.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list