]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Disable SR feature on eDP1 by default
authorCharlene Liu <Charlene.Liu@amd.com>
Tue, 3 Feb 2026 01:34:42 +0000 (20:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Feb 2026 17:16:10 +0000 (12:16 -0500)
[Why & How]
Disable SR feature on eDP1 by default.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@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/amdgpu_dm/amdgpu_dm_helpers.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dm_helpers.h
drivers/gpu/drm/amd/display/dc/link/link_detection.c

index 1f41d6540b830cde01a18132d75daded8fea25b1..bf2a356b34756562d0981ea7c28c818f4752b585 100644 (file)
@@ -1153,11 +1153,19 @@ void dm_helpers_init_panel_settings(
 
 void dm_helpers_override_panel_settings(
        struct dc_context *ctx,
-       struct dc_panel_config *panel_config)
+       struct dc_link *link)
 {
+       unsigned int panel_inst = 0;
+
        // Feature DSC
        if (amdgpu_dc_debug_mask & DC_DISABLE_DSC)
-               panel_config->dsc.disable_dsc_edp = true;
+               link->panel_config.dsc.disable_dsc_edp = true;
+
+       if (dc_get_edp_link_panel_inst(ctx->dc, link, &panel_inst) && panel_inst == 1) {
+                       link->panel_config.psr.disable_psr = true;
+                       link->panel_config.psr.disallow_psrsu = true;;
+                       link->panel_config.psr.disallow_replay = true;
+       }
 }
 
 void *dm_helpers_allocate_gpu_mem(
index fd491b7a3cd70d3e143e36b85eef271838189b9e..99d6d6c9356105c5e30735b4266230f6a85431a7 100644 (file)
@@ -80,12 +80,20 @@ void amdgpu_dm_set_psr_caps(struct dc_link *link)
                link->psr_settings.psr_feature_enabled = false;
 
        } else {
+               unsigned int panel_inst = 0;
+
                if (link_supports_psrsu(link))
                        link->psr_settings.psr_version = DC_PSR_VERSION_SU_1;
                else
                        link->psr_settings.psr_version = DC_PSR_VERSION_1;
 
                link->psr_settings.psr_feature_enabled = true;
+
+               /*disable allow psr/psrsu/replay on eDP1*/
+               if (dc_get_edp_link_panel_inst(link->ctx->dc, link, &panel_inst) && panel_inst == 1) {
+                       link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
+                       link->psr_settings.psr_feature_enabled = false;
+               }
        }
 }
 
index ce08477d1ccd95fb766febd40c79bb966e1e87a0..4c4239cac863da4a94f843412b893c4ab6682d85 100644 (file)
@@ -505,7 +505,6 @@ union allow_lttpr_non_transparent_mode {
        } bits;
        unsigned char raw;
 };
-
 /* Structure to hold configuration flags set by dm at dc creation. */
 struct dc_config {
        bool gpu_vm_support;
index 7014b8c2c95642d8d90664951848b9ea2c867f77..2818df555e627f3b260484a1174a1bb6c7be52c7 100644 (file)
@@ -209,7 +209,7 @@ void dm_helpers_init_panel_settings(
        struct dc_sink *sink);
 void dm_helpers_override_panel_settings(
        struct dc_context *ctx,
-       struct dc_panel_config *config);
+       struct dc_link *link);
 int dm_helper_dmub_aux_transfer_sync(
                struct dc_context *ctx,
                const struct dc_link *link,
index 578509e8d0e254c0f3f382128c985e0cdcad6bef..b2c020071cbfbf33bb3a9604874594aef702b17b 100644 (file)
@@ -1333,7 +1333,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                        // Pickup base DM settings
                        dm_helpers_init_panel_settings(dc_ctx, &link->panel_config, sink);
                        // Override dc_panel_config if system has specific settings
-                       dm_helpers_override_panel_settings(dc_ctx, &link->panel_config);
+                       dm_helpers_override_panel_settings(dc_ctx, link);
 
                        //sink only can use supported link rate table, we are foreced to enable it
                        if (link->reported_link_cap.link_rate == LINK_RATE_UNKNOWN)