[COMMON] g2d: add support for suspend and shutdown
authorCho KyongHo <pullip.cho@samsung.com>
Mon, 24 Apr 2017 02:05:23 +0000 (11:05 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:14 +0000 (14:27 +0900)
commit40709ade861d7bafa0ec313b42abd9e45f78f4a9
tree2e6ff9113e7aa53a59c5a088bae6e67157e35efa
parent4aa4161296a3fe5c12abffeccb68f0ced7613111
[COMMON] g2d: add support for suspend and shutdown

When the system is going to be suspeded to RAM, all the drivers should
complete their active tasks and freeze their working. G2D driver
registers pm notifiers to get informed about the time of suspend a bit
earlier than .suspend() callback function called by dpm. Likewise, it
makes the driver know the time of wake-up later than the invokation of
.resume() callback function. It is important for the driver because
RPM is detached before .suspend() is called and attached after
.resume().
Before suspend, G2D driver waits completion of all jobs running in H/W
and blocks all further jobs not to be pushed to H/W. The blocked jobs
are subsequently scheduled after wake-up.
The behavior G2D driver for suspend is also applied to shutdown except
the blocked jobs are never scheduled any more.

Change-Id: I2ed215219a2d02dfee507c731d4ed12ac4604eaa
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/gpu/exynos/g2d/g2d.h
drivers/gpu/exynos/g2d/g2d_drv.c
drivers/gpu/exynos/g2d/g2d_task.c
drivers/gpu/exynos/g2d/g2d_task.h