[PATCH 0/2] Document how userspace should use plane format list and IN_FORMATS

Daniel Vetter daniel at ffwll.ch
Thu Apr 8 11:35:08 UTC 2021


On Tue, Apr 06, 2021 at 04:21:16PM -0300, Leandro Ribeiro wrote:
> This patch is to emphasize how userspace should use the plane format list and
> the IN_FORMATS blob. The plane format list contains the formats that do not
> require modifiers, and the blob property has the formats that support
> modifiers.

Uh this is a very strong statement that I don't think is supported by
kernel driver code. Where is this from.

> Note that these are not disjoint sets. If a format supports modifiers but the
> driver can also handle it without a modifier, it should be present in both the
> IN_FORMATS blob property and the plane format list.

Same here ...

I thought these two lists are 100% consistent. If not sounds like driver
bugs that we need to maybe validate in drm_plane_init.

> This is important for userspace, as there are situations in which we need to
> find out if the KMS driver can handle a certain format without any modifiers.

I don't think you can rely on this. No modifiers means implicit modifier,
and the only thing that can give you such buffers is defacto mesa
userspace drivers (since that all depends upon driver private magic, with
maybe some kernel metadata passed around in private ioctls on the render
node).

Maybe for more context, what's the problem you've hit and trying to
clarify here?
-Daniel

> 
> Leandro Ribeiro (2):
>   drm/doc: document drm_mode_get_plane
>   drm/doc: emphasize difference between plane formats and IN_FORMATS
>     blob
> 
>  drivers/gpu/drm/drm_plane.c |  4 ++++
>  include/uapi/drm/drm_mode.h | 22 ++++++++++++++++++++++
>  2 files changed, 26 insertions(+)
> 
> -- 
> 2.31.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list