[PATCH 2/7] drm/amdgpu: avoid soft lockup when waiting for RLC serdes (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2017 at 10:13 PM, Pixel Ding <Pixel.Ding at amd.com> wrote:
> From: pding <Pixel.Ding at amd.com>
>
> Normally all waiting get timeout if there's one.
> Release the lock and return immediately when timeout happens.
>
> v2:
>  - set the se_sh to broadcase before return
>
> Signed-off-by: pding <Pixel.Ding at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++++++
>  2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 4a0cf53..e0b7876 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -3842,6 +3842,14 @@ static void gfx_v8_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
>                                         break;
>                                 udelay(1);
>                         }
> +                       if (k == adev->usec_timeout) {
> +                               gfx_v8_0_select_se_sh(adev, 0xffffffff,
> +                                                     0xffffffff, 0xffffffff);
> +                               mutex_unlock(&adev->grbm_idx_mutex);
> +                               DRM_INFO("Timeout wait for RLC serdes %u,%u\n",
> +                                        i, j);
> +                               return;
> +                       }
>                 }
>         }
>         gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 060a6ff..39b02e9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1628,6 +1628,14 @@ static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
>                                         break;
>                                 udelay(1);
>                         }
> +                       if (k == adev->usec_timeout) {
> +                               gfx_v9_0_select_se_sh(adev, 0xffffffff,
> +                                                     0xffffffff, 0xffffffff);
> +                               mutex_unlock(&adev->grbm_idx_mutex);
> +                               DRM_INFO("Timeout wait for RLC serdes %u,%u\n",
> +                                        i, j);
> +                               return;
> +                       }
>                 }
>         }
>         gfx_v9_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
> --
> 2.9.5
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux