From: Brian Starkey <brian.starkey@arm.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Daniel Vetter <daniel@ffwll.ch>,
Nicolas Dufresne <nicolas@ndufresne.ca>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
jonathan.chai@arm.com,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: DRM Format Modifiers in v4l2
Date: Wed, 30 Aug 2017 10:36:21 +0100 [thread overview]
Message-ID: <20170830093621.GB15136@e107564-lin.cambridge.arm.com> (raw)
In-Reply-To: <4399d87d-9b60-1d8b-cb83-b62f134a0aa5@xs4all.nl>
On Wed, Aug 30, 2017 at 10:10:01AM +0200, Hans Verkuil wrote:
>On 30/08/17 09:50, Daniel Vetter wrote:
>> On Tue, Aug 29, 2017 at 10:47:01AM +0100, Brian Starkey wrote:
>>> The fact is, adding special formats for each combination is
>>> unmanageable - we're talking dozens in the case of our hardware.
>>
>> Hm right, we can just remap the special combos to the drm-fourcc +
>> modifier style. Bonus point if v4l does that in the core so not everyone
>> has to reinvent that wheel :-)
>
>Probably not something we'll do: there are I believe only two drivers that
>are affected (exynos & mediatek), so they can do that in their driver.
>
>Question: how many modifiers will typically apply to a format? I ask
>because I realized that V4L2 could use VIDIOC_ENUMFMT to make the link
>between a fourcc and modifiers:
>
>https://hverkuil.home.xs4all.nl/spec/uapi/v4l/vidioc-enum-fmt.html
>
>The __u32 reserved[4] array can be used to provide a bitmask to modifier
>indices (for the integer menu control). It's similar to what drm does,
>except instead of modifiers mapping to fourccs it is the other way around.
>
>This would avoid having to change the modifiers control whenever a new
>format is set and it makes it easy to enumerate all combinations.
>
>But this only works if the total number of modifiers used by a single driver
>is expected to remain small (let's say no more than 64).
In our current (yet to be submitted) description, we've got around a
dozen modifiers for any one format to describe our compression
variants. We have a lot of on/off toggles which leads to combinatorial
expansion, so it can grow pretty quickly (though I am trying to limit
the valid combinations as much as possible).
How about if the mask fills up then VIDIOC_ENUM_FMT can return another
fmtdsc with the same FourCC and different modifier bitmask, where the
second one's modifier bitmask is for the next "N" modifiers?
-Brian
>
>Regards,
>
> Hans
next prev parent reply other threads:[~2017-08-30 9:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 15:52 DRM Format Modifiers in v4l2 Brian Starkey
2017-08-21 16:01 ` Daniel Vetter
2017-08-21 16:21 ` Brian Starkey
2017-08-21 16:36 ` Hans Verkuil
2017-08-24 11:14 ` Brian Starkey
2017-08-24 11:37 ` Hans Verkuil
2017-08-24 12:26 ` Brian Starkey
2017-08-25 8:14 ` Hans Verkuil
2017-08-29 9:19 ` Brian Starkey
2017-08-31 14:36 ` Laurent Pinchart
2017-08-28 18:07 ` Nicolas Dufresne
2017-08-28 20:49 ` Daniel Vetter
2017-08-29 9:47 ` Brian Starkey
2017-08-30 7:50 ` Daniel Vetter
2017-08-30 8:10 ` Hans Verkuil
2017-08-30 9:36 ` Brian Starkey [this message]
2017-08-30 9:53 ` Hans Verkuil
2017-08-30 10:32 ` Brian Starkey
2017-08-31 14:51 ` Laurent Pinchart
2017-08-31 15:23 ` Brian Starkey
2017-08-31 14:28 ` Laurent Pinchart
2017-08-31 16:12 ` Nicolas Dufresne
2017-09-01 7:13 ` Laurent Pinchart
2017-09-01 12:43 ` Rob Clark
2017-09-03 9:00 ` 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=20170830093621.GB15136@e107564-lin.cambridge.arm.com \
--to=brian.starkey@arm.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=jonathan.chai@arm.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=nicolas@ndufresne.ca \
/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;
as well as URLs for NNTP newsgroup(s).