[Intel-gfx] [PATCH 14/15] drm/i915: Track frontbuffer invalidation/flushing

Daniel Vetter daniel at ffwll.ch
Tue Jun 17 09:36:31 CEST 2014


On Tue, Jun 17, 2014 at 07:49:30AM +0100, Chris Wilson wrote:
> On Mon, Jun 16, 2014 at 07:51:34PM +0200, Daniel Vetter wrote:
> > @@ -3966,6 +3971,8 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
> >  		obj->base.write_domain = I915_GEM_DOMAIN_CPU;
> >  	}
> >  
> /* We do not need to explicitly invalidate the fb when moving to the
>  * CPU domain as it is not coherent with the display. Therefore the user
>  * much flush updates to the scanout through the frontbuffer whilst in
>  * the CPU domain by explicitly flushing it - either by manually moving
>  * to the GTT domain, or by calling sw-finish.
>  */
> > +	intel_fb_invalidate(obj, NULL);
> And so kill this.

The idea of the interface is that you'll always see an invalidate before a
flush for all frontbuffer rendering. If we don't do that we'd need to
filter out all the surplus flushes we generate without an invalidate
beforehand, but imo passing all that down to the consumers is better since
it allows hacks like the hsw sprite psr w/a.

And moving the invalidate next to the flush in sw_finish_ioctl imo doesn't
make sense.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list