Skip to content

Commit c70582b

Browse files
Daniel-Abrechtagners
authored andcommitted
drm: mxsfb: Implement .format_mod_supported
This will make sure applications which use the IN_FORMATS blob to figure out which modifiers they can use will pick up the linear modifier which is needed by mxsfb. Such applications will not work otherwise if an incompatible implicit modifier ends up being selected. Before commit ae1ed00 ("drm: mxsfb: Stop using DRM simple display pipeline helper"), the DRM simple display pipeline helper took care of this. Signed-off-by: Daniel Abrecht <public@danielabrecht.ch> Fixes: ae1ed00 ("drm: mxsfb: Stop using DRM simple display pipeline helper") Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Stefan Agner <stefan@agner.ch> Link: https://patchwork.freedesktop.org/patch/msgid/2a99ffffc2378209307e0992a6e97e70@nodmarc.danielabrecht.ch
1 parent 777ee15 commit c70582b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/gpu/drm/mxsfb/mxsfb_kms.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
485485
writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
486486
}
487487

488+
static bool mxsfb_format_mod_supported(struct drm_plane *plane,
489+
uint32_t format,
490+
uint64_t modifier)
491+
{
492+
return modifier == DRM_FORMAT_MOD_LINEAR;
493+
}
494+
488495
static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
489496
.prepare_fb = drm_gem_fb_prepare_fb,
490497
.atomic_check = mxsfb_plane_atomic_check,
@@ -498,6 +505,7 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = {
498505
};
499506

500507
static const struct drm_plane_funcs mxsfb_plane_funcs = {
508+
.format_mod_supported = mxsfb_format_mod_supported,
501509
.update_plane = drm_atomic_helper_update_plane,
502510
.disable_plane = drm_atomic_helper_disable_plane,
503511
.destroy = drm_plane_cleanup,

0 commit comments

Comments
 (0)