drm/rockchip: vop: make vop register setting take effect
authorChris Zhong <zyw@rock-chips.com>
Sat, 27 Aug 2016 03:39:38 +0000 (20:39 -0700)
committerMark Yao <mark.yao@rock-chips.com>
Sun, 5 Feb 2017 08:16:07 +0000 (16:16 +0800)
The setting of vop registers need a reg_done writing to take effect.
In vop_enable the vop return to work by by restoring registers, but the
registers do not take effect immediately, it should a vop_cfg_done
after it. The same thing is needed by windows_disabled in
vop_crtc_disable.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

index fb5f001f51c3ef039a57cb23183ac878861b357e..4f8b8631956a064d2143061ac28bdc4deb6dea1a 100644 (file)
@@ -531,6 +531,8 @@ static int vop_enable(struct drm_crtc *crtc)
        }
 
        memcpy(vop->regs, vop->regsbak, vop->len);
+       vop_cfg_done(vop);
+
        /*
         * At here, vop clock & iommu is enable, R/W vop regs would be safe.
         */
@@ -582,6 +584,8 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
                spin_unlock(&vop->reg_lock);
        }
 
+       vop_cfg_done(vop);
+
        drm_crtc_vblank_off(crtc);
 
        /*