[PATCH v3] drm/fourcc: document modifier uniqueness requirements

Alex Deucher alexdeucher at gmail.com
Fri May 29 13:28:55 UTC 2020


On Fri, May 29, 2020 at 4:59 AM Simon Ser <contact at emersion.fr> wrote:
>
> On Thursday, May 28, 2020 5:49 PM, Marek Olšák <maraeo at gmail.com> wrote:
>
> > On most hardware, there is a minimum pitch alignment for linear and
> > any greater multiple of the alignment is fine.
> >
> > On Navi, the pitch in bytes for linear must be
> > align(width * bpp / 8, 256). That's because the hw computes the pitch
> > from the width and doesn't allow setting a custom pitch. For that
> > reason, multi-GPU sharing might not be possible if the other GPU
> > doesn't align the pitch in exactly the same way.
>
> OK. In this case I think it's fine to make the DMA-BUF import fail, as
> we've suggested on IRC. The more-or-less planned fix for these buffer
> sharing issues is to revive the buffer constraints proposal from the
> allocator project. It's a lot of work though.

I get that, but why explicitly limit modifiers then?  Shouldn't we try
and do the best we can with what we have now?  If not the situation is
not much better than what we have now.  Why go through the effort or
adding modifer support in the first place if they are mostly useless?
I don't quite get what we are trying to do with them.  What does this
mean "Modifiers must uniquely encode buffer layout"?  We have a number
of buffer layouts that are the same from a functional standpoint, but
they have different alignment requirements depending on the chip and
the number of memory channels, etc.  Would those be considered the
same modifer?  If not, then we are sort of implicitly encoding
alignment requirements into the modifier.

Alex


More information about the dri-devel mailing list