[PATCH RESEND] drm/mediatek: Add valid modifier check

Fei Shao fshao at chromium.org
Thu Aug 3 21:42:58 PDT 2023


On Thu, Aug 3, 2023 at 10:57 PM Daniel Vetter <daniel at ffwll.ch> wrote:
>
> On Thu, Aug 03, 2023 at 08:48:56AM -0400, Justin Green wrote:
> > > See c91acda3a380 ("drm/gem: Check for valid formats") and the related gem
> > fb helper functions to see how this is supposed to be done.

Thanks for shedding the light, Sima.
I think that change is exactly what we need here, which is somehow
recent and we don't have that in our downstream kernels.
Applying that also fixes the test failure I saw, so I agree with you
that this patch is not needed for the mainline kernel.

Thanks,
Fei


> >
> > Oh that's interesting, so does this imply that the infrastructure
> > automatically calls format_mod_supported() during framebuffer
> > creation? In that case, this entire patch might be unnecessary in the
> > tip of tree kernel.
>
> It /should/, but maybe a wheel fell off somewhere. So please double-check
> that it doesn indeed work.
>
> Also because we had to put the check into gem helpers, if your driver
> doesn't use those but hand-rolls a bit of that code (the helpers predate a
> bunch of drivers, not sure all got converted), then you might also have a
> validation gap here.
>
> Cheers, Sima



More information about the Linux-mediatek mailing list