diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1382-drm-amd-powerplay-add-function-to-set-tool-table-loc.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1382-drm-amd-powerplay-add-function-to-set-tool-table-loc.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1382-drm-amd-powerplay-add-function-to-set-tool-table-loc.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1382-drm-amd-powerplay-add-function-to-set-tool-table-loc.patch new file mode 100644 index 00000000..33e42004 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1382-drm-amd-powerplay-add-function-to-set-tool-table-loc.patch @@ -0,0 +1,76 @@ +From ee7055f551ba95c20792f76a7502c65b075e4932 Mon Sep 17 00:00:00 2001 +From: Likun Gao <Likun.Gao@amd.com> +Date: Wed, 12 Dec 2018 19:42:53 +0800 +Subject: [PATCH 1382/2940] drm/amd/powerplay: add function to set tool table + location for smu11 (v2) + +Add smu_v11_0_set_tool_table_location function for smu11. + +v2: fix the missed TABLE_PMSTATUSLOG bo creation which caused AGM hung. (Ray) + +Signed-off-by: Likun Gao <Likun.Gao@amd.com> +Reviewed-by: Huang Rui <ray.huang@amd.com> +Reviewed-by: Kevin Wang <Kevin1.Wang@amd.com> +Acked-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +index 8553c47bbac6..c0ff55f31954 100644 +--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c ++++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +@@ -41,6 +41,8 @@ + + MODULE_FIRMWARE("amdgpu/vega20_smc.bin"); + ++#define SMU11_TOOL_SIZE 0x19000 ++ + static int smu_v11_0_send_msg_without_waiting(struct smu_context *smu, + uint16_t msg) + { +@@ -288,6 +290,8 @@ static int smu_v11_0_init_smc_tables(struct smu_context *smu) + PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); + SMU_TABLE_INIT(tables, TABLE_OVERDRIVE, sizeof(OverDriveTable_t), + PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); ++ SMU_TABLE_INIT(tables, TABLE_PMSTATUSLOG, SMU11_TOOL_SIZE, PAGE_SIZE, ++ AMDGPU_GEM_DOMAIN_VRAM); + + ret = smu_v11_0_init_dpm_context(smu); + if (ret) +@@ -630,6 +634,24 @@ static int smu_v11_0_set_min_dcef_deep_sleep(struct smu_context *smu) + return ret; + } + ++static int smu_v11_0_set_tool_table_location(struct smu_context *smu) ++{ ++ int ret = 0; ++ struct smu_table *tool_table = &smu->smu_table.tables[TABLE_PMSTATUSLOG]; ++ ++ if (tool_table->mc_address) { ++ ret = smu_send_smc_msg_with_param(smu, ++ PPSMC_MSG_SetToolsDramAddrHigh, ++ upper_32_bits(tool_table->mc_address)); ++ if (!ret) ++ ret = smu_send_smc_msg_with_param(smu, ++ PPSMC_MSG_SetToolsDramAddrLow, ++ lower_32_bits(tool_table->mc_address)); ++ } ++ ++ return ret; ++} ++ + static const struct smu_funcs smu_v11_0_funcs = { + .init_microcode = smu_v11_0_init_microcode, + .load_microcode = smu_v11_0_load_microcode, +@@ -650,6 +672,7 @@ static const struct smu_funcs smu_v11_0_funcs = { + .populate_smc_pptable = smu_v11_0_populate_smc_pptable, + .write_pptable = smu_v11_0_write_pptable, + .set_min_dcef_deep_sleep = smu_v11_0_set_min_dcef_deep_sleep, ++ .set_tool_table_location = smu_v11_0_set_tool_table_location, + }; + + void smu_v11_0_set_smu_funcs(struct smu_context *smu) +-- +2.17.1 + |