drm/rockchip: Suspend DP late
authorDouglas Anderson <dianders@chromium.org>
Fri, 2 Aug 2019 18:46:16 +0000 (11:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:28:40 +0000 (08:28 +0200)
commit6cb4997861c8bf9a73b54b123c02fab436b852a6
tree4dccbfc127827c01f497735b50364c32dbdf02f2
parent1c6ca09217054d9fe72977a168781ad0af9b1623
drm/rockchip: Suspend DP late

[ Upstream commit f7ccbed656f78212593ca965d9a8f34bf24e0aab ]

In commit fe64ba5c6323 ("drm/rockchip: Resume DP early") we moved
resume to be early but left suspend at its normal time.  This seems
like it could be OK, but casues problems if a suspend gets interrupted
partway through.  The OS only balances matching suspend/resume levels.
...so if suspend was called then resume will be called.  If suspend
late was called then resume early will be called.  ...but if suspend
was called resume early might not get called.  This leads to an
unbalance in the clock enables / disables.

Lets take the simple fix and just move suspend to be late to match.
This makes the PM core take proper care in keeping things balanced.

Fixes: fe64ba5c6323 ("drm/rockchip: Resume DP early")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190802184616.44822-1-dianders@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c