summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
diff options
context:
space:
mode:
authorLikun Gao2019-01-18 09:15:14 +0100
committerAlex Deucher2019-03-19 21:04:00 +0100
commite9c5b46e3c50f58403aeca6d6419b9235d2518b2 (patch)
tree4a784a14f84124d565f48a6c0c1949b15b1ff5ad /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
parentdrm/amd/powerplay: add function to update overdrive settings (diff)
downloadkernel-qcow2-linux-e9c5b46e3c50f58403aeca6d6419b9235d2518b2.tar.gz
kernel-qcow2-linux-e9c5b46e3c50f58403aeca6d6419b9235d2518b2.tar.xz
kernel-qcow2-linux-e9c5b46e3c50f58403aeca6d6419b9235d2518b2.zip
drm/amd/powerplay: add sys interface for set sclk_od/mclk_od for smu
Add sys interface for set pp_sclk_od and pp_mclk_od for smu. 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/inc/amdgpu_smu.h')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
index d824739f7408..c3bc9a7e3f48 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -414,6 +414,9 @@ struct pptable_funcs {
uint32_t index,
uint32_t value);
int (*get_od_percentage)(struct smu_context *smu, enum pp_clock_type type);
+ int (*set_od_percentage)(struct smu_context *smu,
+ enum pp_clock_type type,
+ uint32_t value);
int (*get_clock_by_type_with_latency)(struct smu_context *smu,
enum amd_pp_clock_type type,
struct
@@ -598,6 +601,8 @@ struct smu_funcs
((smu)->ppt_funcs->force_clk_levels ? (smu)->ppt_funcs->force_clk_levels((smu), (type), (level)) : 0)
#define smu_get_od_percentage(smu, type) \
((smu)->ppt_funcs->get_od_percentage ? (smu)->ppt_funcs->get_od_percentage((smu), (type)) : 0)
+#define smu_set_od_percentage(smu, type, value) \
+ ((smu)->ppt_funcs->set_od_percentage ? (smu)->ppt_funcs->set_od_percentage((smu), (type), (value)) : 0)
#define smu_start_thermal_control(smu) \
((smu)->funcs->start_thermal_control? (smu)->funcs->start_thermal_control((smu)) : 0)
#define smu_read_sensor(smu, sensor, data, size) \