All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simona Vetter <simona.vetter@ffwll.ch>
To: "Michel Dänzer" <michel.daenzer@mailbox.org>
Cc: "Brian Starkey" <brian.starkey@arm.com>,
	"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: Wed, 18 Dec 2024 11:24:58 +0100	[thread overview]
Message-ID: <Z2Ki-lQH4Fbch6RO@phenom.ffwll.local> (raw)
In-Reply-To: <8dae97c9-9286-451a-8122-b309eb21b2f4@mailbox.org>

On Wed, Dec 18, 2024 at 10:44:17AM +0100, Michel Dänzer wrote:
> On 2024-12-17 12:03, Brian Starkey wrote:
> > On Tue, Dec 17, 2024 at 11:13:05AM +0000, Michel Dänzer wrote:
> >> On 2024-12-17 10:14, Brian Starkey wrote:
> >>
> >>> Modifiers are meant to describe framebuffers, and this pitch alignment
> >>> requirement isn't really a framebuffer property - it's a device
> >>> constraint. It feels out of place to overload modifiers with it.
> 
> FWIW, KMS framebuffers aren't the only use case for sharing buffers
> between devices.
> 
> 
> >>> I'm not saying we don't need a way to describe constraints to
> >>> allocators, but I question if modifiers the right mechanism to
> >>> communicate them?
> >> While I agree with your concern in general, AFAIK there's no other
> >> solution for this even on the horizon, after years of talking about
> >> it. The solution proposed here seems like an acceptable stop gap,
> >> assuming it won't result in a gazillion linear modifiers.
> > 
> > UAPI is baked forever, so it's worth being a little wary IMO.
> > 
> > This sets a precedent for describing constraints via modifiers. The
> > reason no other proposal is on the horizon is because describing the
> > plethora of constraints across devices is a hard problem; and the
> > answer so far has been "userspace needs to know" (à la Android's
> > gralloc).
> > 
> > If we start down the road of describing constraints with modifiers, I
> > fear we'll end up in a mess. The full enumeration of modifiers is
> > already horrendous for parameterized types, please let's not
> > combinatorially multiply those by constraints.
> 
> I agree there's a slippery slope.
> 
> That said, linear buffers are special in that they're the only
> possibility which can work for sharing buffers between devices in many
> cases, in particular when the devices are from different vendors or even
> different generations from the same vendor.
> 
> So as long as device vendors don't get too creative with their linear
> pitch alignment restrictions, it still seems like this might be workable
> stop-gap solution for that specific purpose alone, until a better
> solution for handling constraints arrives.
> 
> 
> > P.S. "is the only modifier that has a chance of not working" is
> > fundamentally false.
> 
> My reading of that part of the comment is that pitch alignment shouldn't
> be an issue with non-linear modifiers, since the constraints for pitch
> should be part of the modifier definition. Maybe that could be clarified
> in the comment.

Yeah with all other modifiers pitch alignment or other alignment/sizing
requirements are generally implied. Mostly by stuff like tile size, but
there's others where the hw requirement flat out is that the buffer must
have a power-of-two stride (and maybe we should document these when they
pop up, but the only one I know of are the legacy i915 modifiers, which
are kinda busted anyway for interop).

For that reason I think linear modifiers with explicit pitch/size
alignment constraints is a sound concept and fits into how modifiers work
overall.
-Sima

> 
> 
> -- 
> Earthling Michel Dänzer       \        GNOME / Xwayland / Mesa developer
> https://redhat.com             \               Libre software enthusiast

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

  reply	other threads:[~2024-12-18 10:25 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 [this message]
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
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=Z2Ki-lQH4Fbch6RO@phenom.ffwll.local \
    --to=simona.vetter@ffwll.ch \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=brian.starkey@arm.com \
    --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.