summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Liu <aaron.liu@amd.com>2021-01-25 14:06:01 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-06-04 16:03:15 -0400
commita885bea764f58739a92b0fb20780105795ca5e4e (patch)
treed85fdfcd6c4e28f1446d1c3cac37fbe23ebdf0ef
parent999dc9c520671b4c2247626c1d44318691896c25 (diff)
downloadlinux-a885bea764f58739a92b0fb20780105795ca5e4e.tar.bz2
drm/amdgpu/pm: enable gfx_off in yellow carp smu post init
Enable gfx_off in smu_late_init for yellow carp. Signed-off-by: Aaron Liu <aaron.liu@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
index af3db91d609e..1e83adad556a 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
@@ -140,6 +140,18 @@ static bool yellow_carp_is_dpm_running(struct smu_context *smu)
}
+static int yellow_carp_post_smu_init(struct smu_context *smu)
+{
+ struct amdgpu_device *adev = smu->adev;
+ int ret = 0;
+
+ /* allow message will be sent after enable message on Yellow Carp*/
+ ret = smu_cmn_send_smc_msg(smu, SMU_MSG_EnableGfxOff, NULL);
+ if (ret)
+ dev_err(adev->dev, "Failed to Enable GfxOff!\n");
+ return ret;
+}
+
static const struct pptable_funcs yellow_carp_ppt_funcs = {
.check_fw_status = smu_v13_0_1_check_fw_status,
.check_fw_version = smu_v13_0_1_check_fw_version,
@@ -153,6 +165,7 @@ static const struct pptable_funcs yellow_carp_ppt_funcs = {
.get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
.set_driver_table_location = smu_v13_0_1_set_driver_table_location,
.gfx_off_control = smu_v13_0_1_gfx_off_control,
+ .post_init = yellow_carp_post_smu_init,
};
void yellow_carp_set_ppt_funcs(struct smu_context *smu)