From: Simona Vetter <simona.vetter@ffwll.ch>
To: Daniel Stone <daniel@fooishbar.org>
Cc: "Brian Starkey" <brian.starkey@arm.com>,
"Simona Vetter" <simona.vetter@ffwll.ch>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Marek Olšák" <maraeo@gmail.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
"amd-gfx mailing list" <amd-gfx@lists.freedesktop.org>,
"ML Mesa-dev" <mesa-dev@lists.freedesktop.org>,
nd@arm.com
Subject: Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment
Date: Thu, 19 Dec 2024 19:03:26 +0100 [thread overview]
Message-ID: <Z2Rf7mpSuzZ0ObmT@phenom.ffwll.local> (raw)
In-Reply-To: <CAPj87rMFJ0JRvsKqZUsw_EGrFWr1VLO4Ne2w_bZ5cH+gs_d=og@mail.gmail.com>
On Thu, Dec 19, 2024 at 09:02:27AM +0000, Daniel Stone wrote:
> On Wed, 18 Dec 2024 at 10:32, Brian Starkey <brian.starkey@arm.com> wrote:
> > On Wed, Dec 18, 2024 at 11:24:58AM +0000, Simona Vetter wrote:
> > > For that reason I think linear modifiers with explicit pitch/size
> > > alignment constraints is a sound concept and fits into how modifiers work
> > > overall.
> >
> > Could we make it (more) clear that pitch alignment is a "special"
> > constraint (in that it's really a description of the buffer layout),
> > and that constraints in-general shouldn't be exposed via modifiers?
>
> It's still worryingly common to see requirements for contiguous
> allocation, if for no other reason than we'll all be stuck with
> Freescale/NXP i.MX6 for a long time to come. Would that be in scope
> for expressing constraints via modifiers as well, and if so, should we
> be trying to use feature bits to express this?
>
> How this would be used in practice is also way too underdocumented. We
> need to document that exact-round-up 64b is more restrictive than
> any-multiple-of 64b is more restrictive than 'classic' linear. We need
> to document what people should advertise - if we were starting from
> scratch, the clear answer would be that anything which doesn't care
> should advertise all three, anything advertising any-multiple-of
> should also advertise exact-round-up, etc.
>
> But we're not starting from scratch, and since linear is 'special',
> userspace already has explicit knowledge of it. So AMD is going to
> have to advertise LINEAR forever, because media frameworks know about
> DRM_FORMAT_MOD_LINEAR and pass that around explicitly when they know
> that the buffer is linear. That and not breaking older userspace
> running in containers or as part of a bisect or whatever.
>
> There's also the question of what e.g. gbm_bo_get_modifier() should
> return. Again, if we were starting from scratch, most restrictive
> would make sense. But we're not, so I think it has to return LINEAR
> for maximum compatibility (because modifiers can't be morphed into
> other ones for fun), which further cements that we're not removing
> LINEAR.
>
> And how should allocators determine what to go for? Given that, I
> think the only sensible semantics are, when only LINEAR has been
> passed, to pick the most restrictive set possible; when LINEAR
> variants have been passed as well as LINEAR, to act as if LINEAR were
> not passed at all.
Yeah I think this makes sense, and we'd need to add that to the kerneldoc
about how drivers/apps/frameworks need to work with variants of LINEAR.
Just deprecating LINEAR does indeed not work. The same way it was really
hard slow crawl (and we're still not there everywhere, if you include
stuff like bare metal Xorg) trying to retire the implied modifier. Maybe,
in an extremely bright future were all relevant drivers advertise a full
set of LINEAR variants, and all frameworks understand them, we'll get
there. But if AMD is the one special case that really needs this I don't
think it's realistic to plan for that, and what Daniel describe above
looks like the future we're stuck to.
-Sima
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2024-12-19 18:03 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 20:53 [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment Marek Olšák
2024-12-15 20:54 ` Marek Olšák
2024-12-15 23:22 ` Joshua Ashton
2024-12-15 23:57 ` Marek Olšák
2024-12-16 2:08 ` Joshua Ashton
2024-12-16 5:40 ` Marek Olšák
2024-12-16 9:28 ` Dmitry Baryshkov
2024-12-16 21:49 ` Marek Olšák
2024-12-16 9:27 ` Michel Dänzer
2024-12-16 10:46 ` Lucas Stach
2024-12-16 14:53 ` Simona Vetter
2024-12-16 21:58 ` Marek Olšák
2024-12-18 10:21 ` Simona Vetter
2024-12-16 21:54 ` Marek Olšák
2024-12-17 9:59 ` Michel Dänzer
2024-12-16 21:29 ` Marek Olšák
2024-12-17 9:14 ` Michel Dänzer
2024-12-17 9:14 ` Brian Starkey
2024-12-17 10:13 ` Michel Dänzer
2024-12-17 11:03 ` Brian Starkey
2024-12-18 9:44 ` Michel Dänzer
2024-12-18 10:24 ` Simona Vetter
2024-12-18 10:32 ` Brian Starkey
2024-12-19 2:53 ` Marek Olšák
2024-12-19 9:09 ` Daniel Stone
2024-12-19 10:32 ` Brian Starkey
2024-12-20 0:33 ` Marek Olšák
2024-12-20 11:30 ` Brian Starkey
2024-12-20 14:24 ` Marek Olšák
2024-12-20 15:27 ` Simona Vetter
2024-12-19 9:02 ` Daniel Stone
2024-12-19 16:09 ` Michel Dänzer
2024-12-20 15:24 ` Simona Vetter
2024-12-25 7:34 ` Marek Olšák
2024-12-19 18:03 ` Simona Vetter [this message]
2025-01-10 21:23 ` James Jones
2025-01-14 9:38 ` Marek Olšák
2025-01-14 17:55 ` James Jones
2025-01-15 3:49 ` Marek Olšák
2025-01-14 17:58 ` Daniel Stone
2025-01-15 4:05 ` Marek Olšák
2025-01-15 12:20 ` Daniel Stone
2025-01-17 14:18 ` Simona Vetter
2025-01-18 2:37 ` Marek Olšák
2025-01-20 7:58 ` Thomas Zimmermann
2025-01-20 18:41 ` Simona Vetter
2025-01-21 19:21 ` Marek Olšák
2025-01-22 10:47 ` Simona Vetter
2025-01-20 21:31 ` Laurent Pinchart
2025-01-21 9:02 ` Philipp Zabel
2025-01-14 18:33 ` Faith Ekstrand
2025-01-15 4:27 ` Marek Olšák
2025-01-15 8:37 ` Simona Vetter
2025-01-20 22:00 ` Laurent Pinchart
2025-01-21 22:40 ` James Jones
2025-01-20 21:48 ` Laurent Pinchart
2025-01-14 13:46 ` Thomas Zimmermann
2025-01-14 13:50 ` Thomas Zimmermann
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=Z2Rf7mpSuzZ0ObmT@phenom.ffwll.local \
--to=simona.vetter@ffwll.ch \
--cc=amd-gfx@lists.freedesktop.org \
--cc=brian.starkey@arm.com \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=maraeo@gmail.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=michel.daenzer@mailbox.org \
--cc=nd@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.