MLK-19083 drm/imx: lcdif: remove untrue condition for pixel format set
authorFancy Fang <chen.fang@nxp.com>
Sun, 29 Jul 2018 11:09:31 +0000 (19:09 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
After supporting DISPMIX power domain, the LCDIF runtime
resume callback always write '0' to 'LCDIF_CTRL' register
which will clear previous pixel format related setting.
So the previous condition by comparing format change for
setting pixel format during plane atomic update is not
true anymore.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 5f84c69799456f28fd8182fd156e9067921e9a4e)
(cherry picked from commit 364fd1879c587fbdb80aa290df54609c30de7ef8)

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

index e92fc61..d21883c 100644 (file)
@@ -98,7 +98,6 @@ static void lcdif_plane_atomic_update(struct drm_plane *plane,
        struct lcdif_soc *lcdif = lcdif_plane->lcdif;
        struct drm_plane_state *state = plane->state;
        struct drm_framebuffer *fb = state->fb;
-       struct drm_framebuffer *old_fb = old_state->fb;
        struct drm_gem_cma_object *gem_obj = NULL;
        u32 fb_addr, src_off, fb_idx;
 
@@ -110,8 +109,7 @@ static void lcdif_plane_atomic_update(struct drm_plane *plane,
         * and the fb pixel format, since the mode set will
         * be done in crtc's ->enable() helper func
         */
-       if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
-           (!old_fb || fb->format->format != old_fb->format->format))
+       if (plane->type == DRM_PLANE_TYPE_PRIMARY)
                lcdif_set_pix_fmt(lcdif, fb->format->format);
 
        switch (plane->type) {