diff options
author | Likun Gao | 2018-12-18 15:56:48 +0100 |
---|---|---|
committer | Alex Deucher | 2019-03-19 21:03:56 +0100 |
commit | 3e333c6ca1f5e82aa0024dca4015ca1aa69b222b (patch) | |
tree | 9f9019c6ee90e47f8fd2629302c4a13830ad3c1a /drivers/gpu/drm/amd/powerplay/smu_v11_0.c | |
parent | drm/amd/powerplay: add vega20 pptable function file (diff) | |
download | kernel-qcow2-linux-3e333c6ca1f5e82aa0024dca4015ca1aa69b222b.tar.gz kernel-qcow2-linux-3e333c6ca1f5e82aa0024dca4015ca1aa69b222b.tar.xz kernel-qcow2-linux-3e333c6ca1f5e82aa0024dca4015ca1aa69b222b.zip |
drm/amd/powerplay: add function to parse pptable for smu11
Add smu_v11_0_parse_pptable function for smu11.
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index 65e5641d5299..826fd6e9b007 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -486,6 +486,25 @@ static int smu_v11_0_notify_memory_pool_location(struct smu_context *smu) return ret; } +static int smu_v11_0_parse_pptable(struct smu_context *smu) +{ + int ret; + + struct smu_table_context *table_context = &smu->smu_table; + + if (table_context->driver_pptable) + return -EINVAL; + + table_context->driver_pptable = kzalloc(sizeof(PPTable_t), GFP_KERNEL); + + if (!table_context->driver_pptable) + return -ENOMEM; + + ret = smu_store_powerplay_table(smu); + + 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, @@ -501,6 +520,7 @@ static const struct smu_funcs smu_v11_0_funcs = { .get_vbios_bootup_values = smu_v11_0_get_vbios_bootup_values, .get_clk_info_from_vbios = smu_v11_0_get_clk_info_from_vbios, .notify_memory_pool_location = smu_v11_0_notify_memory_pool_location, + .parse_pptable = smu_v11_0_parse_pptable, }; void smu_v11_0_set_smu_funcs(struct smu_context *smu) |