diff options
author | Huang Rui | 2019-03-29 11:07:23 +0100 |
---|---|---|
committer | Alex Deucher | 2019-06-22 01:59:26 +0200 |
commit | cdb0c632e4d0a6e882e585f458cb3448799d8ed7 (patch) | |
tree | b8aeab8d340dc3c0d3ac988d7bde2ae1ba7b1144 /drivers/gpu/drm/amd/powerplay/smu_v11_0.c | |
parent | drm/amd/powerplay: introduce smu table id type to handle the smu table for ea... (diff) | |
download | kernel-qcow2-linux-cdb0c632e4d0a6e882e585f458cb3448799d8ed7.tar.gz kernel-qcow2-linux-cdb0c632e4d0a6e882e585f458cb3448799d8ed7.tar.xz kernel-qcow2-linux-cdb0c632e4d0a6e882e585f458cb3448799d8ed7.zip |
drm/amd/powerplay: init table_count for smu tables on asic level
TABLE_COUNT should be inited in asic level. Because the value may be different
on each asic even on the same ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index 0d096e899928..e6f166a4a672 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -400,15 +400,15 @@ static int smu_v11_0_init_smc_tables(struct smu_context *smu) struct smu_table *tables = NULL; int ret = 0; - if (smu_table->tables || smu_table->table_count != 0) + if (smu_table->tables || smu_table->table_count == 0) return -EINVAL; - tables = kcalloc(TABLE_COUNT, sizeof(struct smu_table), GFP_KERNEL); + tables = kcalloc(SMU_TABLE_COUNT, sizeof(struct smu_table), + GFP_KERNEL); if (!tables) return -ENOMEM; smu_table->tables = tables; - smu_table->table_count = TABLE_COUNT; SMU_TABLE_INIT(tables, TABLE_PPTABLE, sizeof(PPTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); |