Re: [PATCH] drm/uapi: document kernel capabilities

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

 



On Sat, 06 Mar 2021 10:56:49 +0000
Simon Ser <contact@xxxxxxxxxxx> wrote:

> On Friday, March 5th, 2021 at 9:28 AM, Pekka Paalanen <ppaalanen@xxxxxxxxx> wrote:
> 
> > > +/**
> > > + * DRM_CAP_DUMB_PREFERRED_DEPTH
> > > + *
> > > + * The preferred depth (in bits) for dumb buffers.  
> >
> > this is literally depth, not bits per pixel, right?  
> 
> "Depth" is pretty ambiguous [1]. Maybe we should be more explicit here and say
> that it's the number of bits used to indicate the color of a single pixel? And
> maybe add a note that it's different from bits per pixel?

Yes, indeed.  I was already assuming the meaning of "depth" in drmModeAddFB().

> [1]: https://en.wikipedia.org/wiki/Color_depth
> 

> > > +/**
> > > + * DRM_CAP_PRIME
> > > + *
> > > + * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
> > > + * and &DRM_PRIME_CAP_EXPORT.
> > > + */
> > >  #define DRM_CAP_PRIME			0x5
> > > +/**
> > > + * DRM_PRIME_CAP_IMPORT
> > > + *
> > > + * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME
> > > + * buffers.  
> >
> > What are PRIME buffers?  
> 
> Will add something like:
> 
>     PRIME buffers are exposed as dma-buf file descriptors. See
>     Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".

Sounds good.

> > > + */
> > >  #define  DRM_PRIME_CAP_IMPORT		0x1
> > > +/**
> > > + * DRM_PRIME_CAP_EXPORT
> > > + *
> > > + * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME
> > > + * buffers.  
> >
> > What's the export API? HandleToFD()?  
> 
> Yes. Will add a note about it. Same for import.

Cool.


> > > +/**
> > > + * DRM_CAP_CRTC_IN_VBLANK_EVENT
> > > + *
> > > + * If set to 1, the kernel supports reporting the CRTC ID in
> > > + * &drm_event_vblank.crtc_id.  
> >
> > Does this not apply also to the pageflip / atomic completion event?  
> 
> Both DRM_EVENT_VBLANK and DRM_EVENT_FLIP_COMPLETE use the struct
> drm_event_vblank, so yes. I'll mention these two events explicitly.

They do? Seems like I have been spoiled by the libdrm API that uses
drmEventContext with different callbacks for these things.


Thanks,
pq

Attachment: pgpyOR2KzcxbS.pgp
Description: OpenPGP digital signature

_______________________________________________
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