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

Fei Shao fshao at chromium.org
Mon Jul 24 23:59:55 PDT 2023


On Tue, Jul 25, 2023 at 1:59 AM Justin Green <greenjustin at chromium.org> wrote:
>
> Add a check to mtk_drm_mode_fb_create() that rejects any modifier that
> is not the AFBC mode supported by MT8195's display overlays.
>
> Tested by booting ChromeOS and verifying the UI works, and by running
> the ChromeOS kms_addfb_basic binary, which has a test called
> "addfb25-bad-modifier" that attempts to create a framebuffer with the
> modifier DRM_FORMAT_MOD_INVALID and verifies the ADDFB2 ioctl returns
> EINVAL.
>
> Signed-off-by: Justin Green <greenjustin at chromium.org>

Tested-by: Fei Shao <fshao at chromium.org>

Tested the UI and with the aforementioned binary on a MT8195
Chromebook (AFBC supported) and a MT8188 Chromebook (AFBC not
supported at this moment).



More information about the Linux-mediatek mailing list