From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Roper Subject: Re: [RFCv3 03/14] drm: Add primary plane helpers Date: Wed, 19 Mar 2014 11:15:36 -0700 Message-ID: <20140319181536.GC6183@intel.com> References: <1395188579-17191-1-git-send-email-matthew.d.roper@intel.com> <1395188579-17191-4-git-send-email-matthew.d.roper@intel.com> <20140319112843.GR30571@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id C6EB5890D3 for ; Wed, 19 Mar 2014 11:15:25 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140319112843.GR30571@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Mar 19, 2014 at 12:28:43PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:48PM -0700, Matt Roper wrote: ... > > + > > + /* > > + * set_config() adjusts crtc->primary->fb; however the DRM setplane > > + * code that called us expects to handle the framebuffer update and > > + * reference counting; save and restore the current fb before > > + * calling it. > > + */ > > + tmpfb = plane->fb; > > + ret = crtc->funcs->set_config(&set); > > I wonder whether we should have an oppportunistic path using the page_flip > interface here. Otoh we must have a fallback to ->set_config anyway since > the drivers currently only allow pageflips on identical buffers. E.g. i915 > rejects tiling changes and stride changes and position changes. So I think > having a pageflip fastpath isn't worth the trouble. > > Also I think you need to use set_config_internal here to get the > refcounting right. Hmm. I specifically didn't use set_config_internal here because I thought drm_mode_setplane() (and presumably the future atomic ioctl which may also call into this) will already handle the refcounting for us. Am I overlooking something? Matt -- Matt Roper Graphics Software Engineer ISG Platform Enabling & Development Intel Corporation (916) 356-2795