[PATCH RESEND] drm/mediatek: Add valid modifier check
Justin Green
greenjustin at chromium.org
Wed Jul 26 19:44:44 UTC 2023
> Would it make more sense to commmonize function mtk_plane_format_mod_supported()
> and call that one here instead?
I had considered that, but mtk_plane_format_mod_supported() is
required to take a drm_plane as a parameter in order to conform to the
type signature defined in drm_plane_funcs, but
mtk_drm_mode_fb_create() does not have a drm_plane to provide, since
the framebuffer is created later in the function. Technically we don't
actually use the drm_plane in the implementation of
mtk_plane_format_mod_supported() today, so we could just use a null
pointer, but I figured we may one day need to add per-plane logic.
> This is not DRM_FORMAT_MOD_INVALID. Please either explicitly compare against INVALID if that's what you meant, or against LINEAR if that's what you meant, or both.
Ack, I meant to use LINEAR. Will update for the next version of the patch.
More information about the dri-devel
mailing list