MLK-19158-4 drm/imx: lcdif: remove bus format check from PLANE's check
authorFancy Fang <chen.fang@nxp.com>
Sun, 12 Aug 2018 07:47:41 +0000 (15:47 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Since the LCDIF output data width can be different from the data
width of input pixel data, so the bus format check in the plane's
atomic check is not correct anymore, and need to be removed.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 2245702e7905fa7b75aec92fdbb9ffeb33bdb6de)
(cherry picked from commit facd1962b0f89cf80435e458194189e55ef00fac)

drivers/gpu/drm/imx/lcdif/lcdif-plane.c

index 8ec5b00..bda828e 100644 (file)
@@ -45,15 +45,11 @@ static int lcdif_plane_atomic_check(struct drm_plane *plane,
                                    struct drm_plane_state *plane_state)
 {
        int ret;
-       uint32_t bus_fmt;
-       struct lcdif_plane *lcdif_plane = to_lcdif_plane(plane);
-       struct lcdif_soc *lcdif = lcdif_plane->lcdif;
        struct drm_plane_state *old_state = plane->state;
        struct drm_framebuffer *fb = plane_state->fb;
        struct drm_framebuffer *old_fb = old_state->fb;
        struct drm_crtc_state *crtc_state;
        struct drm_display_mode *mode;
-       unsigned int flags;
 
        /* 'fb' should also be NULL which has been checked in
         * the core sanity check function 'drm_atomic_plane_check()'
@@ -71,15 +67,6 @@ static int lcdif_plane_atomic_check(struct drm_plane *plane,
                                                        plane_state->crtc);
        mode = &crtc_state->adjusted_mode;
 
-       bus_fmt = lcdif_get_bus_fmt_from_pix_fmt(lcdif, fb->format->format);
-       if (bus_fmt < 0)
-               return -EINVAL;
-
-       /* check fb pixel format matches bus format */
-       flags = mode->private_flags & 0xffff;
-       if (flags != bus_fmt)
-               return -EINVAL;
-
        ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state,
                                                  DRM_PLANE_HELPER_NO_SCALING,
                                                  DRM_PLANE_HELPER_NO_SCALING,