summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2019-01-16 09:30:11 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-03-19 23:03:59 +0300
commit8021816c85be41c6486d2ab668ee4df8c30edd05 (patch)
tree64ac6bcf4dfc889bf672063243601ef9fc34d1e8 /drivers/gpu
parent64461900001fc32aa6e07f4712167aac815ea23d (diff)
downloadlinux-8021816c85be41c6486d2ab668ee4df8c30edd05.tar.xz
drm/amd/powerplay: add interface to get current shallow sleep clocks
This patch adds interface to get current shallow sleep clocks for display and in smu v11 didn't have this implementation. Signed-off-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')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h13
1 files changed, 13 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 8dce824611e8..27a542cdf1f6 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -154,6 +154,15 @@ struct smu_performance_level {
uint32_t non_local_mem_width;
};
+struct smu_clock_info {
+ uint32_t min_mem_clk;
+ uint32_t max_mem_clk;
+ uint32_t min_eng_clk;
+ uint32_t max_eng_clk;
+ uint32_t min_bus_bandwidth;
+ uint32_t max_bus_bandwidth;
+};
+
struct smu_bios_boot_up_values
{
uint32_t revision;
@@ -306,6 +315,8 @@ struct smu_funcs
int (*get_perf_level)(struct smu_context *smu,
enum smu_perf_level_designation designation,
struct smu_performance_level *level);
+ int (*get_current_shallow_sleep_clocks)(struct smu_context *smu,
+ struct smu_clock_info *clocks);
};
#define smu_init_microcode(smu) \
@@ -421,6 +432,8 @@ struct smu_funcs
((smu)->funcs->get_dal_power_level ? (smu)->funcs->get_dal_power_level((smu), (clocks)) : 0)
#define smu_get_perf_level(smu, designation, level) \
((smu)->funcs->get_perf_level ? (smu)->funcs->get_perf_level((smu), (designation), (level)) : 0)
+#define smu_get_current_shallow_sleep_clocks(smu, clocks) \
+ ((smu)->funcs->get_current_shallow_sleep_clocks ? (smu)->funcs->get_current_shallow_sleep_clocks((smu), (clocks)) : 0)
extern int smu_get_atom_data_table(struct smu_context *smu, uint32_t table,