Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/powerplay: add an implementation for get_vce_clock_state (v3)

Used by the powerplay dpm code.

v2: update to the new API
v3: drop old include

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+16
+16
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
··· 821 821 return hwmgr->hwmgr_func->read_sensor(hwmgr, idx, value); 822 822 } 823 823 824 + static struct amd_vce_state* 825 + pp_dpm_get_vce_clock_state(void *handle, unsigned idx) 826 + { 827 + struct pp_hwmgr *hwmgr; 828 + 829 + if (handle) { 830 + hwmgr = ((struct pp_instance *)handle)->hwmgr; 831 + 832 + if (hwmgr && idx < hwmgr->num_vce_state_tables) 833 + return &hwmgr->vce_states[idx]; 834 + } 835 + 836 + return NULL; 837 + } 838 + 824 839 const struct amd_powerplay_funcs pp_dpm_funcs = { 825 840 .get_temperature = pp_dpm_get_temperature, 826 841 .load_firmware = pp_dpm_load_fw, ··· 862 847 .get_mclk_od = pp_dpm_get_mclk_od, 863 848 .set_mclk_od = pp_dpm_set_mclk_od, 864 849 .read_sensor = pp_dpm_read_sensor, 850 + .get_vce_clock_state = pp_dpm_get_vce_clock_state, 865 851 }; 866 852 867 853 static int amd_pp_instance_init(struct amd_pp_init *pp_init,