Re: [PATCH] drm: drivers may provide multiple primary planes per CRTC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I think I lost track of this thread at some point and forgot
about it. That said…

On Friday, August 7th, 2020 at 3:06 PM, Daniel Vetter <daniel@xxxxxxxx> wrote:

> On Fri, Aug 07, 2020 at 12:38:02PM +0300, Pekka Paalanen wrote:
> > On Fri, 7 Aug 2020 11:07:06 +0200
> > Daniel Vetter <daniel@xxxxxxxx> wrote:
> >
> > > On Thu, Aug 06, 2020 at 10:33:31AM +0000, Simon Ser wrote:
> > > > Some drivers may expose primary planes compatible with multiple CRTCs.
> > > > Make this clear in the docs: the current wording may be misunderstood as
> > > > "exactly one primary plane per CRTC".
> > > >
> > > > Signed-off-by: Simon Ser <contact@xxxxxxxxxxx>
> > > > Cc: Daniel Vetter <daniel@xxxxxxxx>
> > > > ---
> > > >  drivers/gpu/drm/drm_plane.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> > > > index b7b90b3a2e38..108a922e8c23 100644
> > > > --- a/drivers/gpu/drm/drm_plane.c
> > > > +++ b/drivers/gpu/drm/drm_plane.c
> > > > @@ -49,8 +49,8 @@
> > > >   * &struct drm_plane (possibly as part of a larger structure) and registers it
> > > >   * with a call to drm_universal_plane_init().
> > > >   *
> > > > - * Cursor and overlay planes are optional. All drivers should provide one
> > > > - * primary plane per CRTC to avoid surprising userspace too much. See enum
> > > > + * Cursor and overlay planes are optional. All drivers should provide at least
> > > > + * one primary plane per CRTC to avoid surprising userspace too much. See enum
> > >
> > > I think that's even more confusing, since this reads like there could be
> > > multiple primary planes for a specific CRTC. That's not the case, there'
> > > only one pointer going from drm_crtc->primary to a drm_plane in the
> > > kernel.
> >
> > There could be multiple primary planes *usable* for a specific CRTC but
> > just one used at a time, right?
>
> I'm not sure what you mean here, the crtc->primary link is invariant over
> the lifetime of a driver load. You can't pick a different one, that's set
> at driver init before drm_dev_register (and hence before userspace ever
> sees anything).

OK. I'm personally not very interested in documenting legacy bits, so I'll skip
that. I'm mainly interested here in making it clear possible_crtcs for a
primary plane can have more than one bit set. Because of the paragraph in the
current docs, some user-space developers have understood "more than one bit set
in possible_crtcs for a primary plane is a kernel bug".

I'll send a v2 that makes it clear these pointers are for legacy uAPI.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux