drm/amdgpu: exit directly if gpu reset fails
Subsystems (2)
PATCH 1/2 drm/amdgpu: exit directly if gpu reset fails
No need to perform the full reset operation in case of gpu reset failure.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -5075,7 +5075,7 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,if (r) {dev_err (tmp_adev->dev,"ASIC reset failed with error, %d for drm dev, %s" , r,adev_to_drm (tmp_adev)->unique); -break ; + goto out; } }
Signature · 1 line
2.35.1
PATCH 2/2 drm/amdgpu: update retry times for psp vmbx wait
Increase the retry loops and replace the constant number with macro.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +4 -1
@@ -59,6 +59,9 @@ MODULE_FIRMWARE("amdgpu/psp_14_0_0_ta.bin");/* Read USB-PD from LFB */ #define GFX_CMD_USB_PD_USE_LFB 0x480 +/* Retry times for vmbx ready wait */ +#define PSP_VMBX_POLLING_LIMIT 20000 +/* VBIOS gfl defines */ #define MBOX_READY_MASK 0x80000000#define MBOX_STATUS_MASK 0x0000FFFF
@@ -138,7 +141,7 @@ static int psp_v13_0_wait_for_vmbx_ready(struct psp_context *psp)struct amdgpu_device *adev = psp->adev;int retry_loop, ret; -for (retry_loop =0 ; retry_loop <70 ; retry_loop++) { +for (retry_loop =0 ; retry_loop <PSP_VMBX_POLLING_LIMIT ; retry_loop++) {/* Wait for bootloader to signify that is ready having bit 31 of C2PMSG_33 set to 1 */ ret = psp_wait_for(
Signature · 1 line
2.35.1
RE: [PATCH 2/2] drm/amdgpu: update retry times for psp vmbx wait
[AMD Official Use Only - General]
Series is Reviewed-by: Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, September 27, 2023 18:20
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: update retry times for psp vmbx wait
Increase the retry loops and replace the constant number with macro.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +4 -1
@@ -59,6 +59,9 @@ MODULE_FIRMWARE("amdgpu/psp_14_0_0_ta.bin");/* Read USB-PD from LFB */ #define GFX_CMD_USB_PD_USE_LFB 0x480 +/* Retry times for vmbx ready wait */ +#define PSP_VMBX_POLLING_LIMIT 20000 +/* VBIOS gfl defines */ #define MBOX_READY_MASK 0x80000000#define MBOX_STATUS_MASK 0x0000FFFF
@@ -138,7 +141,7 @@ static int psp_v13_0_wait_for_vmbx_ready(struct psp_context *psp)struct amdgpu_device *adev = psp->adev;int retry_loop, ret; -for (retry_loop =0 ; retry_loop <70 ; retry_loop++) { +for (retry_loop =0 ; retry_loop <PSP_VMBX_POLLING_LIMIT ; retry_loop++) {/* Wait for bootloader to signify that is ready having bit 31 of C2PMSG_33 set to 1 */ ret = psp_wait_for(
--
2.35.1