Hi Christian,
I used smu7_hwmgr for all the asics of smu version 7 , CI and Vi. Please see powerplay code refactoring patches. But some functions in the table were different between those asics. so we needed to overload those functions for some asics. for example: from tonga. we used pptable version 1, but ci and iceland, no pptable, so needed to overload related functions: hwmgr->hwmgr_func = &smu7_hwmgr_funcs; hwmgr->pptable_func = &pptable_v1_0_funcs; pp_smu7_thermal_initialize(hwmgr); + if (hwmgr->pp_table_version == PP_TABLE_V0) { + hwmgr->hwmgr_func->get_pp_table_entry = &smu7_get_pp_table_entry_v0; + hwmgr->hwmgr_func->get_num_of_pp_table_entries = smu7_get_number_of_powerplay_table_entries_v0; + hwmgr->pptable_func = &pptable_funcs; + } Best Regards Rex ________________________________ From: Christian König <deathsim...@vodafone.de> Sent: Friday, September 9, 2016 10:23:26 PM To: Zhu, Rex; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 0/9] misc patches related to powerplay Patch #1-#7 and #9 are Acked-by: Christian König <christian.koe...@amd.com>. Patch #8: That looks fishy, usually we don't want to override static functions tables. So what is the specific use case here? Regards, Christian. Am 09.09.2016 um 15:37 schrieb Rex Zhu: > Rex Zhu (9): > drm/amd/powerplay: mark symbols static where possible on tonga. > drm/amd/powerplay: add feature flags in hwmgr to enable/disable > special features. > drm/amd/powerplay: add module parameter for mask pp feature > drm/amd/powerplay: initialize platform caps in hwmgr_init. > drm/amd/powerplay: add common functiones for visiting pp table. > drm/amd/powerplay: wrap get evv voltage of fiji and polaris > drm/amd/powerplay: move smu related variable definitions to smumgr. > drm/amd/powerplay: delete const flag of hwmgr_funcs for overload. > drm/amd/powerplay: delete dupicated function and definition. > > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 + > drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +- > drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +- > .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 34 ---- > drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 186 > ++++++++++++++++++--- > .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 10 +- > .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 7 +- > .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 5 +- > .../drm/amd/powerplay/hwmgr/polaris10_powertune.h | 13 -- > drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 21 +-- > .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 1 - > drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 32 +++- > .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 - > .../drm/amd/powerplay/smumgr/polaris10_smumgr.h | 20 +++ > drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 + > 16 files changed, 229 insertions(+), 111 deletions(-) >
_______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx