drm/amdgpu: don't read registers if gfxoff is enabled
Subsystems (2)
PATCH 1/1 drm/amdgpu: don't read registers if gfxoff is enabled
When gfxoff is enabled, accessing gfx registers via MMIO can lead to a hang.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3 -0
@@ -665,6 +665,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_fileif (info->read_mmr_reg.count >128 )return -EINVAL ; +if (adev->pm.pp_feature &PP_GFXOFF_MASK ) +return -EINVAL ; + regs =kmalloc_array (info->read_mmr_reg.count,sizeof (*regs),GFP_KERNEL );if (!regs)return -ENOMEM ;
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx