On Tue, Jan 21, 2025 at 02:21:57PM -0500, Marek Olšák wrote: > On Mon, Jan 20, 2025 at 1:41 PM Simona Vetter <simona.vetter@xxxxxxxx> > 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. Ah I missed that, but just checked in mesa, happened in 2021 apparently. Would be really good to document this in the kernel's drm_fourcc.h comments as the defacto rule. It's better if the docs reflect actual reality, whatever that is. -Sima -- Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch