aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch
new file mode 100644
index 00000000..79bc23e5
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0996-drm-amdgpu-psp-Fix-can-t-detect-psp-INVOKE-command-f.patch
@@ -0,0 +1,47 @@
+From 85666757ff4cec6bcb391bffa22129382aba51c5 Mon Sep 17 00:00:00 2001
+From: Xiangliang Yu <Xiangliang.Yu@amd.com>
+Date: Thu, 13 Dec 2018 15:34:12 +0800
+Subject: [PATCH 0996/2940] drm/amdgpu/psp: Fix can't detect psp INVOKE command
+ failed
+
+There isn't ucode when executing INVOKE command, so current code can't
+check the failure of INVOKE command.
+
+Remove the ucode check.
+
+Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
+Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+index 96b6ddc5f423..3af2a0d5f7e9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+@@ -148,10 +148,16 @@ psp_cmd_submit_buf(struct psp_context *psp,
+ * during psp initialization to avoid breaking hw_init and it doesn't
+ * return -EINVAL.
+ */
+- if (ucode && psp->cmd_buf_mem->resp.status) {
+- DRM_WARN("failed loading with status (%d) and ucode id (%d)\n",
+- psp->cmd_buf_mem->resp.status, ucode->ucode_id);
+- }
++
++ /* the status field must be 0 after psp command completion */
++ if (psp->cmd_buf_mem->resp.status) {
++ if (ucode)
++ DRM_ERROR("failed to load ucode id (%d) ",
++ ucode->ucode_id);
++ DRM_ERROR("psp command failed and response status is (%d)\n",
++ psp->cmd_buf_mem->resp.status);
++ return -EINVAL;
++ }
+
+ /* get xGMI session id from response buffer */
+ cmd->resp.session_id = psp->cmd_buf_mem->resp.session_id;
+--
+2.17.1
+