aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2022-01-18 15:58:51 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-02-11 16:12:53 -0500
commit816d61d51a31bd16d0fec75526462dc987f09114 (patch)
tree552398ae4139c83e38479b68d3896e522649757a /drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
parentdrm/amd/pm: correct UMD pstate clocks for Dimgrey Cavefish and Beige Goby (diff)
downloadlinux-dev-816d61d51a31bd16d0fec75526462dc987f09114.tar.xz
linux-dev-816d61d51a31bd16d0fec75526462dc987f09114.zip
drm/amd/pm: fulfill the support for DriverSmuConfig table
Enable the support for DriverSmuConfig table on Navi1x and Sienna_Cichlid. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index 762b63365c36..358031c8c79e 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -475,6 +475,8 @@ static int sienna_cichlid_tables_init(struct smu_context *smu)
AMDGPU_GEM_DOMAIN_VRAM);
SMU_TABLE_INIT(tables, SMU_TABLE_ECCINFO, sizeof(EccInfoTable_t),
PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM);
+ SMU_TABLE_INIT(tables, SMU_TABLE_DRIVER_SMU_CONFIG, sizeof(DriverSmuConfigExternal_t),
+ PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM);
smu_table->metrics_table = kzalloc(sizeof(SmuMetricsExternal_t), GFP_KERNEL);
if (!smu_table->metrics_table)
@@ -492,10 +494,19 @@ static int sienna_cichlid_tables_init(struct smu_context *smu)
smu_table->ecc_table = kzalloc(tables[SMU_TABLE_ECCINFO].size, GFP_KERNEL);
if (!smu_table->ecc_table)
- return -ENOMEM;
+ goto err3_out;
+
+ smu_table->driver_smu_config_table =
+ kzalloc(tables[SMU_TABLE_DRIVER_SMU_CONFIG].size, GFP_KERNEL);
+ if (!smu_table->driver_smu_config_table)
+ goto err4_out;
return 0;
+err4_out:
+ kfree(smu_table->ecc_table);
+err3_out:
+ kfree(smu_table->watermarks_table);
err2_out:
kfree(smu_table->gpu_metrics_table);
err1_out: