Skip to contentSkip to conversation

drm/amdgpu: fix failure mapping legacy queue when FLR

PATCH In review Lin.Cao 2 participants 2 messages May 31, 2024

Subsystems (2)
lore
Share & tools
lore

Lin.Cao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix failure mapping legacy queue when FLR

Flag "mes.ring.shced.ready" will be set as true after mes hw init and set as false when mes hw fini to avoid duplicate initialization. But hw fini will not be called when function level reset, which will cause mes hw init be skipped during FLR, which will leads to mapping legacy queue fail. Set this flag as false when post reset will fix this issue.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -0
index a72683f83390..b56d243c53ab 100644
@@ -822,6 +822,8 @@ void amdgpu_virt_post_reset(struct amdgpu_device *adev)
 		 */
 		adev->gfx.is_poweron = false;
 	}
+
+	adev->mes.ring.sched.ready = false;
 }
 
 bool amdgpu_virt_fw_load_skip_check(struct amdgpu_device *adev, uint32_t ucode_id)
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Lin.Cao

Flag "mes.ring.shced.ready" will be set as true after mes hw init and set as false when mes hw fini to avoid duplicate initialization. But hw fini will not be called when function level reset, which will cause mes hw init be skipped during FLR, which will leads to mapping legacy queue fail. Set this flag as false when post reset will fix this issue.

Quoted 20 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -1
index a72683f83390..b56d243c53ab 100644
@@ -822,6 +822,8 @@ void amdgpu_virt_post_reset(struct amdgpu_device *adev)
                 */
                adev->gfx.is_poweron = false;
        }
+
+       adev->mes.ring.sched.ready = false;
 }
 
 bool amdgpu_virt_fw_load_skip_check(struct amdgpu_device *adev, uint32_t ucode_id)
--

2.25.1