[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>