[RFCv3 03/14] drm: Add primary plane helpers
Matt Roper
matthew.d.roper at intel.com
Wed Mar 19 11:15:36 PDT 2014
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
More information about the dri-devel
mailing list