aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch
new file mode 100644
index 00000000..4a71ebc9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2267-drm-amd-powerplay-smu-needs-to-be-initialized-after-.patch
@@ -0,0 +1,47 @@
+From 7d0aa70782eaf5cdf7f1ad20d207f07855ffb8d3 Mon Sep 17 00:00:00 2001
+From: Huang Rui <ray.huang@amd.com>
+Date: Wed, 20 Feb 2019 20:05:11 +0800
+Subject: [PATCH 2267/2940] drm/amd/powerplay: smu needs to be initialized
+ after rlc in direct mode
+
+For gfx 10, rlc firmware loading relies on smu firmware is loaded firstly, so in
+direct type, it has to load smc ucode here before rlc. And meanwhile, the smu
+initialization has to move after rlc, otherwise, smu message will get failure
+during the handshake with rlc and smu.
+
+Signed-off-by: Huang Rui <ray.huang@amd.com>
+Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+index 88fd79d5aca6..b9b56ec1aacf 100644
+--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
++++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+@@ -820,16 +820,12 @@ static int smu_hw_init(void *handle)
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ struct smu_context *smu = &adev->smu;
+
+- if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
+- ret = smu_load_microcode(smu);
+- if (ret)
++ if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
++ ret = smu_check_fw_status(smu);
++ if (ret) {
++ pr_err("SMC firmware status is not correct\n");
+ return ret;
+- }
+-
+- ret = smu_check_fw_status(smu);
+- if (ret) {
+- pr_err("SMC firmware status is not correct\n");
+- return ret;
++ }
+ }
+
+ mutex_lock(&smu->mutex);
+--
+2.17.1
+