On Thu, Oct 13, 2016 at 12:16 PM, Tom St Denis <tstdeni...@gmail.com> wrote:
> On non VI/CZ platforms it would not free
> the grbm index lock.
>
> Signed-off-by: Tom St Denis <tom.stde...@amd.com>
> ---

Reviewed-by: Alex Deucher <alexander.deuc...@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

Reply via email to