[PATCH] drm/amd/amdgpu: Fix debugfs wave reader

Christian König deathsimple at vodafone.de
Fri Oct 14 09:33:57 UTC 2016


Am 14.10.2016 um 01:13 schrieb Alex Deucher:
> On Thu, Oct 13, 2016 at 12:16 PM, Tom St Denis <tstdenis82 at gmail.com> wrote:
>> On non VI/CZ platforms it would not free
>> the grbm index lock.
>>
>> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
>> ---
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Christian König <christian.koenig at 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 at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




More information about the amd-gfx mailing list