Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1366b2d0 authored by pding's avatar pding Committed by Alex Deucher
Browse files

drm/amdgpu: avoid soft lockup when waiting for RLC serdes (v2)



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

Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarpding <Pixel.Ding@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9953b72f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3851,6 +3851,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);
+8 −0
Original line number Diff line number Diff line
@@ -1645,6 +1645,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);