[PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function
This is part of the reset, move it into the reset function. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3c4755f3c116..8f2c1f71ed9a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5119,6 +5119,11 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, amdgpu_amdkfd_post_reset(adev); amdgpu_virt_release_full_gpu(adev, true); + /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */ + if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2) || + amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) || + amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3)) + amdgpu_ras_resume(adev); return 0; } @@ -5823,13 +5828,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, goto retry; if (r) adev->asic_reset_res = r; - - /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */ - if (amdgpu_ip_version(adev, GC_HWIP, 0) == - IP_VERSION(9, 4, 2) || - amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) || - amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3)) - amdgpu_ras_resume(adev); } else { r = amdgpu_do_asic_reset(device_list_handle, reset_context); if (r && r == -EAGAIN) -- 2.34.1
RE: [PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function
[AMD Official Use Only - General] Reviewed-by: Emily Deng Emily Deng Best Wishes >-Original Message- >From: Li, Yunxiang (Teddy) >Sent: Friday, April 26, 2024 11:58 AM >To: amd-gfx@lists.freedesktop.org >Cc: Deucher, Alexander ; Koenig, Christian >; Lazar, Lijo ; Kuehling, >Felix ; Deng, Emily ; Li, >Yunxiang (Teddy) >Subject: [PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function > >This is part of the reset, move it into the reset function. > >Signed-off-by: Yunxiang Li >--- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >index 3c4755f3c116..8f2c1f71ed9a 100644 >--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >@@ -5119,6 +5119,11 @@ static int amdgpu_device_reset_sriov(struct >amdgpu_device *adev, > amdgpu_amdkfd_post_reset(adev); > amdgpu_virt_release_full_gpu(adev, true); > >+ /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume >ras during reset */ >+ if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2) || >+ amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) || >+ amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3)) >+ amdgpu_ras_resume(adev); > return 0; > } > >@@ -5823,13 +5828,6 @@ int amdgpu_device_gpu_recover(struct >amdgpu_device *adev, > goto retry; > if (r) > adev->asic_reset_res = r; >- >- /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need >resume ras during reset */ >- if (amdgpu_ip_version(adev, GC_HWIP, 0) == >- IP_VERSION(9, 4, 2) || >- amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, >3) || >- amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, >0, 3)) >- amdgpu_ras_resume(adev); > } else { > r = amdgpu_do_asic_reset(device_list_handle, >reset_context); > if (r && r == -EAGAIN) >-- >2.34.1
RE: [PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function
[AMD Official Use Only - General] Reviewed-by: Zhigang Luo -Original Message- From: amd-gfx On Behalf Of Yunxiang Li Sent: Thursday, April 25, 2024 11:58 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Lazar, Lijo ; Kuehling, Felix ; Deng, Emily ; Li, Yunxiang (Teddy) Subject: [PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function This is part of the reset, move it into the reset function. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3c4755f3c116..8f2c1f71ed9a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5119,6 +5119,11 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, amdgpu_amdkfd_post_reset(adev); amdgpu_virt_release_full_gpu(adev, true); + /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */ + if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2) || + amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) || + amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3)) + amdgpu_ras_resume(adev); return 0; } @@ -5823,13 +5828,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, goto retry; if (r) adev->asic_reset_res = r; - - /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */ - if (amdgpu_ip_version(adev, GC_HWIP, 0) == - IP_VERSION(9, 4, 2) || - amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) || - amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3)) - amdgpu_ras_resume(adev); } else { r = amdgpu_do_asic_reset(device_list_handle, reset_context); if (r && r == -EAGAIN) -- 2.34.1