]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: Add option to configure mapping policy for edp0 on dp1
authorLewis Huang <lewis.huang@amd.com>
Thu, 21 Mar 2024 08:14:43 +0000 (16:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 02:14:39 +0000 (22:14 -0400)
[Why]
We want flexibility to choose how pwrseq instance is mapped to eDP panel

[How]
Add configuration option to choose the pwrseq mapping policy.
When enabled, allow fixed mapping between DIG inst to pwrseq inst.

Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Lewis Huang <lewis.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c

index 46be4845ec2874dfc082e8f9b801b8f109bc5325..db87f9cdd5671b4de585a0f1b3c9adf23cce9b0a 100644 (file)
@@ -437,6 +437,7 @@ struct dc_config {
        bool usb4_bw_alloc_support;
        bool allow_0_dtb_clk;
        bool use_assr_psp_message;
+       bool support_edp0_on_dp1;
 };
 
 enum visual_confirm {
index 281be20b1a1071576a4ca9037ee105333268801e..20c6fe48567f40586eea6fa72826c2a94081a8f5 100644 (file)
@@ -173,5 +173,12 @@ void dcn31_panel_cntl_construct(
                break;
        }
 
-       dcn31_panel_cntl->base.pwrseq_inst = pwrseq_inst;
+       if (dcn31_panel_cntl->base.ctx->dc->config.support_edp0_on_dp1)
+               //If supported, power sequencer mapping shall follow the DIG instance
+               dcn31_panel_cntl->base.pwrseq_inst = pwrseq_inst;
+       else
+               /* If not supported, pwrseq will be assigned in order,
+                * so first pwrseq will be assigned to first panel instance (legacy behavior)
+                */
+               dcn31_panel_cntl->base.pwrseq_inst = dcn31_panel_cntl->base.inst;
 }