* Fix lock imbalance in debugfs wave reader
@ 2016-10-13 16:16 Tom St Denis
[not found] ` <20161013161649.8089-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tom St Denis @ 2016-10-13 16:16 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
I introduced a lock imbalance in the debugfs wave reader. This patch fixes that.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <20161013161649.8089-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>]
* [PATCH] drm/amd/amdgpu: Fix debugfs wave reader [not found] ` <20161013161649.8089-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org> @ 2016-10-13 16:16 ` Tom St Denis [not found] ` <20161013161649.8089-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Tom St Denis @ 2016-10-13 16:16 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <20161013161649.8089-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amd/amdgpu: Fix debugfs wave reader [not found] ` <20161013161649.8089-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org> @ 2016-10-13 23:13 ` Alex Deucher [not found] ` <CADnq5_PUtVDe_LTPcTDn_t5APuFz9J_x_aMCVBVF=rMLtnvTXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Alex Deucher @ 2016-10-13 23:13 UTC (permalink / raw) To: Tom St Denis; +Cc: Tom St Denis, amd-gfx list On Thu, Oct 13, 2016 at 12:16 PM, Tom St Denis <tstdenis82@gmail.com> wrote: > On non VI/CZ platforms it would not free > the grbm index lock. > > Signed-off-by: Tom St Denis <tom.stdenis@amd.com> > --- Reviewed-by: Alex Deucher <alexander.deucher@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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CADnq5_PUtVDe_LTPcTDn_t5APuFz9J_x_aMCVBVF=rMLtnvTXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] drm/amd/amdgpu: Fix debugfs wave reader [not found] ` <CADnq5_PUtVDe_LTPcTDn_t5APuFz9J_x_aMCVBVF=rMLtnvTXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-10-14 9:33 ` Christian König 0 siblings, 0 replies; 4+ messages in thread From: Christian König @ 2016-10-14 9:33 UTC (permalink / raw) To: Alex Deucher, Tom St Denis; +Cc: Tom St Denis, amd-gfx list Am 14.10.2016 um 01:13 schrieb Alex Deucher: > On Thu, Oct 13, 2016 at 12:16 PM, Tom St Denis <tstdenis82@gmail.com> wrote: >> On non VI/CZ platforms it would not free >> the grbm index lock. >> >> Signed-off-by: Tom St Denis <tom.stdenis@amd.com> >> --- > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@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 > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-14 9:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] drm/amd/amdgpu: Fix " Tom St Denis
[not found] ` <20161013161649.8089-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2016-10-13 23:13 ` Alex Deucher
[not found] ` <CADnq5_PUtVDe_LTPcTDn_t5APuFz9J_x_aMCVBVF=rMLtnvTXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-14 9:33 ` Christian König
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox