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:17:32 +0200 Message-ID: <20140617090906.GG5821@phenom.ffwll.local> References: <1402941095-27879-1-git-send-email-daniel.vetter@ffwll.ch> <1402941095-27879-15-git-send-email-daniel.vetter@ffwll.ch> <20140617065438.GG17744@nuc-i3427.alporthouse.com> <20140617074500.GX5821@phenom.ffwll.local> <20140617075347.GP17744@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-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id F250B6E4BF for ; Tue, 17 Jun 2014 02:17:44 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id n15so5424086wiw.16 for ; Tue, 17 Jun 2014 02:17:43 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617075347.GP17744@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 08:53:47AM +0100, Chris Wilson wrote: > On Tue, Jun 17, 2014 at 09:45:00AM +0200, Daniel Vetter wrote: > > On Tue, Jun 17, 2014 at 07:54:38AM +0100, Chris Wilson wrote: > > > On Mon, Jun 16, 2014 at 07:51:34PM +0200, Daniel Vetter wrote: > > > > +/** > > > > + * intel_frontbuffer_flush - flush frontbuffer > > > > + * @dev: DRM device > > > > + * @frontbuffer_bits: frontbuffer plane tracking bits > > > > + * > > > > + * This function gets called every time rendering on the given planes has > > > > + * completed and frontbuffer caching can be started again. Flushes will get > > > > + * delayed if they're blocked by some oustanding asynchronous rendering. > > > > + * > > > > + * Can be called without any locks held. > > > > + */ > > > > +void intel_frontbuffer_flush(struct drm_device *dev, > > > > + unsigned frontbuffer_bits) > > > > > > intel_fb_complete. > > > > My naming convetion was: > > - intel_frontbuffer: Deals in raw frontbuffer tracking bits. > > - intel_fb: Takes a gem object, assumes dev->struct_mutex is held. I've > > stolen these from the intel_mark_fb_busy function. > > > > The main functions are flush/invalidate, all the others just add a bit of > > magic (which delays) around them. Imo invalidate is definitely the right > > pick if you look at fbc/psr as fancy caches, not sure about flush. Maybe > > finish given our sw_finish ioctl, but not sure that's better than flush. > > My thinking is: > > > > - invalidate the cache fully (i.e. disable it) > > - flush data into the cache again (i.e. enable it again) > > That's also how I named it, so we agree here. > > I am not fond of intermixing intel_frontbuffer and intel_fb though. > Certainly not having the function definitions intertwined. > > Maybe intel_frontbuffer and intel_frontbuffer_obj? intel_fb_obj would be good for me since frontbuffer is awfully long and leads to ugly code. But I agree that sprinkling obj in would be good, and we have precedence for fb_obj with pin_and_fence. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch