[PATCH] drm/amd/amdgpu: disable GFXOFF around debugfs access to MMIO

Tom St Denis tom.stdenis at amd.com
Wed Feb 19 15:04:17 UTC 2020


Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 7379910790c9..66f763300c96 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -169,6 +169,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	if (pm_pg_lock)
 		mutex_lock(&adev->pm.mutex);
 
+	amdgpu_gfx_off_ctrl(adev, false);
 	while (size) {
 		uint32_t value;
 
@@ -192,6 +193,8 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	}
 
 end:
+	amdgpu_gfx_off_ctrl(adev, true);
+
 	if (use_bank) {
 		amdgpu_gfx_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
 		mutex_unlock(&adev->grbm_idx_mutex);
-- 
2.24.1



More information about the amd-gfx mailing list