[PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

Marek Olšák maraeo at gmail.com
Tue Jan 21 19:21:57 UTC 2025


On Mon, Jan 20, 2025 at 1:41 PM Simona Vetter <simona.vetter at ffwll.ch>
wrote:

> On Mon, Jan 20, 2025 at 08:58:20AM +0100, Thomas Zimmermann wrote:
> > Hi
> >
> >
> > Am 18.01.25 um 03:37 schrieb Marek Olšák:
> > [...]
> > >
> > > 3) Implementing DRM_FORMAT_MOD_LINEAR as having 256B pitch and offset
> > > alignment. This is what we do today. Even if Intel and some AMD chips
> > > can do 64B or 128B alignment, they overalign to 256B. With so many
> > > AMD+NV laptops out there, NV is probably next, unless they already do
> > > this in the closed source driver.
>
> I don't think this works, or at least not any better than the current
> linear modifier. There's way too many users of that thing out there that I
> think you can realistically redefine it.
>

DRM_FORMAT_MOD_LINEAR was redefined on PC a long time ago to mean 256B
pitch alignment because of laptops with AMD+Intel. Drivers redefined it
because that's what happens when it's under-defined. As you say,
DRM_FORMAT_MOD_LINEAR can't be removed, but then it can't work with any
other pitch alignment on all PC hw either, so there is no other choice.

The options for PC are either a new parameterized linear modifier (with
properly defined addressing and size equations) or DRM_FORMAT_MOD_LINEAR
with 256B pitch alignment. There is no 3rd option. Even if you totally
disregard AMD, you won't get it below 128B or 64B on the rest of PC hw
anyway, and that's the same problem.

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250121/f0c2efb6/attachment.htm>


More information about the dri-devel mailing list