drm/msm/a6xx: Use genpd notifier to ensure cx-gdsc collapse
authorAkhil P Oommen <quic_akhilpo@quicinc.com>
Mon, 2 Jan 2023 10:48:31 +0000 (16:18 +0530)
committerRob Clark <robdclark@chromium.org>
Mon, 20 Mar 2023 17:54:22 +0000 (10:54 -0700)
commitc11fa1204fe9405d2a82a714d021360b865cf8bc
tree1a9e50283f9ea3e7cfb97d54dabb49a9cacf1bde
parentd48430122509955bbf12a02964dc8ec514f66d8c
drm/msm/a6xx: Use genpd notifier to ensure cx-gdsc collapse

As per the recommended recovery sequence of adreno gpu, cx gdsc should
collapse at hardware before it is turned back ON. This helps to clear
out the stale states in hardware before it is reinitialized. Use the
genpd notifier along with the newly introduced
dev_pm_genpd_synced_poweroff() api to ensure that cx gdsc has collapsed
before we turn it back ON.

Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/516472/
Link: https://lore.kernel.org/r/20230102161757.v5.5.I9e10545c6a448d5eb1b734839b871d1b3146dac3@changeid
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/Kconfig
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
drivers/gpu/drm/msm/adreno/a6xx_gmu.h
drivers/gpu/drm/msm/adreno/a6xx_gpu.c