drm/exynos: Suspend/resume display pipeline as early/late as possible
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 17 May 2018 06:46:07 +0000 (08:46 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:02 +0000 (14:58 +0900)
commitae1c75eeaa192f4e4d603bf334af056d10c64e55
tree473a44210bd774039daa0639c661d324a73af069
parentfe8550fe1c6224110035b685c4a41a61acbb3f00
drm/exynos: Suspend/resume display pipeline as early/late as possible

In the current code, exynos_drm_suspend() function is called after all
real devices (CRTCs, Encoders, etc) are suspended, because Exynos DRM
virtual platform device is created as last device in the system (as
a part of DRM registration). None of the devices for real hardware
modules has its own system suspend/resume callbacks, so it doesn't
change any order of the executed code, but it has a side-effect:
runtime PM callbacks for real devices are not executed, because those
devices are considered by PM core as already suspended. This might
cause issues on boards with complex pipelines, where something
depends on the runtime PM state of the given device.

To ensure that exynos_drm_suspend() is called before any suspend
callback from the real devices, assign it to .prepare callback. Same
for exynos_drm_resume(), using .complete callback ensures that all
real devices have been resumed when calling it.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Icb178cecfbec2cb5b71b7a2ea70bf290c89198d2
drivers/gpu/drm/exynos/exynos_drm_drv.c