From: "José Expósito" <jose.exposito89@gmail.com>
To: Simon Ser <contact@emersion.fr>
Cc: rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com,
airlied@linux.ie, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, melissa.srw@gmail.com,
cphealy@gmail.com
Subject: Re: [PATCH] drm/vkms: set plane modifiers
Date: Thu, 16 Dec 2021 18:05:32 +0100 [thread overview]
Message-ID: <20211216170532.GA16349@elementary> (raw)
In-Reply-To: <3jzxPysjC6vyPfQXQoY5tuHmyXNupFZCZ3babQzWfWRMnI8epycdbhcSF12HWKrjojVo97MlLrJE2HGtM7jcliGZXGXUJSkNcAFn5eTZSu4=@emersion.fr>
On Wed, Dec 15, 2021 at 05:23:10PM +0000, Simon Ser wrote:
> You'll need to set the format_mod_supported hook as well, otherwise the kernel
> will expose a bogus IN_FORMATS prop with one modifier and zero formats.
Hi Simon,
Thank you very much for reviewing this patch, I just started learning
about DRM and this kind of reviews are really helpful :)
I was a bit confused by the docs[1]: (*stars* added in the relevant parts)
> format_mod_supported:
>
> This *optional* hook is used for the DRM to determine if the given
> format/modifier combination is valid for the plane. This allows the
> DRM to generate the correct format bitmask (which formats apply to
> which modifier), and to valdiate modifiers at atomic_check time.
>
> *If not present*, then any modifier in the plane’s modifier list is
> allowed with any of the plane’s formats.
How I read it: "format_mod_supported" can be ignored where no filtering
is intended.
Looking at "create_in_format_blob" this does not look like a bug... But
I am not sure. You probably know the answer.
Whether the anwser is to chage the docs or "create_in_format_blob" I can
send a patch.
For what is worth, after extrating the relevant bits from Weston's
"drm_plane_populate_formats" function to my test program [2], formats
are not listed if "format_mod_supported" is not implemented. The same
applies to drm_info.
So, for the moment I emailed v2 implementing "format_mod_supported" [3].
By the way, this could be related to [4], see commit
b36a6bb8a151c056e1046e9d5b1192d90d9941c9. If we decided that the docs
are wrong I can send a patch as well.
Thanks again for your input,
Jose
[1] https://www.kernel.org/doc/html/latest/gpu/drm-kms.html?highlight=in_formats#c.drm_plane_funcs
[2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c
[3] https://lore.kernel.org/dri-devel/20211216170140.15803-1-jose.exposito89@gmail.com/T/
[4] https://lists.freedesktop.org/archives/wayland-devel/2021-December/042072.html
prev parent reply other threads:[~2021-12-16 17:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 16:42 [PATCH] drm/vkms: set plane modifiers José Expósito
2021-12-15 17:23 ` Simon Ser
2021-12-16 17:05 ` José Expósito [this message]
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=20211216170532.GA16349@elementary \
--to=jose.exposito89@gmail.com \
--cc=airlied@linux.ie \
--cc=contact@emersion.fr \
--cc=cphealy@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=melissa.srw@gmail.com \
--cc=rodrigosiqueiramelo@gmail.com \
/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