From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 14/15] drm/i915: Track frontbuffer invalidation/flushing Date: Tue, 17 Jun 2014 09:36:31 +0200 Message-ID: <20140617073631.GU5821@phenom.ffwll.local> References: <1402941095-27879-1-git-send-email-daniel.vetter@ffwll.ch> <1402941095-27879-15-git-send-email-daniel.vetter@ffwll.ch> <20140617064930.GD17744@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTP id B45536E454 for ; Tue, 17 Jun 2014 00:36:38 -0700 (PDT) Received: by mail-wi0-f179.google.com with SMTP id cc10so5263961wib.12 for ; Tue, 17 Jun 2014 00:36:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617064930.GD17744@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Daniel Vetter , Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org 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