diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/3598-drm-amd-pp-Add-debug-info-when-smu-failed-on-Vega10.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/3598-drm-amd-pp-Add-debug-info-when-smu-failed-on-Vega10.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/3598-drm-amd-pp-Add-debug-info-when-smu-failed-on-Vega10.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/3598-drm-amd-pp-Add-debug-info-when-smu-failed-on-Vega10.patch new file mode 100644 index 00000000..e04ef969 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/3598-drm-amd-pp-Add-debug-info-when-smu-failed-on-Vega10.patch @@ -0,0 +1,81 @@ +From d12d967775081e37ab886572de3ad159de5c4ab2 Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Thu, 22 Feb 2018 16:50:57 +0800 +Subject: [PATCH 3598/4131] drm/amd/pp: Add debug info when smu failed on + Vega10 + +When smu msssage failed, print out return value in dmesg. + +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +index 0f76a54..b4c487f 100644 +--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c ++++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +@@ -83,13 +83,17 @@ static bool vega10_is_smc_ram_running(struct pp_hwmgr *hwmgr) + static uint32_t vega10_wait_for_response(struct pp_hwmgr *hwmgr) + { + uint32_t reg; ++ uint32_t ret; + + reg = soc15_get_register_offset(MP1_HWID, 0, + mmMP1_SMN_C2PMSG_90_BASE_IDX, mmMP1_SMN_C2PMSG_90); + +- phm_wait_for_register_unequal(hwmgr, reg, ++ ret = phm_wait_for_register_unequal(hwmgr, reg, + 0, MP1_C2PMSG_90__CONTENT_MASK); + ++ if (ret) ++ pr_err("No response from smu\n"); ++ + return cgs_read_register(hwmgr->device, reg); + } + +@@ -120,6 +124,7 @@ int vega10_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr, + int vega10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg) + { + uint32_t reg; ++ uint32_t ret; + + vega10_wait_for_response(hwmgr); + +@@ -129,8 +134,9 @@ int vega10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg) + + vega10_send_msg_to_smc_without_waiting(hwmgr, msg); + +- if (vega10_wait_for_response(hwmgr) != 1) +- pr_err("Failed to send message: 0x%x\n", msg); ++ ret = vega10_wait_for_response(hwmgr); ++ if (ret != 1) ++ pr_err("Failed to send message: 0x%x, ret value: 0x%x\n", msg, ret); + + return 0; + } +@@ -146,6 +152,7 @@ int vega10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr, + uint16_t msg, uint32_t parameter) + { + uint32_t reg; ++ uint32_t ret; + + vega10_wait_for_response(hwmgr); + +@@ -159,8 +166,9 @@ int vega10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr, + + vega10_send_msg_to_smc_without_waiting(hwmgr, msg); + +- if (vega10_wait_for_response(hwmgr) != 1) +- pr_err("Failed to send message: 0x%x\n", msg); ++ ret = vega10_wait_for_response(hwmgr); ++ if (ret != 1) ++ pr_err("Failed to send message: 0x%x, ret value: 0x%x\n", msg, ret); + + return 0; + } +-- +2.7.4 + |