drm/i915/crt: split out intel_crt_present() to platform specific setup
Subsystems (2)
PATCH 1/5 drm/i915/crt: split out intel_crt_present() to platform specific setup
With new platforms not having CRT support and most conditions in intel_crt_present() being specific to DDI, split out the CRT initialization to platform specific blocks in the if ladder. Add new Pineview block for this.
This puts intel_crt_init() more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.
--- drivers/gpu/drm/i915/intel_display.c | 37 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/intel_display.c +24 -13
@@ -14245,23 +14245,17 @@ static bool has_edp_a(struct drm_i915_private *dev_priv)return true; } -static bool intel_crt_present (struct drm_i915_private *dev_priv) +static bool intel_ddi_crt_present (struct drm_i915_private *dev_priv) { -if (INTEL_GEN (dev_priv) >=9 ) -return false; -if (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv))return false; -if (IS_CHERRYVIEW (dev_priv)) -return false; -if (HAS_PCH_LPT_H (dev_priv) &&I915_READ (SFUSE_STRAP ) &SFUSE_STRAP_CRT_DISABLED )return false;/* DDI E can't be used if DDI A requires 4 lanes */ -if (HAS_DDI (dev_priv) &&I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES ) +if (I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES )return false;if (!dev_priv->vbt.int_crt_support)
@@ -14323,9 +14317,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)*/ intel_lvds_init (dev_priv); -if (intel_crt_present (dev_priv)) -intel_crt_init (dev_priv); -if (IS_ICELAKE (dev_priv)) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );
@@ -14354,6 +14345,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_DDI (dev_priv)) {int found; +if (intel_ddi_crt_present (dev_priv)) +intel_crt_init (dev_priv); +/* * Haswell uses DDI functions to detect digital outputs. * On SKL pre-D0 the strap isn't connected, so we assume
@@ -14385,6 +14379,10 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_PCH_SPLIT (dev_priv)) {int found; + +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + dpd_is_edp =intel_dp_is_port_edp (dev_priv,PORT_D );if (has_edp_a (dev_priv))
@@ -14413,6 +14411,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) {bool has_edp, has_port; +if (IS_VALLEYVIEW (dev_priv) && dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +/* * The DP_DETECTED bit is the latched state of the DDC * SDA pin at boot. However since eDP doesn't require DDC
@@ -14455,9 +14456,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }vlv_dsi_init (dev_priv); - }else if (!IS_GEN (dev_priv,2 ) && !IS_PINEVIEW (dev_priv)) { + }else if (IS_PINEVIEW (dev_priv)) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {DRM_DEBUG_KMS ("probing SDVOB\n" ); found =intel_sdvo_init (dev_priv,GEN3_SDVOB ,PORT_B );
@@ -14489,8 +14496,12 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); - }else if (IS_GEN (dev_priv,2 )) + }else if (IS_GEN (dev_priv,2 )) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +intel_dvo_init (dev_priv); + }if (SUPPORTS_TV (dev_priv))intel_tv_init (dev_priv);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/5 drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS
With new platforms not having LVDS support, only call intel_lvds_init() on platforms that might actually have LVDS. Move the comment about eDP init to the PCH block where it's relevant.
This puts intel_lvds_init() more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.
--- drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +13 -7
@@ -14310,13 +14310,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (!HAS_DISPLAY (dev_priv))return ; -/* -* intel_edp_init_connector() depends on this completing first, to -* prevent the registeration of both eDP and LVDS and the incorrect -* sharing of the PPS. -*/ -intel_lvds_init (dev_priv); -if (IS_ICELAKE (dev_priv)) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );
@@ -14380,6 +14373,13 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_PCH_SPLIT (dev_priv)) {int found; +/* +* intel_edp_init_connector() depends on this completing first, +* to prevent the registration of both eDP and LVDS and the +* incorrect sharing of the PPS. +*/ +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
@@ -14457,11 +14457,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)vlv_dsi_init (dev_priv); }else if (IS_PINEVIEW (dev_priv)) { +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv); }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
@@ -14497,6 +14501,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); }else if (IS_GEN (dev_priv,2 )) { +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/5] drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS
Quoted 9 lines · Jani Nikula
With new platforms not having LVDS support, only call
intel_lvds_init()on platforms that might actually have LVDS. Move the comment about eDP init to the PCH block where it's relevant.This puts
intel_lvds_init()more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.Signed-off-by Jani Nikula <[email protected]>
Quoted 68 lines
--- drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/intel_display.c +13
-7@@ -14310,13 +14310,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (!HAS_DISPLAY (dev_priv))return ; -/* -* intel_edp_init_connector() depends on this completing first, to -* prevent the registeration of both eDP and LVDS and the incorrect -* sharing of the PPS. -*/ -intel_lvds_init (dev_priv); -if (IS_ICELAKE (dev_priv)) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );@@ -14380,6 +14373,13 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_PCH_SPLIT (dev_priv)) {int found; +/* +* intel_edp_init_connector() depends on this completing first, +* to prevent the registration of both eDP and LVDS and the +* incorrect sharing of the PPS. +*/ +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);@@ -14457,11 +14457,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)vlv_dsi_init (dev_priv); }else if (IS_PINEVIEW (dev_priv)) { +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv); }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);@@ -14497,6 +14501,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); }else if (IS_GEN (dev_priv,2 )) { +intel_lvds_init (dev_priv); +if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/5 drm/i915/lvds: nuke intel_lvds_supported()
In reply to Jani NikulaNow that intel_lvds_init() is only called for platforms that might have LVDS, move the remaining checks to intel_setup_outputs(), again similar to other outputs, and remove the overlapping checks.
--- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- drivers/gpu/drm/i915/intel_lvds.c | 23 ----------------------- 2 files changed, 4 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
@@ -14464,7 +14464,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv)) +intel_lvds_init (dev_priv);if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
@@ -14501,7 +14502,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); }else if (IS_GEN (dev_priv,2 )) { -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv)) +intel_lvds_init (dev_priv);if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
drivers/gpu/drm/i915/intel_lvds.c +0 -23
@@ -798,26 +798,6 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)return (val &LVDS_CLKB_POWER_MASK ) ==LVDS_CLKB_POWER_UP ; } -static bool intel_lvds_supported (struct drm_i915_private *dev_priv) -{ -/* -* With the introduction of the PCH we gained a dedicated -* LVDS presence pin, use it. -*/ -if (HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)) -return true; - -/* -* Otherwise LVDS was only attached to mobile products, -* except for the inglorious 830gm -*/ -if (INTEL_GEN (dev_priv) <=4 && -IS_MOBILE (dev_priv) && !IS_I830 (dev_priv)) -return true; - -return false; -} -/** * intel_lvds_init - setup LVDS connectors on this device * @dev_priv: i915 device
@@ -842,9 +822,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)u8 pin;u32 allowed_scalers; -if (!intel_lvds_supported (dev_priv)) -return ; -/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { WARN(!dev_priv->vbt.int_lvds_support,
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/5] drm/i915/lvds: nuke intel_lvds_supported()
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv)
Quoted 15 lines · Jani Nikula
Now that
intel_lvds_init()is only called for platforms that might have LVDS, move the remaining checks tointel_setup_outputs(), again similar to other outputs, and remove the overlapping checks.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- drivers/gpu/drm/i915/intel_lvds.c | 23 ----------------------- 2 files changed, 4 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -14464,7 +14464,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
Had to read the earlier patch twice to make sure we're not leaving ibx/cpt/ppt or pnv behind.
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +2
-1}else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv)) +intel_lvds_init (dev_priv);if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14505
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -14501,7 +14502,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); }else if (IS_GEN (dev_priv,2 )) { -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))
aka. IS_I85X()
Quoted 52 lines
drivers/gpu/drm/i915/intel_display.c +1
-0+intel_lvds_init (dev_priv);if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);drivers/gpu/drm/i915/intel_lvds.c +0
-23@@ -798,26 +798,6 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)return (val &LVDS_CLKB_POWER_MASK ) ==LVDS_CLKB_POWER_UP ; } -static bool intel_lvds_supported (struct drm_i915_private *dev_priv) -{ -/* -* With the introduction of the PCH we gained a dedicated -* LVDS presence pin, use it. -*/ -if (HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)) -return true; - -/* -* Otherwise LVDS was only attached to mobile products, -* except for the inglorious 830gm -*/ -if (INTEL_GEN (dev_priv) <=4 && -IS_MOBILE (dev_priv) && !IS_I830 (dev_priv)) -return true; - -return false; -} -/** * intel_lvds_init - setup LVDS connectors on this device * @dev_priv: i915 device @@ -842,9 +822,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)u8 pin;u32 allowed_scalers; -if (!intel_lvds_supported (dev_priv)) -return ; -/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { WARN(!dev_priv->vbt.int_lvds_support,Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/5] drm/i915/lvds: nuke intel_lvds_supported()
Quoted 27 lines · Ville Syrjälä
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv)
Quoted 15 lines · Jani Nikula
Now that
intel_lvds_init()is only called for platforms that might have LVDS, move the remaining checks tointel_setup_outputs(), again similar to other outputs, and remove the overlapping checks.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- drivers/gpu/drm/i915/intel_lvds.c | 23 ----------------------- 2 files changed, 4 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -14464,7 +14464,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)Had to read the earlier patch twice to make sure we're not leaving ibx/cpt/ppt or pnv behind.
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +2
-1}else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv)) +intel_lvds_init (dev_priv);
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14505
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1
-1if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);@@ -14501,7 +14502,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); }else if (IS_GEN (dev_priv,2 )) { -intel_lvds_init (dev_priv); +if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))aka.
IS_I85X()
Made the change in a separate patch.
Quoted 1 line
Reviewed-by Ville Syrjälä <[email protected]>
Thanks,
Jani.
Quoted 53 lines
Quoted 53 lines
drivers/gpu/drm/i915/intel_display.c +1
-0+intel_lvds_init (dev_priv);if (dev_priv->vbt.int_crt_support)intel_crt_init (dev_priv);drivers/gpu/drm/i915/intel_lvds.c +0
-23@@ -798,26 +798,6 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)return (val &LVDS_CLKB_POWER_MASK ) ==LVDS_CLKB_POWER_UP ; } -static bool intel_lvds_supported (struct drm_i915_private *dev_priv) -{ -/* -* With the introduction of the PCH we gained a dedicated -* LVDS presence pin, use it. -*/ -if (HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)) -return true; - -/* -* Otherwise LVDS was only attached to mobile products, -* except for the inglorious 830gm -*/ -if (INTEL_GEN (dev_priv) <=4 && -IS_MOBILE (dev_priv) && !IS_I830 (dev_priv)) -return true; - -return false; -} -/** * intel_lvds_init - setup LVDS connectors on this device * @dev_priv: i915 device @@ -842,9 +822,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)u8 pin;u32 allowed_scalers; -if (!intel_lvds_supported (dev_priv)) -return ; -/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { WARN(!dev_priv->vbt.int_lvds_support,Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/5 drm/i915/tv: only call intel_tv_init() on platforms that might have TV
In reply to Jani NikulaWith most platforms not having TV support, only call intel_tv_init() on platforms that might actually have TV, specifically gens 3 and 4.
This puts intel_tv_init() more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.
--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -3
@@ -14501,6 +14501,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); + +if (SUPPORTS_TV (dev_priv)) +intel_tv_init (dev_priv); }else if (IS_GEN (dev_priv,2 )) {if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))intel_lvds_init (dev_priv);
@@ -14511,9 +14514,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)intel_dvo_init (dev_priv); } -if (SUPPORTS_TV (dev_priv)) -intel_tv_init (dev_priv); -intel_psr_init (dev_priv);for_each_intel_encoder (&dev_priv->drm, encoder) {
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/5] drm/i915/tv: only call intel_tv_init() on platforms that might have TV
Quoted 17 lines · Jani Nikula
With most platforms not having TV support, only call
intel_tv_init()on platforms that might actually have TV, specifically gens 3 and 4.This puts
intel_tv_init()more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14506
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +3
-0@@ -14501,6 +14501,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); + +if (SUPPORTS_TV (dev_priv)) +intel_tv_init (dev_priv);
Since PNV was split into its own thing I think this could actually be replaced with IS_MOBILE().
Either way
Quoted 20 lines
drivers/gpu/drm/i915/intel_display.c +0
-3}else if (IS_GEN (dev_priv,2 )) {if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))intel_lvds_init (dev_priv);@@ -14511,9 +14514,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)intel_dvo_init (dev_priv); } -if (SUPPORTS_TV (dev_priv)) -intel_tv_init (dev_priv); -intel_psr_init (dev_priv);for_each_intel_encoder (&dev_priv->drm, encoder) {Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/5] drm/i915/tv: only call intel_tv_init() on platforms that might have TV
Quoted 19 lines · Ville Syrjälä
Quoted 18 lines · Jani Nikula
With most platforms not having TV support, only call
intel_tv_init()on platforms that might actually have TV, specifically gens 3 and 4.This puts
intel_tv_init()more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -14501,6 +14501,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14506
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +3
-0if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); + +if (SUPPORTS_TV (dev_priv)) +intel_tv_init (dev_priv);Since PNV was split into its own thing I think this could actually be replaced with
IS_MOBILE().
If I'd been able to get rid of SUPPORTS_TV() with that altogether, I probably would've made the change. But there's still a user in CRC code, so I left this as-is.
BR,
Jani.
Quoted 24 lines
Either way
Reviewed-by Ville Syrjälä <[email protected]>Quoted 20 lines
drivers/gpu/drm/i915/intel_display.c +0
-3}else if (IS_GEN (dev_priv,2 )) {if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))intel_lvds_init (dev_priv);@@ -14511,9 +14514,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)intel_dvo_init (dev_priv); } -if (SUPPORTS_TV (dev_priv)) -intel_tv_init (dev_priv); -intel_psr_init (dev_priv);for_each_intel_encoder (&dev_priv->drm, encoder) {Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/5 drm/i915: rename has_edp_a() to intel_pch_has_edp_a()
In reply to Jani NikulaClarify that the name is specific to PCH platforms.
--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -14231,7 +14231,7 @@ static int intel_encoder_clones(struct intel_encoder *encoder)return index_mask; } -static bool has_edp_a (struct drm_i915_private *dev_priv) +static bool intel_pch_has_edp_a (struct drm_i915_private *dev_priv) {if (!IS_MOBILE (dev_priv))return false;
@@ -14385,7 +14385,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) dpd_is_edp =intel_dp_is_port_edp (dev_priv,PORT_D ); -if (has_edp_a (dev_priv)) +if (intel_pch_has_edp_a (dev_priv))intel_dp_init (dev_priv,DP_A ,PORT_A );if (I915_READ (PCH_HDMIB ) &SDVO_DETECTED ) {
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/5] drm/i915: rename has_edp_a() to intel_pch_has_edp_a()
Quoted 12 lines · Jani Nikula
Clarify that the name is specific to PCH platforms.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static int intel_encoder_clones(struct intel_encoder *encoder) · line 14234
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -14231,7 +14231,7 @@ static int intel_encoder_clones(struct intel_encoder *encoder)return index_mask; } -static bool has_edp_a (struct drm_i915_private *dev_priv) +static bool intel_pch_has_edp_a (struct drm_i915_private *dev_priv)
Hmm. The port is on the CPU though. The function name reads more like it's looking for port A on the PCH now. ilk_has_edp_a() maybe?
Quoted 19 lines
drivers/gpu/drm/i915/intel_display.c +1
-1{if (!IS_MOBILE (dev_priv))return false;@@ -14385,7 +14385,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) dpd_is_edp =intel_dp_is_port_edp (dev_priv,PORT_D ); -if (has_edp_a (dev_priv)) +if (intel_pch_has_edp_a (dev_priv))intel_dp_init (dev_priv,DP_A ,PORT_A );if (I915_READ (PCH_HDMIB ) &SDVO_DETECTED ) {Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup
URL : https://patchwork.freedesktop.org/series/55513/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5458 -> Patchwork_11996
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/55513/revisions/1/mbox/
Known issues
------------
Here are the changes found in Patchwork_11996 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_busy@basic-flip-b:
- fi-gdg-551: PASS -> FAIL [fdo#103182]
* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#107362] +1
* igt@pm_rpm@basic-rte:
- fi-byt-j1900: PASS -> FAIL [fdo#108800]
#### Possible fixes ####
* igt@i915_module_load@reload-no-display:
- fi-bwr-2160: INCOMPLETE -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: FAIL [fdo#103167] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
Participating hosts (46 -> 43)
------------------------------
Missing (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan
Build changes
-------------
* Linux: CI_DRM_5458 -> Patchwork_11996
CI_DRM_5458: 74ec7792af09018594097356ddc79d87cb9504f9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4779: d4199510374514489b1ab56e3416f53f6c1d6291 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11996: 668fb89873712da0211716fc5371e7b7ed7a0fc0 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
668fb8987371 drm/i915: rename has_edp_a() to intel_pch_has_edp_a() 25029515ae52 drm/i915/tv: only call intel_tv_init() on platforms that might have TV fcb78959a800 drm/i915/lvds: nuke intel_lvds_supported()63516b14cceb drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS 999884307e02 drm/i915/crt: split out intel_crt_present() to platform specific setup
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11996/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup
URL : https://patchwork.freedesktop.org/series/55513/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5458_full -> Patchwork_11996_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_11996_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_eio@in-flight-external:
- shard-glk: PASS -> FAIL [fdo#105957]
* igt@kms_busy@extended-pageflip-hang-newfb-render-b:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-glk: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_color@pipe-b-degamma:
- shard-apl: PASS -> FAIL [fdo#104782]
* igt@kms_cursor_crc@cursor-128x128-dpms:
- shard-apl: PASS -> FAIL [fdo#103232]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-apl: PASS -> FAIL [fdo#103167] +1
* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-apl: PASS -> FAIL [fdo#108948]
* igt@kms_plane@plane-position-covered-pipe-a-planes:
- shard-apl: PASS -> FAIL [fdo#103166] +2
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]
#### Possible fixes ####
* igt@gem_ctx_isolation@vecs0-s3:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@gem_exec_reuse@contexts:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-snb: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_color@pipe-c-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS
* igt@kms_cursor_crc@cursor-64x64-random:
- shard-apl: FAIL [fdo#103232] -> PASS
* igt@kms_flip@flip-vs-expired-vblank:
- shard-apl: FAIL [fdo#102887] / [fdo#105363] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: FAIL [fdo#103167] -> PASS +2
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-apl: FAIL [fdo#103166] -> PASS
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-apl: DMESG-FAIL [fdo#108950] -> PASS
* igt@kms_setmode@basic:
- shard-kbl: FAIL [fdo#99912] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105957]: https://bugs.freedesktop.org/show_bug.cgi?id=105957
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* Linux: CI_DRM_5458 -> Patchwork_11996
CI_DRM_5458: 74ec7792af09018594097356ddc79d87cb9504f9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4779: d4199510374514489b1ab56e3416f53f6c1d6291 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11996: 668fb89873712da0211716fc5371e7b7ed7a0fc0 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11996/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Jani Nikula
With new platforms not having CRT support and most conditions in
intel_crt_present()being specific to DDI, split out the CRT initialization to platform specific blocks in the if ladder. Add new Pineview block for this.This puts
intel_crt_init()more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 37 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static bool has_edp_a(struct drm_i915_private *dev_priv) · line 14251
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1
-3@@ -14245,23 +14245,17 @@ static bool has_edp_a(struct drm_i915_private *dev_priv)return true; } -static bool intel_crt_present (struct drm_i915_private *dev_priv) +static bool intel_ddi_crt_present (struct drm_i915_private *dev_priv) { -if (INTEL_GEN (dev_priv) >=9 ) -return false;
We should probably keep this in case the vbt is bonkers.
Quoted 76 lines
drivers/gpu/drm/i915/intel_display.c +18
-9-if (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv))return false; -if (IS_CHERRYVIEW (dev_priv)) -return false; -if (HAS_PCH_LPT_H (dev_priv) &&I915_READ (SFUSE_STRAP ) &SFUSE_STRAP_CRT_DISABLED )return false;/* DDI E can't be used if DDI A requires 4 lanes */ -if (HAS_DDI (dev_priv) &&I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES ) +if (I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES )return false;if (!dev_priv->vbt.int_crt_support)@@ -14323,9 +14317,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)*/ intel_lvds_init (dev_priv); -if (intel_crt_present (dev_priv)) -intel_crt_init (dev_priv); -if (IS_ICELAKE (dev_priv)) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );@@ -14354,6 +14345,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_DDI (dev_priv)) {int found; +if (intel_ddi_crt_present (dev_priv)) +intel_crt_init (dev_priv); +/* * Haswell uses DDI functions to detect digital outputs. * On SKL pre-D0 the strap isn't connected, so we assume @@ -14385,6 +14379,10 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_PCH_SPLIT (dev_priv)) {int found; + +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + dpd_is_edp =intel_dp_is_port_edp (dev_priv,PORT_D );if (has_edp_a (dev_priv))@@ -14413,6 +14411,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) {bool has_edp, has_port; +if (IS_VALLEYVIEW (dev_priv) && dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +/* * The DP_DETECTED bit is the latched state of the DDC * SDA pin at boot. However since eDP doesn't require DDC @@ -14455,9 +14456,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }vlv_dsi_init (dev_priv); - }else if (!IS_GEN (dev_priv,2 ) && !IS_PINEVIEW (dev_priv)) { + }else if (IS_PINEVIEW (dev_priv)) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {DRM_DEBUG_KMS ("probing SDVOB\n" ); found =intel_sdvo_init (dev_priv,GEN3_SDVOB ,PORT_B );
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14501
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +3
-1@@ -14489,8 +14496,12 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); - }else if (IS_GEN (dev_priv,2 )) + }else if (IS_GEN (dev_priv,2 )) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv);
int_crt_support is always true for pre-vlv/pre-hsw so we could skip the check in most of these cases. Either way is fine by me.
With the gen9 stuff sorted this is
Quoted 13 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+intel_dvo_init (dev_priv); + }if (SUPPORTS_TV (dev_priv))intel_tv_init (dev_priv);Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 23 lines · Ville Syrjälä
Quoted 22 lines · Jani Nikula
With new platforms not having CRT support and most conditions in
intel_crt_present()being specific to DDI, split out the CRT initialization to platform specific blocks in the if ladder. Add new Pineview block for this.This puts
intel_crt_init()more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually have what.Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 37 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -14245,23 +14245,17 @@ static bool has_edp_a(struct drm_i915_private *dev_priv)return true; }
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c static bool has_edp_a(struct drm_i915_private *dev_priv) · line 14251
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-3-static bool intel_crt_present (struct drm_i915_private *dev_priv) +static bool intel_ddi_crt_present (struct drm_i915_private *dev_priv) { -if (INTEL_GEN (dev_priv) >=9 ) -return false;We should probably keep this in case the vbt is bonkers.
Oh, definitely, thanks for spotting!
Quoted 78 lines
Quoted 78 lines
drivers/gpu/drm/i915/intel_display.c +18
-9-if (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv))return false; -if (IS_CHERRYVIEW (dev_priv)) -return false; -if (HAS_PCH_LPT_H (dev_priv) &&I915_READ (SFUSE_STRAP ) &SFUSE_STRAP_CRT_DISABLED )return false;/* DDI E can't be used if DDI A requires 4 lanes */ -if (HAS_DDI (dev_priv) &&I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES ) +if (I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES )return false;if (!dev_priv->vbt.int_crt_support)@@ -14323,9 +14317,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)*/ intel_lvds_init (dev_priv); -if (intel_crt_present (dev_priv)) -intel_crt_init (dev_priv); -if (IS_ICELAKE (dev_priv)) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );@@ -14354,6 +14345,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_DDI (dev_priv)) {int found; +if (intel_ddi_crt_present (dev_priv)) +intel_crt_init (dev_priv); +/* * Haswell uses DDI functions to detect digital outputs. * On SKL pre-D0 the strap isn't connected, so we assume @@ -14385,6 +14379,10 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (HAS_PCH_SPLIT (dev_priv)) {int found; + +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + dpd_is_edp =intel_dp_is_port_edp (dev_priv,PORT_D );if (has_edp_a (dev_priv))@@ -14413,6 +14411,9 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) {bool has_edp, has_port; +if (IS_VALLEYVIEW (dev_priv) && dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +/* * The DP_DETECTED bit is the latched state of the DDC * SDA pin at boot. However since eDP doesn't require DDC @@ -14455,9 +14456,15 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) }vlv_dsi_init (dev_priv); - }else if (!IS_GEN (dev_priv,2 ) && !IS_PINEVIEW (dev_priv)) { + }else if (IS_PINEVIEW (dev_priv)) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); + }else if (IS_GEN_RANGE (dev_priv,3 ,4 )) {bool found = false; +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv); +if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {DRM_DEBUG_KMS ("probing SDVOB\n" ); found =intel_sdvo_init (dev_priv,GEN3_SDVOB ,PORT_B );@@ -14489,8 +14496,12 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_i915_private *dev_priv) · line 14501
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +3
-1if (IS_G4X (dev_priv) && (I915_READ (DP_D ) &DP_DETECTED ))intel_dp_init (dev_priv,DP_D ,PORT_D ); - }else if (IS_GEN (dev_priv,2 )) + }else if (IS_GEN (dev_priv,2 )) { +if (dev_priv->vbt.int_crt_support) +intel_crt_init (dev_priv);
int_crt_supportis always true for pre-vlv/pre-hsw so we could skip the check in most of these cases. Either way is fine by me.
I added that change as a separate patch on top.
Quoted 3 lines
With the gen9 stuff sorted this is
Reviewed-by Ville Syrjälä <[email protected]>
Thanks for the reviews, new series on the list.
BR,
Jani.
Quoted 14 lines
Quoted 14 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+intel_dvo_init (dev_priv); + }if (SUPPORTS_TV (dev_priv))intel_tv_init (dev_priv);Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx