dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Cc: airlied@linux.ie, pekka.paalanen@collabora.co.uk,
	kernel@collabora.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/doc: emphasize difference between plane formats and IN_FORMATS blob
Date: Wed, 7 Apr 2021 16:51:11 +0300	[thread overview]
Message-ID: <YG24z2oeHVtzvkXy@intel.com> (raw)
In-Reply-To: <20210406192118.12313-3-leandro.ribeiro@collabora.com>

On Tue, Apr 06, 2021 at 04:21:18PM -0300, Leandro Ribeiro wrote:
> Emphasize how userspace should use the plane format list
> (format_type_ptr) and the IN_FORMATS blob property.
> 
> Formats exposed in the plane format list (format_type_ptr) do not
> require modifiers, and formats that are present in the IN_FORMATS blob
> property support modifiers.
> 
> 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.
> 
> Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> ---
>  drivers/gpu/drm/drm_plane.c | 4 ++++
>  include/uapi/drm/drm_mode.h | 3 +++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 0dd43882fe7c..b48d9bd81a59 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -128,6 +128,10 @@
>   *     pairs supported by this plane. The blob is a struct
>   *     drm_format_modifier_blob. Without this property the plane doesn't
>   *     support buffers with modifiers. Userspace cannot change this property.
> + *
> + *     To find out the list of buffer formats which are supported without a
> + *     modifier, userspace should not look at this blob property, but at the
> + *     formats list of the plane: &drm_mode_get_plane.format_type_ptr.
>   */
>  
>  static unsigned int drm_num_planes(struct drm_device *dev)
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 96fc9a6da608..4293800ec095 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -340,6 +340,9 @@ struct drm_mode_get_plane {
>  	/**
>  	 * @format_type_ptr: Pointer to ``__u32`` array of formats that are
>  	 * supported by the plane. These formats do not require modifiers.
> +	 *
> +	 * To find out the list of formats that support modifiers, userspace
> +	 * must use the plane IN_FORMATS blob property.
>  	 */

Addfb2+modifiers predates the IN_FORMATS blob, so this doesn't
match reality.

>  	__u64 format_type_ptr;
>  };
> -- 
> 2.31.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-07 13:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 19:21 [PATCH 0/2] Document how userspace should use plane format list and IN_FORMATS Leandro Ribeiro
2021-04-06 19:21 ` [PATCH 1/2] drm/doc: document drm_mode_get_plane Leandro Ribeiro
2021-04-07 13:45   ` Ville Syrjälä
2021-04-08 19:26     ` Leandro Ribeiro
2021-04-20  8:51       ` Simon Ser
2021-04-06 19:21 ` [PATCH 2/2] drm/doc: emphasize difference between plane formats and IN_FORMATS blob Leandro Ribeiro
2021-04-07 13:51   ` Ville Syrjälä [this message]
2021-04-08  8:39     ` Simon Ser
2021-04-08  9:59       ` Pekka Paalanen
2021-04-08 11:30         ` Daniel Vetter
2021-04-08 13:57           ` Pekka Paalanen
2021-04-08 14:39             ` Ville Syrjälä
2021-04-09  9:44               ` Pekka Paalanen
2021-04-12 13:16               ` Daniel Vetter
2021-04-08 11:35 ` [PATCH 0/2] Document how userspace should use plane format list and IN_FORMATS Daniel Vetter
2021-04-08 22:24   ` Leandro Ribeiro
2021-04-12 13:59     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YG24z2oeHVtzvkXy@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=leandro.ribeiro@collabora.com \
    --cc=pekka.paalanen@collabora.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox