Skip to contentSkip to conversation

drm/amdgpu: add status checking after fw is loaded

PATCH In review Huang Rui 2 participants 2 messages Aug 15, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: add status checking after fw is loaded

The status field must be 0 after FW is loaded.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7 -0
index 9f1a5bd..44bcd03 100644
@@ -131,6 +131,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		msleep(1);
 	}
 
+	/* the status field must be 0 after FW is loaded */
+	if (ucode && psp->cmd_buf_mem->resp.status) {
+		DRM_ERROR("failed loading with status (%d) and ucode id (%d)\n",
+			  psp->cmd_buf_mem->resp.status, ucode->ucode_id);
+		return -EINVAL;
+	}
+
 	return ret;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1534310502-11295-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org

#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Huang Rui <[email protected]>
Sent: Wednesday, August 15, 2018 1:21:42 AM
To: [email protected]
Cc: Huang, Ray
Subject: [PATCH] drm/amdgpu: add status checking after fw is loaded

The status field must be 0 after FW is loaded.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7 -0
index 9f1a5bd..44bcd03 100644
@@ -131,6 +131,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
                 msleep(1);
         }
 
+       /* the status field must be 0 after FW is loaded */
+       if (ucode && psp->cmd_buf_mem->resp.status) {
+               DRM_ERROR("failed loading with status (%d) and ucode id (%d)\n",
+                         psp->cmd_buf_mem->resp.status, ucode->ucode_id);
+               return -EINVAL;
+       }
+
         return ret;
 }
 

--
2.7.4

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx