]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Update P-state naming for clarity.
authorAustin Zheng <Austin.Zheng@amd.com>
Wed, 24 Sep 2025 14:23:24 +0000 (10:23 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Nov 2025 16:53:20 +0000 (11:53 -0500)
[Why & How]
P-state can refer to different things like UCLK P-state, PPT, or temp read
Update naming for clarity

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Austin Zheng <Austin.Zheng@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c

index f809c4073b430850006e1287376b333d15504043..e7a0f46e128987efc5cd1aafbf51153d698e4f6a 100644 (file)
@@ -13024,7 +13024,7 @@ void dml2_core_calcs_get_informative(const struct dml2_core_internal_display_mod
        out->informative.mode_support_info.InvalidCombinationOfMALLUseForPState = mode_lib->ms.support.InvalidCombinationOfMALLUseForPState;
        out->informative.mode_support_info.ExceededMALLSize = mode_lib->ms.support.ExceededMALLSize;
        out->informative.mode_support_info.EnoughWritebackUnits = mode_lib->ms.support.EnoughWritebackUnits;
-       out->informative.mode_support_info.temp_read_or_ppt_support = mode_lib->ms.support.temp_read_or_ppt_support;
+       out->informative.mode_support_info.temp_read_or_ppt_support = mode_lib->ms.support.global_temp_read_or_ppt_supported;
        out->informative.mode_support_info.g6_temp_read_support = mode_lib->ms.support.g6_temp_read_support;
 
        out->informative.mode_support_info.ExceededMultistreamSlots = mode_lib->ms.support.ExceededMultistreamSlots;
index 051c31ec2f0e4e5f957c1d3be3939b417a2e2f50..6d13d4c9b69a17dedce8197d246ecfa2ec3ef9e6 100644 (file)
@@ -264,8 +264,11 @@ struct dml2_core_internal_mode_support_info {
        bool DCCMetaBufferSizeNotExceeded;
        enum dml2_pstate_change_support DRAMClockChangeSupport[DML2_MAX_PLANES];
        enum dml2_pstate_change_support FCLKChangeSupport[DML2_MAX_PLANES];
+       enum dml2_pstate_change_support temp_read_or_ppt_support[DML2_MAX_PLANES];
+       bool global_dram_clock_change_support_required;
        bool global_dram_clock_change_supported;
        bool global_fclk_change_supported;
+       bool global_temp_read_or_ppt_supported;
        bool USRRetrainingSupport;
        bool AvgBandwidthSupport;
        bool UrgVactiveBandwidthSupport;
@@ -336,7 +339,6 @@ struct dml2_core_internal_mode_support_info {
        bool incorrect_imall_usage;
 
        bool g6_temp_read_support;
-       bool temp_read_or_ppt_support;
 
        struct dml2_core_internal_watermarks watermarks;
        bool dcfclk_support;
@@ -646,7 +648,7 @@ struct dml2_core_internal_mode_support {
        unsigned int DSTYAfterScaler[DML2_MAX_PLANES];
        unsigned int DSTXAfterScaler[DML2_MAX_PLANES];
 
-       enum dml2_pstate_method pstate_switch_modes[DML2_MAX_PLANES];
+       enum dml2_pstate_method uclk_pstate_switch_modes[DML2_MAX_PLANES];
 };
 
 /// @brief A mega structure that houses various info for model programming step.
@@ -837,6 +839,7 @@ struct dml2_core_internal_mode_program {
        double max_urgent_latency_us;
        double df_response_time_us;
 
+       enum dml2_pstate_method uclk_pstate_switch_modes[DML2_MAX_PLANES];
        // -------------------
        // Output
        // -------------------
@@ -963,11 +966,12 @@ struct dml2_core_internal_mode_program {
        double MaxActiveFCLKChangeLatencySupported;
        bool USRRetrainingSupport;
        bool g6_temp_read_support;
-       bool temp_read_or_ppt_support;
        enum dml2_pstate_change_support FCLKChangeSupport[DML2_MAX_PLANES];
        enum dml2_pstate_change_support DRAMClockChangeSupport[DML2_MAX_PLANES];
+       enum dml2_pstate_change_support temp_read_or_ppt_support[DML2_MAX_PLANES];
        bool global_dram_clock_change_supported;
        bool global_fclk_change_supported;
+       bool global_temp_read_or_ppt_supported;
        double MaxActiveDRAMClockChangeLatencySupported[DML2_MAX_PLANES];
        double WritebackAllowFCLKChangeEndPosition[DML2_MAX_PLANES];
        double WritebackAllowDRAMClockChangeEndPosition[DML2_MAX_PLANES];
@@ -1313,7 +1317,7 @@ struct dml2_core_calcs_CalculateVMRowAndSwath_params {
        unsigned int HostVMMinPageSize;
        unsigned int DCCMetaBufferSizeBytes;
        bool mrq_present;
-       enum dml2_pstate_method *pstate_switch_modes;
+       enum dml2_pstate_method *uclk_pstate_switch_modes;
 
        // Output
        bool *PTEBufferSizeNotExceeded;
@@ -1740,10 +1744,12 @@ struct dml2_core_calcs_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport_param
        unsigned int max_request_size_bytes;
        unsigned int *meta_row_height_l;
        unsigned int *meta_row_height_c;
+       enum dml2_pstate_method *uclk_pstate_switch_modes;
 
        // Output
        struct dml2_core_internal_watermarks *Watermark;
        enum dml2_pstate_change_support *DRAMClockChangeSupport;
+       bool *global_dram_clock_change_support_required;
        bool *global_dram_clock_change_supported;
        double *MaxActiveDRAMClockChangeLatencySupported;
        unsigned int *SubViewportLinesNeededInMALL;
@@ -1754,10 +1760,10 @@ struct dml2_core_calcs_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport_param
        double *VActiveLatencyHidingMargin;
        double *VActiveLatencyHidingUs;
        bool *g6_temp_read_support;
-       bool *temp_read_or_ppt_support;
+       enum dml2_pstate_change_support *temp_read_or_ppt_support;
+       bool *global_temp_read_or_ppt_supported;
 };
 
-
 struct dml2_core_calcs_CalculateSwathAndDETConfiguration_params {
        const struct dml2_display_cfg *display_cfg;
        unsigned int ConfigReturnBufferSizeInKByte;
index 5f301befed167418d40600f58220407dda660159..b57d0f6ea6a1c38b952dafaa200cf19e926e41fa 100644 (file)
@@ -306,6 +306,8 @@ void dml2_core_utils_print_mode_support_info(const struct dml2_core_internal_mod
                DML_LOG_VERBOSE("DML: support: ExceededMALLSize = %d\n", support->ExceededMALLSize);
        if (!fail_only || support->g6_temp_read_support == 0)
                DML_LOG_VERBOSE("DML: support: g6_temp_read_support = %d\n", support->g6_temp_read_support);
+       if (!fail_only || (support->global_dram_clock_change_supported == 0 && support->global_dram_clock_change_support_required))
+               DML_LOG_VERBOSE("DML: support: dram_clock_change_support = %d\n", support->global_dram_clock_change_supported);
        if (!fail_only || support->ImmediateFlipSupport == 0)
                DML_LOG_VERBOSE("DML: support: ImmediateFlipSupport = %d\n", support->ImmediateFlipSupport);
        if (!fail_only || support->LinkCapacitySupport == 0)