drm/amdgpu: fix printing empty string array
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix printing empty string array
Fix printing empty string array.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +3 -2
@@ -128,8 +128,9 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,"for process %s pid %d thread %s pid %d)\n" , entry->vmid_src ?"mmhub" :"gfxhub" , entry->src_id, entry->ring_id, entry->vmid, - entry->pasid, task_info.process_name, task_info.tgid, - task_info.task_name, task_info.pid); + entry->pasid, + task_info.process_name[0 ] ? task_info.process_name :"NULL" , task_info.tgid, + task_info.task_name[0] ? task_info.task_name : "NULL", task_info.pid);dev_err (adev->dev," in page starting at address 0x%016llx from client %d\n" , addr, entry->client_id);if (!amdgpu_sriov_vf (adev))
Signature · 1 line
2.34.1
PATCH 2/2 drm/amdgpu: fix incorrect vmhub index
Fix incorrect vmhub index.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +4 -1
@@ -97,10 +97,13 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; + struct amdgpu_vmhub *hub;uint32_t status =0 ;u64 addr; + hub = entry->vmid_src ? + &adev->vmhub[AMDGPU_MMHUB0 (0 )] : &adev->vmhub[AMDGPU_GFXHUB (0 )]; + addr = (u64 )entry->src_data[0 ] <<12 ; addr |= ((u64 )entry->src_data[1 ] &0xf ) <<44 ;
Signature · 1 line
2.34.1
RE: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
[AMD Official Use Only - General]
Please apply the same change to gmc_v10_0_process_interrupt.
Might be better to check the client_id == VMC to decide vmhub.
Regards,
Hawking
-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, July 20, 2023 13:42
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
Fix incorrect vmhub index.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +4 -2
@@ -97,10 +97,13 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; + struct amdgpu_vmhub *hub;uint32_t status =0 ;u64 addr; + hub = entry->vmid_src ? + &adev->vmhub[AMDGPU_MMHUB0 (0 )] : &adev->vmhub[AMDGPU_GFXHUB (0 )]; + addr = (u64 )entry->src_data[0 ] <<12 ; addr |= ((u64 )entry->src_data[1 ] &0xf ) <<44 ; --
2.34.1
RE: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
[AMD Official Use Only - General]
OK, will do.
-----------------
Best Regards,
Thomas
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Thursday, July 20, 2023 1:44 PM
To: Chai, Thomas <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Yang, Stanley <[email protected]>
Subject: RE: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
[AMD Official Use Only - General]
Please apply the same change to gmc_v10_0_process_interrupt.
Might be better to check the client_id == VMC to decide vmhub.
Regards,
Hawking
-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, July 20, 2023 13:42
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
Fix incorrect vmhub index.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +4 -2
@@ -97,10 +97,13 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; + struct amdgpu_vmhub *hub;uint32_t status =0 ;u64 addr; + hub = entry->vmid_src ? + &adev->vmhub[AMDGPU_MMHUB0 (0 )] : &adev->vmhub[AMDGPU_GFXHUB (0 )]; + addr = (u64 )entry->src_data[0 ] <<12 ; addr |= ((u64 )entry->src_data[1 ] &0xf ) <<44 ; --
2.34.1