From: Tom St Denis <tstdenis82-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] drm/amd/amdgpu: Fix debugfs wave reader
Date: Thu, 13 Oct 2016 12:16:49 -0400 [thread overview]
Message-ID: <20161013161649.8089-2-tom.stdenis@amd.com> (raw)
In-Reply-To: <20161013161649.8089-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
On non VI/CZ platforms it would not free
the grbm index lock.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 304f66ae484f..d141f7f6f225 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3025,13 +3025,14 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf,
data[x++] = wave_read_ind(adev, 0x2378, 0x2379, simd, wave, 0x14);
data[x++] = wave_read_ind(adev, 0x2378, 0x2379, simd, wave, 0x1A);
data[x++] = wave_read_ind(adev, 0x2378, 0x2379, simd, wave, 0x1B);
- } else {
- return -EINVAL;
}
amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
mutex_unlock(&adev->grbm_idx_mutex);
+ if (!x)
+ return -EINVAL;
+
while (size && (*pos < x * 4)) {
uint32_t value;
--
2.10.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2016-10-13 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 16:16 Fix lock imbalance in debugfs wave reader Tom St Denis
[not found] ` <20161013161649.8089-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2016-10-13 16:16 ` Tom St Denis [this message]
[not found] ` <20161013161649.8089-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2016-10-13 23:13 ` [PATCH] drm/amd/amdgpu: Fix " Alex Deucher
[not found] ` <CADnq5_PUtVDe_LTPcTDn_t5APuFz9J_x_aMCVBVF=rMLtnvTXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-14 9:33 ` 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=20161013161649.8089-2-tom.stdenis@amd.com \
--to=tstdenis82-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=tom.stdenis-5C7GfCeVMHo@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox