drm/rockchip: vop: Disable planes when disabling CRTC
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 22 Mar 2016 15:08:04 +0000 (16:08 +0100)
committerMark Yao <mark.yao@rock-chips.com>
Mon, 28 Mar 2016 06:48:30 +0000 (14:48 +0800)
commitcb8996a55c58c69a0d9c80f5f93ab6f86f072e04
treeddb60f745b0c3a8f2a90cc42de5db86e0bfe341b
parent93b32f0de12d1c625af51f8096850b54d812c500
drm/rockchip: vop: Disable planes when disabling CRTC

When a VOP is re-enabled, it will start scanning right away the
framebuffers that were configured from the last time, even if those have
been destroyed already.

To prevent the VOP from trying to access freed memory, disable all its
windows when the CRTC is being disabled, then each window will get a
valid framebuffer address before it's enabled again.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://lkml.kernel.org/g/CAAObsKAv+05ih5U+=4kic_NsjGMhfxYheHR8xXXmacZs+p5SHw@mail.gmail.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c