summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
diff options
context:
space:
mode:
authorHawking Zhang2019-06-10 15:39:29 +0200
committerAlex Deucher2019-06-22 01:59:31 +0200
commite211580da9a4767b1902a17f0cbed580000f2b66 (patch)
tree2e60e39bdd9e740beaeb185059730742619eac0f /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
parentdrm/amd/powerplay: move function thermal_get_temperature to veag20_ppt (diff)
downloadkernel-qcow2-linux-e211580da9a4767b1902a17f0cbed580000f2b66.tar.gz
kernel-qcow2-linux-e211580da9a4767b1902a17f0cbed580000f2b66.tar.xz
kernel-qcow2-linux-e211580da9a4767b1902a17f0cbed580000f2b66.zip
drm/amd/powerplay: move get_thermal_temperature_range to ppt funcs
The thermal policy could be ASIC specific ones and depends on structures in pptable. As a result, get_thermal_temperature_range should be implemented as ppt funcs instead of smu funcs Signed-off-by: Hawking Zhang <Hawking.Zhang@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.h14
1 files changed, 14 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 0fd3d89386be..f89971992e6f 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -26,6 +26,10 @@
#include "kgd_pp_interface.h"
#include "dm_pp_interface.h"
+#define SMU_THERMAL_MINIMUM_ALERT_TEMP 0
+#define SMU_THERMAL_MAXIMUM_ALERT_TEMP 255
+#define SMU_TEMPERATURE_UNITS_PER_CENTIGRADES 1000
+
struct smu_hw_power_state {
unsigned int magic;
};
@@ -106,6 +110,13 @@ struct smu_state_software_algorithm_block {
struct smu_temperature_range {
int min;
int max;
+ int edge_emergency_max;
+ int hotspot_min;
+ int hotspot_crit_max;
+ int hotspot_emergency_max;
+ int mem_min;
+ int mem_crit_max;
+ int mem_emergency_max;
};
struct smu_state_validation_block {
@@ -597,6 +608,7 @@ struct pptable_funcs {
int (*get_current_clk_freq_by_table)(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t *value);
+ int (*get_thermal_temperature_range)(struct smu_context *smu, struct smu_temperature_range *range);
};
struct smu_funcs
@@ -881,6 +893,8 @@ struct smu_funcs
((smu)->ppt_funcs->set_watermarks_table ? (smu)->ppt_funcs->set_watermarks_table((smu), (tab), (clock_ranges)) : 0)
#define smu_get_current_clk_freq_by_table(smu, clk_type, value) \
((smu)->ppt_funcs->get_current_clk_freq_by_table ? (smu)->ppt_funcs->get_current_clk_freq_by_table((smu), (clk_type), (value)) : 0)
+#define smu_get_thermal_temperature_range(smu, range) \
+ ((smu)->ppt_funcs->get_thermal_temperature_range? (smu)->ppt_funcs->get_thermal_temperature_range((smu), (range)) : 0)
extern int smu_get_atom_data_table(struct smu_context *smu, uint32_t table,
uint16_t *size, uint8_t *frev, uint8_t *crev,