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 11:33:41 +0200 Message-ID: <20140617093341.GI5821@phenom.ffwll.local> References: <1402941095-27879-1-git-send-email-daniel.vetter@ffwll.ch> <1402941095-27879-15-git-send-email-daniel.vetter@ffwll.ch> <20140617070005.GI17744@nuc-i3427.alporthouse.com> <20140617075217.GZ5821@phenom.ffwll.local> <20140617081014.GR17744@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 537F36E462 for ; Tue, 17 Jun 2014 02:33:49 -0700 (PDT) Received: by mail-wg0-f51.google.com with SMTP id x12so6799960wgg.10 for ; Tue, 17 Jun 2014 02:33:48 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617081014.GR17744@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 , Daniel Vetter , Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org On Tue, Jun 17, 2014 at 09:10:14AM +0100, Chris Wilson wrote: > On Tue, Jun 17, 2014 at 09:52:17AM +0200, Daniel Vetter wrote: > > On Tue, Jun 17, 2014 at 08:00:05AM +0100, Chris Wilson wrote: > > > On Mon, Jun 16, 2014 at 07:51:34PM +0200, Daniel Vetter wrote: > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > > > index b8359f4a6dc4..dfdbf2a02844 100644 > > > > --- a/drivers/gpu/drm/i915/intel_display.c > > > > +++ b/drivers/gpu/drm/i915/intel_display.c > > > > @@ -2755,6 +2755,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, > > > > > > > > dev_priv->display.update_primary_plane(crtc, fb, x, y); > > > > > > > > + intel_frontbuffer_flush(dev, INTEL_FRONTBUFFER_PRIMARY(pipe)); > > > > > > Conceptually all of these are just intel_fb_flip_complete. It may be > > > easier in your tracking scheme to have: > > > > > > intel_fb_flip() { intel_fb_flip_prepare(); intel_fb_fip_complete(); } > > > > Yeah, this is just the direct flush for synchronous updates. Implementing > > that as a prepare+complete is imo too confusing - the entire point of > > prepare+complete is to catch an intermediate invalidates and not complete > > the flush and so only really required for async flips. Hence why I prefer > > to only do the full prepare+complete dance where needed. Otherwise there > > is nothing special about flips. > > I just prefer to have the like operations having like names. The key > point here is that we just want to treat the set-plane operations as a > synchronous flip, which is distinct to the invalidate/flush operations on > an active frontbuffer. Well the main thing is the setplane is a flush operation. Flip is also a flush, but an asynchronous one. Maybe s/flip/flush/ instead to make it clear that the special part isn't that it's a flip, but that it's two-stage? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch