[PATCH 3/6] drm/amdgpu/dpm: add new callback to fetch vce clock table
Alex Deucher
alexdeucher at gmail.com
Fri Oct 7 18:28:22 UTC 2016
Will be used by the new info ioctl query.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 5 +++++
drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
index d06496d..b0c800d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
@@ -293,6 +293,7 @@ struct amdgpu_dpm_funcs {
int (*set_sclk_od)(struct amdgpu_device *adev, uint32_t value);
int (*get_mclk_od)(struct amdgpu_device *adev);
int (*set_mclk_od)(struct amdgpu_device *adev, uint32_t value);
+ struct drm_amdgpu_info_vce_clock_table (*get_vce_clock_table)(struct amdgpu_device *adev);
};
#define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev))
@@ -395,6 +396,10 @@ struct amdgpu_dpm_funcs {
#define amdgpu_dpm_dispatch_task(adev, event_id, input, output) \
(adev)->powerplay.pp_funcs->dispatch_tasks((adev)->powerplay.pp_handle, (event_id), (input), (output))
+#define amdgpu_dpm_get_vce_clock_table(adev) \
+ ((adev)->pp_enabled ? \
+ (adev)->powerplay.pp_funcs->get_vce_clock_table((adev)->powerplay.pp_handle) : \
+ (adev)->pm.funcs->get_vce_clock_table((adev)))
struct amdgpu_dpm {
struct amdgpu_ps *ps;
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
index 3fb5e57..057d3ca 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h
@@ -359,6 +359,7 @@ struct amd_powerplay_funcs {
int (*get_mclk_od)(void *handle);
int (*set_mclk_od)(void *handle, uint32_t value);
int (*read_sensor)(void *handle, int idx, int32_t *value);
+ struct drm_amdgpu_info_vce_clock_table (*get_vce_clock_table)(void *handle);
};
struct amd_powerplay {
--
2.5.5
More information about the amd-gfx
mailing list