drm/rockchip: vop: Enable pm domain before vop_initial
authorJeffy Chen <jeffy.chen@rock-chips.com>
Thu, 6 Apr 2017 12:31:20 +0000 (20:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:17:49 +0000 (09:17 +0100)
commit543a1817e58005b5db834a5aa60a78d9095cad81
tree06dd7d29bbfdf06080fcd070ef91e72d48594661
parent3820303837014a00e40e69f9a648aed6cc78f92a
drm/rockchip: vop: Enable pm domain before vop_initial

[ Upstream commit 5e570373c015b60a68828b1cd9d475cb33d3be4b ]

We're trying to access vop registers here, so need to make sure
the pm domain is on.

Normally it should be enabled by the bootloader, but there's no
guarantee of it. And if we wanna do unbind/bind, it would also
cause the device to hang.

And this patch also does these:
1/ move vop_initial to the end of vop_bind for eaiser error handling.
2/ correct the err_put_pm_runtime of vop_enable.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-8-git-send-email-jeffy.chen@rock-chips.com
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c