[PATCH v3 11/16] drm/msm: Inhibit IFPC for state snapshot

From: Rob Clark

Date: Thu Oct 29 2026 - 16:19:15 EST


We need the GPU to stay awake for this.

Signed-off-by: Rob Clark <robin.clark@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/msm_debugfs.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
index f12701e286ec..f068315541e8 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -86,7 +86,17 @@ static int msm_gpu_open(struct inode *inode, struct file *file)

pm_runtime_get_sync(&gpu->pdev->dev);
msm_gpu_hw_init(gpu);
+
+ /* Inhibit IFPC while accessing registers: */
+ if (gpu->funcs->sysprof_setup)
+ gpu->funcs->sysprof_setup(gpu, true);
+
show_priv->state = gpu->funcs->gpu_state_get(gpu);
+
+ /* Re-enable IFPC: */
+ if (gpu->funcs->sysprof_setup)
+ gpu->funcs->sysprof_setup(gpu, false);
+
pm_runtime_put_sync(&gpu->pdev->dev);

mutex_unlock(&gpu->lock);
--
2.56.0