All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset
@ 2024-01-29 15:56 Alex Deucher
  2024-02-12 20:56 ` Deucher, Alexander
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2024-01-29 15:56 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

This avoids queries to read registers or query the SMU
for telemetry data while the GPU is in reset. This mirrors
what we already do for sysfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index a2df3025a754..d522e99c6f81 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -607,6 +607,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 	int i, found, ret;
 	int ui32_size = sizeof(ui32);
 
+	if (amdgpu_in_reset(adev))
+		return -EPERM;
+
 	if (!info->return_size || !info->return_pointer)
 		return -EINVAL;
 
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-15 14:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 15:56 [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset Alex Deucher
2024-02-12 20:56 ` Deucher, Alexander
2024-02-15  7:27   ` Christian König
2024-02-15 14:36     ` Alex Deucher
2024-02-15 14:43       ` Christian König
2024-02-15 14:46         ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.