> -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf > Of Pixel Ding > Sent: Monday, October 23, 2017 6:03 AM > To: amd-gfx at lists.freedesktop.org > Cc: Sun, Gary; Ding, Pixel; Li, Bingley > Subject: [PATCH 3/7] drm/amdgpu: avoid soft lockup when waiting for RLC > serdes > > 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. > > Signed-off-by: pding <Pixel.Ding at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++++++ > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > index fd38cb1..61753a3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > @@ -3842,6 +3842,12 @@ static void gfx_v8_0_wait_for_rlc_serdes(struct > amdgpu_device *adev) > break; > udelay(1); > } > + if (k == adev->usec_timeout) { Please reset the se_sh to broadcast here as well. 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 50124ab..a2c67f6 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > @@ -1628,6 +1628,12 @@ static void gfx_v9_0_wait_for_rlc_serdes(struct > amdgpu_device *adev) > break; > udelay(1); > } > + if (k == adev->usec_timeout) { Same here. > + 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