summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Zheng <Austin.Zheng@amd.com>2026-08-12 13:25:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-09-02 15:04:46 -0400
commit7aec00d8a855003674b0f02ed24a9bc02f6675f3 (patch)
treec07c6c05f2f36da2ec59e745514f7d3292416ced
parent61ba35abd86b25aa835b7e382bba49856b410ced (diff)
downloadlinux-next-7aec00d8a855003674b0f02ed24a9bc02f6675f3.tar.gz
linux-next-7aec00d8a855003674b0f02ed24a9bc02f6675f3.zip
drm/amd/display: Clean up Per-DPM Struct
[WHY/HOW] Deprecate original organization in favor for the organization used by v2. External usages no longer used so it can be removed entirely. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h
index 45208f804d2b..422833548aa6 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h
@@ -78,41 +78,17 @@ enum dml2_qos_param_type {
// - If a non-zero DPM index has derate_percent = 0, fall back to index 0
// Unpopulated derates should fallback to the global derate value.
// Each element pairs a derate percentage with its threshold
-struct dml2_soc_derate_values_per_dpm_v2 {
+struct dml2_soc_derate_values_per_dpm {
unsigned int derate_percent;
unsigned int clk_upperbound_threshold_khz;
};
-// Legacy structure - for backward compatibility as driver debug values can override the values. (will temporarily break driver overrides)
// Per-DPM derate arrays for system_active_average (the only power state that varies by DPM)
// Urgent derates are constant across DPMs and come from derate_table.system_active_urgent
-struct dml2_soc_derate_values_per_dpm {
- unsigned int dram_derate_percent_pixel[DML_MAX_CLK_TABLE_SIZE];
- unsigned int fclk_derate_percent[DML_MAX_CLK_TABLE_SIZE];
- unsigned int dcfclk_derate_percent[DML_MAX_CLK_TABLE_SIZE];
-};
-
struct dml2_soc_derates_per_dpm {
- // Union allows both layouts to coexist without increasing struct size
- // Anonymous structs allow direct member access without .v1 or .v2 prefix
- union {
- // Legacy layout - used by soc_and_ip_translator (unchanged access pattern)
- // TODO: Remove after soc_and_ip_translator migration is complete
- struct {
- struct dml2_soc_derate_values_per_dpm system_active_derates_per_dpm;
- unsigned int min_uclk_khz_threshold[DML_MAX_CLK_TABLE_SIZE];
- unsigned int min_fclk_khz_threshold[DML_MAX_CLK_TABLE_SIZE];
- unsigned int min_dcfclk_khz_threshold[DML_MAX_CLK_TABLE_SIZE];
- };
-
- // New layout - used by DML internally
- // Arrays of derate/threshold pairs, one per DPM level
- struct {
- struct dml2_soc_derate_values_per_dpm_v2 dram_per_dpm_derate_pixel[DML_MAX_CLK_TABLE_SIZE];
- struct dml2_soc_derate_values_per_dpm_v2 fclk_per_dpm_derate[DML_MAX_CLK_TABLE_SIZE];
- struct dml2_soc_derate_values_per_dpm_v2 dcfclk_per_dpm_derate[DML_MAX_CLK_TABLE_SIZE];
- };
- };
+ struct dml2_soc_derate_values_per_dpm dram_per_dpm_derate_pixel[DML_MAX_CLK_TABLE_SIZE];
+ struct dml2_soc_derate_values_per_dpm fclk_per_dpm_derate[DML_MAX_CLK_TABLE_SIZE];
+ struct dml2_soc_derate_values_per_dpm dcfclk_per_dpm_derate[DML_MAX_CLK_TABLE_SIZE];
};
struct dml2_soc_qos_parameters {