@@ -1033,6 +1033,7 @@ parse_lfp_backlight(struct drm_i915_private *i915,
10331033 }
10341034
10351035 panel -> vbt .backlight .type = INTEL_BACKLIGHT_DISPLAY_DDI ;
1036+ panel -> vbt .backlight .controller = 0 ;
10361037 if (i915 -> display .vbt .version >= 191 ) {
10371038 size_t exp_size ;
10381039
@@ -2467,6 +2468,22 @@ static enum port dvo_port_to_port(struct drm_i915_private *i915,
24672468 dvo_port );
24682469}
24692470
2471+ static enum port
2472+ dsi_dvo_port_to_port (struct drm_i915_private * i915 , u8 dvo_port )
2473+ {
2474+ switch (dvo_port ) {
2475+ case DVO_PORT_MIPIA :
2476+ return PORT_A ;
2477+ case DVO_PORT_MIPIC :
2478+ if (DISPLAY_VER (i915 ) >= 11 )
2479+ return PORT_B ;
2480+ else
2481+ return PORT_C ;
2482+ default :
2483+ return PORT_NONE ;
2484+ }
2485+ }
2486+
24702487static int parse_bdb_230_dp_max_link_rate (const int vbt_max_link_rate )
24712488{
24722489 switch (vbt_max_link_rate ) {
@@ -2577,6 +2594,12 @@ intel_bios_encoder_supports_edp(const struct intel_bios_encoder_data *devdata)
25772594 devdata -> child .device_type & DEVICE_TYPE_INTERNAL_CONNECTOR ;
25782595}
25792596
2597+ static bool
2598+ intel_bios_encoder_supports_dsi (const struct intel_bios_encoder_data * devdata )
2599+ {
2600+ return devdata -> child .device_type & DEVICE_TYPE_MIPI_OUTPUT ;
2601+ }
2602+
25802603static int _intel_bios_hdmi_level_shift (const struct intel_bios_encoder_data * devdata )
25812604{
25822605 if (!devdata || devdata -> i915 -> display .vbt .version < 158 )
@@ -2627,21 +2650,22 @@ static void print_ddi_port(const struct intel_bios_encoder_data *devdata,
26272650{
26282651 struct drm_i915_private * i915 = devdata -> i915 ;
26292652 const struct child_device_config * child = & devdata -> child ;
2630- bool is_dvi , is_hdmi , is_dp , is_edp , is_crt , supports_typec_usb , supports_tbt ;
2653+ bool is_dvi , is_hdmi , is_dp , is_edp , is_dsi , is_crt , supports_typec_usb , supports_tbt ;
26312654 int dp_boost_level , dp_max_link_rate , hdmi_boost_level , hdmi_level_shift , max_tmds_clock ;
26322655
26332656 is_dvi = intel_bios_encoder_supports_dvi (devdata );
26342657 is_dp = intel_bios_encoder_supports_dp (devdata );
26352658 is_crt = intel_bios_encoder_supports_crt (devdata );
26362659 is_hdmi = intel_bios_encoder_supports_hdmi (devdata );
26372660 is_edp = intel_bios_encoder_supports_edp (devdata );
2661+ is_dsi = intel_bios_encoder_supports_dsi (devdata );
26382662
26392663 supports_typec_usb = intel_bios_encoder_supports_typec_usb (devdata );
26402664 supports_tbt = intel_bios_encoder_supports_tbt (devdata );
26412665
26422666 drm_dbg_kms (& i915 -> drm ,
2643- "Port %c VBT info: CRT:%d DVI:%d HDMI:%d DP:%d eDP:%d LSPCON:%d USB-Type-C:%d TBT:%d DSC:%d\n" ,
2644- port_name (port ), is_crt , is_dvi , is_hdmi , is_dp , is_edp ,
2667+ "Port %c VBT info: CRT:%d DVI:%d HDMI:%d DP:%d eDP:%d DSI:%d LSPCON:%d USB-Type-C:%d TBT:%d DSC:%d\n" ,
2668+ port_name (port ), is_crt , is_dvi , is_hdmi , is_dp , is_edp , is_dsi ,
26452669 HAS_LSPCON (i915 ) && child -> lspcon ,
26462670 supports_typec_usb , supports_tbt ,
26472671 devdata -> dsc != NULL );
@@ -2694,6 +2718,8 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
26942718 enum port port ;
26952719
26962720 port = dvo_port_to_port (i915 , child -> dvo_port );
2721+ if (port == PORT_NONE && DISPLAY_VER (i915 ) >= 11 )
2722+ port = dsi_dvo_port_to_port (i915 , child -> dvo_port );
26972723 if (port == PORT_NONE )
26982724 return ;
26992725
@@ -3442,19 +3468,16 @@ bool intel_bios_is_dsi_present(struct drm_i915_private *i915,
34423468
34433469 dvo_port = child -> dvo_port ;
34443470
3445- if (dvo_port == DVO_PORT_MIPIA ||
3446- (dvo_port == DVO_PORT_MIPIB && DISPLAY_VER (i915 ) >= 11 ) ||
3447- (dvo_port == DVO_PORT_MIPIC && DISPLAY_VER (i915 ) < 11 )) {
3448- if (port )
3449- * port = dvo_port - DVO_PORT_MIPIA ;
3450- return true;
3451- } else if (dvo_port == DVO_PORT_MIPIB ||
3452- dvo_port == DVO_PORT_MIPIC ||
3453- dvo_port == DVO_PORT_MIPID ) {
3471+ if (dsi_dvo_port_to_port (i915 , dvo_port ) == PORT_NONE ) {
34543472 drm_dbg_kms (& i915 -> drm ,
34553473 "VBT has unsupported DSI port %c\n" ,
34563474 port_name (dvo_port - DVO_PORT_MIPIA ));
3475+ continue ;
34573476 }
3477+
3478+ if (port )
3479+ * port = dsi_dvo_port_to_port (i915 , dvo_port );
3480+ return true;
34583481 }
34593482
34603483 return false;
@@ -3539,7 +3562,7 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder,
35393562 if (!(child -> device_type & DEVICE_TYPE_MIPI_OUTPUT ))
35403563 continue ;
35413564
3542- if (child -> dvo_port - DVO_PORT_MIPIA == encoder -> port ) {
3565+ if (dsi_dvo_port_to_port ( i915 , child -> dvo_port ) == encoder -> port ) {
35433566 if (!devdata -> dsc )
35443567 return false;
35453568
0 commit comments