MLK-19419: drm: imx: dcss: Add linear modifier support for all formats
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 31 Aug 2018 10:58:01 +0000 (13:58 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Tiled formats are supported only for YUV420 semi-planar formats.
However, the other formats should support at least the LINEAR modifier.
Some userspace app may pass on framebuffers with the linear modifier
attached and, currently, this is rejected for YUV422 and RGB formats.

This patch fixes that.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Reported-by: Jared Hu <jared.hu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-plane.c

index 61e2866..9edb1cf 100644 (file)
@@ -158,7 +158,7 @@ static bool dcss_plane_format_mod_supported(struct drm_plane *plane,
                               modifier == DRM_FORMAT_MOD_VSI_G2_TILED ||
                               modifier == DRM_FORMAT_MOD_VSI_G2_TILED_COMPRESSED;
                default:
-                       return false;
+                       return modifier == DRM_FORMAT_MOD_LINEAR;
                }
                break;
        default: