MLK-19400-2 drm/imx: sec-dsim_imx: alter 'rpm_suspended' to a counter
authorFancy Fang <chen.fang@nxp.com>
Wed, 29 Aug 2018 02:58:19 +0000 (10:58 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit13c6deed08544151e151be5fed240359724bc7f9
treea20acd77a65ad7f7dbf23908881c116ef97b12cf
parent2dc8c3926c46b796e69ad7706004099a73f7b221
MLK-19400-2 drm/imx: sec-dsim_imx: alter 'rpm_suspended' to a counter

Since the DSIM's runtime PM suspend() and resume() callbacks
are also called during system PM suspend() and resume(), it
is necessary to use a counter to record the suspended depth,
and 'rpm_suspended' field can be used as this purpose which
can help to detect and avoid runtime suspend and resume calls
mismatch caused problems, by changing the 'rpm_suspended' to
be an atomic integer from a boolean type.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 91a8e6c8f63db328fbc752b1659bdaa67ee5c8d5)
(cherry picked from commit 09f6ef5494d5fec7e3949bd80e4b51200b60dee3)
drivers/gpu/drm/imx/sec_mipi_dsim-imx.c