aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch
new file mode 100644
index 00000000..cb2e1dd4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4641-drm-amdgpu-load-np-fw-prior-before-loading-the-TAs.patch
@@ -0,0 +1,106 @@
+From 3e741d06ad7e1011e809c9427f2be3b830167730 Mon Sep 17 00:00:00 2001
+From: Hawking Zhang <Hawking.Zhang@amd.com>
+Date: Mon, 2 Dec 2019 13:44:38 +0800
+Subject: [PATCH 4641/4736] drm/amdgpu: load np fw prior before loading the TAs
+
+Platform TAs will independently toggle DF Cstate.
+for instance, get/set topology from xgmi ta. do error
+injection from ras ta. In such case, PMFW needs to be
+loaded before TAs so that all the subsequent Cstate
+calls recieved by PSP FW can be routed to PMFW.
+
+Change-Id: I2e24b05d083349963b48674581a265bbceea1ecd
+Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Acked-by: Evan Quan <evan.quan@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 66 ++++++++++++-------------
+ 1 file changed, 33 insertions(+), 33 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+index fe2b24e98268..728f53ea2ad6 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+@@ -1233,39 +1233,6 @@ static int psp_hw_start(struct psp_context *psp)
+ return ret;
+ }
+
+- ret = psp_asd_load(psp);
+- if (ret) {
+- DRM_ERROR("PSP load asd failed!\n");
+- return ret;
+- }
+-
+- if (adev->gmc.xgmi.num_physical_nodes > 1) {
+- ret = psp_xgmi_initialize(psp);
+- /* Warning the XGMI seesion initialize failure
+- * Instead of stop driver initialization
+- */
+- if (ret)
+- dev_err(psp->adev->dev,
+- "XGMI: Failed to initialize XGMI session\n");
+- }
+-
+- if (psp->adev->psp.ta_fw) {
+- ret = psp_ras_initialize(psp);
+- if (ret)
+- dev_err(psp->adev->dev,
+- "RAS: Failed to initialize RAS\n");
+-
+- ret = psp_hdcp_initialize(psp);
+- if (ret)
+- dev_err(psp->adev->dev,
+- "HDCP: Failed to initialize HDCP\n");
+-
+- ret = psp_dtm_initialize(psp);
+- if (ret)
+- dev_err(psp->adev->dev,
+- "DTM: Failed to initialize DTM\n");
+- }
+-
+ return 0;
+ }
+
+@@ -1581,6 +1548,39 @@ static int psp_load_fw(struct amdgpu_device *adev)
+ if (ret)
+ goto failed;
+
++ ret = psp_asd_load(psp);
++ if (ret) {
++ DRM_ERROR("PSP load asd failed!\n");
++ return ret;
++ }
++
++ if (adev->gmc.xgmi.num_physical_nodes > 1) {
++ ret = psp_xgmi_initialize(psp);
++ /* Warning the XGMI seesion initialize failure
++ * Instead of stop driver initialization
++ */
++ if (ret)
++ dev_err(psp->adev->dev,
++ "XGMI: Failed to initialize XGMI session\n");
++ }
++
++ if (psp->adev->psp.ta_fw) {
++ ret = psp_ras_initialize(psp);
++ if (ret)
++ dev_err(psp->adev->dev,
++ "RAS: Failed to initialize RAS\n");
++
++ ret = psp_hdcp_initialize(psp);
++ if (ret)
++ dev_err(psp->adev->dev,
++ "HDCP: Failed to initialize HDCP\n");
++
++ ret = psp_dtm_initialize(psp);
++ if (ret)
++ dev_err(psp->adev->dev,
++ "DTM: Failed to initialize DTM\n");
++ }
++
+ return 0;
+
+ failed:
+--
+2.17.1
+