[PATCH] drm/amdgpu: Use device specific BO size & stride check.

Alex Deucher alexdeucher at gmail.com
Wed May 5 18:20:38 UTC 2021


Applied.  Thanks!

Alex

On Tue, May 4, 2021 at 11:30 AM Simon Ser <contact at emersion.fr> wrote:
>
> On Tuesday, May 4th, 2021 at 11:43 AM, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
>
> > The builtin size check isn't really the right thing for AMD
> > modifiers due to a couple of reasons:
> >
> > 1) In the format structs we don't do set any of the tilesize / blocks
> > etc. to avoid having format arrays per modifier/GPU
> > 2) The pitch on the main plane is pixel_pitch * bytes_per_pixel even
> > for tiled ...
> > 3) The pitch for the DCC planes is really the pixel pitch of the main
> > surface that would be covered by it ...
> >
> > Note that we only handle GFX9+ case but we do this after converting
> > the implicit modifier to an explicit modifier, so on GFX9+ all
> > framebuffers should be checked here.
>
> Thanks for the updated patch! It fixes the regressions I've got with
> my modifier-aware user-space compositors.
>
> Tested-by: Simon Ser <contact at emersion.fr>
>
> > There is a TODO about DCC alignment, but it isn't worse than before
> > and I'd need to dig a bunch into the specifics. Getting this out in
> > a reasonable timeframe to make sure it gets the appropriate testing
> > seemed more important.
> >
> > Finally as I've found that debugging addfb2 failures is a pita I was
> > generous adding explicit error messages to every failure case.
>
> Very good idea!


More information about the amd-gfx mailing list