From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset
Date: Mon, 29 Jan 2024 10:56:21 -0500 [thread overview]
Message-ID: <20240129155621.824237-1-alexander.deucher@amd.com> (raw)
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
next reply other threads:[~2024-01-29 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 15:56 Alex Deucher [this message]
2024-02-12 20:56 ` [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240129155621.824237-1-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.