Skip to contentSkip to conversation

drm/i915/crt: split out intel_crt_present() to platform specific setup

PATCH In review Jani Nikula 3 participants 13 messages Jan 22, 2019 – Jan 24, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/7 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.

v2: keep gen >= 9 check in intel_ddi_crt_present() (Ville)

---
 drivers/gpu/drm/i915/intel_display.c | 34 ++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +24 -10
index 2fa9f4aec08e..9e0f34524d0b 100644
@@ -14245,7 +14245,7 @@ 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;
@@ -14253,15 +14253,12 @@ static bool intel_crt_present(struct drm_i915_private *dev_priv)
 	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 +14320,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 +14348,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 +14382,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 +14414,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 +14459,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 +14499,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
#1 lore raw

PATCH v2 2/7 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
index 9e0f34524d0b..29a7dd4afe0e 100644
@@ -14313,13 +14313,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);
@@ -14383,6 +14376,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);
 
@@ -14460,11 +14460,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);
 
@@ -14500,6 +14504,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
#2 lore raw

PATCH v2 3/7 drm/i915/lvds: nuke intel_lvds_supported()

In reply to Jani Nikula

Now 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
index 29a7dd4afe0e..db0f15242ccf 100644
@@ -14467,7 +14467,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);
@@ -14504,7 +14505,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
index 46a5dfd5cdf7..815ed463d9c5 100644
@@ -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
#3 lore raw

PATCH v2 4/7 drm/i915/tv: only call intel_tv_init() on platforms that might have TV

In reply to 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.

---
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -3
index db0f15242ccf..8e89f04ddd9c 100644
@@ -14504,6 +14504,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);
@@ -14514,9 +14517,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
#4 lore raw

PATCH v2 5/7 drm/i915: rename has_edp_a() to ilk_has_edp_a()

In reply to Jani Nikula

Clarify that the name is specific to ILK+ PCH platforms.

v2: prefix the name with ilk rather than pch (Ville)

---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index 8e89f04ddd9c..9895ea566f99 100644
@@ -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 ilk_has_edp_a(struct drm_i915_private *dev_priv)
 {
 	if (!IS_MOBILE(dev_priv))
 		return false;
@@ -14388,7 +14388,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 (ilk_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
Reviewed-by on v2 5/7
#5 lore raw

Re: [PATCH v2 5/7] drm/i915: rename has_edp_a() to ilk_has_edp_a()

Quoted 5 lines · Jani Nikula

Clarify that the name is specific to ILK+ PCH platforms.

v2: prefix the name with ilk rather than pch (Ville)

Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index 8e89f04ddd9c..9895ea566f99 100644
@@ -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 ilk_has_edp_a(struct drm_i915_private *dev_priv)
 {
 	if (!IS_MOBILE(dev_priv))
 		return false;
@@ -14388,7 +14388,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 (ilk_has_edp_a(dev_priv))
 			intel_dp_init(dev_priv, DP_A, PORT_A);
 
 		if (I915_READ(PCH_HDMIB) & SDVO_DETECTED) {
Signature · 1 line
2.20.1
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH v2 6/7 drm/i915/lvds: simplify gen 2 lvds presence

In reply to Jani Nikula

Gen 2 mobile and not I830 is, in fact, I85X. Simplify.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 9895ea566f99..ed3780f24638 100644
@@ -14508,7 +14508,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		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))
+		if (IS_I85X(dev_priv))
 			intel_lvds_init(dev_priv);
 
 		if (dev_priv->vbt.int_crt_support)
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 6/7
#7 lore raw

Re: [PATCH v2 6/7] drm/i915/lvds: simplify gen 2 lvds presence

Quoted 4 lines · Jani Nikula

Gen 2 mobile and not I830 is, in fact, I85X. Simplify.

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 9895ea566f99..ed3780f24638 100644
@@ -14508,7 +14508,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		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))
+		if (IS_I85X(dev_priv))
 			intel_lvds_init(dev_priv);
 
 		if (dev_priv->vbt.int_crt_support)
Signature · 1 line
2.20.1
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

PATCH v2 7/7 drm/i915/crt: simplify CRT VBT check on pre-VLV/DDI

In reply to Jani Nikula

The VBT int_crt_support can't be trusted on earlier platforms, and is always set to true in intel_bios.c for pre-DDI and pre-VLV platforms. We can simplify the output setup by unconditionally calling intel_crt_init() for these platforms.

---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -11
index ed3780f24638..d328599240cb 100644
@@ -14382,9 +14382,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		 * incorrect sharing of the PPS.
 		 */
 		intel_lvds_init(dev_priv);
-
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
 
@@ -14461,17 +14459,14 @@ 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);
+		intel_crt_init(dev_priv);
 	} else if (IS_GEN_RANGE(dev_priv, 3, 4)) {
 		bool found = false;
 
 		if (IS_MOBILE(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		if (I915_READ(GEN3_SDVOB) & SDVO_DETECTED) {
 			DRM_DEBUG_KMS("probing SDVOB\n");
@@ -14511,9 +14506,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		if (IS_I85X(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
-
+		intel_crt_init(dev_priv);
 		intel_dvo_init(dev_priv);
 	}
 
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 7/7
#9 lore raw

Re: [PATCH v2 7/7] drm/i915/crt: simplify CRT VBT check on pre-VLV/DDI

Quoted 7 lines · Jani Nikula

The VBT int_crt_support can't be trusted on earlier platforms, and is always set to true in intel_bios.c for pre-DDI and pre-VLV platforms. We can simplify the output setup by unconditionally calling intel_crt_init() for these platforms.

Quoted 52 lines
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -11
index ed3780f24638..d328599240cb 100644
@@ -14382,9 +14382,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		 * incorrect sharing of the PPS.
 		 */
 		intel_lvds_init(dev_priv);
-
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
 
@@ -14461,17 +14459,14 @@ 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);
+		intel_crt_init(dev_priv);
 	} else if (IS_GEN_RANGE(dev_priv, 3, 4)) {
 		bool found = false;
 
 		if (IS_MOBILE(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		if (I915_READ(GEN3_SDVOB) & SDVO_DETECTED) {
 			DRM_DEBUG_KMS("probing SDVOB\n");
@@ -14511,9 +14506,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		if (IS_I85X(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
-
+		intel_crt_init(dev_priv);
 		intel_dvo_init(dev_priv);
 	}
 
Signature · 1 line
2.20.1
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw

Re: [PATCH v2 7/7] drm/i915/crt: simplify CRT VBT check on pre-VLV/DDI

Quoted 10 lines · Ville Syrjälä
Quoted 7 lines · Jani Nikula

The VBT int_crt_support can't be trusted on earlier platforms, and is always set to true in intel_bios.c for pre-DDI and pre-VLV platforms. We can simplify the output setup by unconditionally calling intel_crt_init() for these platforms.

Many thanks, pushed the series.

BR,
Jani.

Quoted 53 lines
Quoted 53 lines
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -11
index ed3780f24638..d328599240cb 100644
@@ -14382,9 +14382,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		 * incorrect sharing of the PPS.
 		 */
 		intel_lvds_init(dev_priv);
-
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
 
@@ -14461,17 +14459,14 @@ 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);
+		intel_crt_init(dev_priv);
 	} else if (IS_GEN_RANGE(dev_priv, 3, 4)) {
 		bool found = false;
 
 		if (IS_MOBILE(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
+		intel_crt_init(dev_priv);
 
 		if (I915_READ(GEN3_SDVOB) & SDVO_DETECTED) {
 			DRM_DEBUG_KMS("probing SDVOB\n");
@@ -14511,9 +14506,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		if (IS_I85X(dev_priv))
 			intel_lvds_init(dev_priv);
 
-		if (dev_priv->vbt.int_crt_support)
-			intel_crt_init(dev_priv);
-
+		intel_crt_init(dev_priv);
 		intel_dvo_init(dev_priv);
 	}
 
Signature · 1 line
2.20.1
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

✓ Fi.CI.BAT: success for series starting with [v2,1/7] 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 [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup
URL : https://patchwork.freedesktop.org/series/55540/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5459 -> Patchwork_12003
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/55540/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_12003 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@suspend-read-crc-pipe-a:
- fi-apl-guc: PASS -> DMESG-WARN [fdo#108529] / [fdo#108566]

#### Possible fixes ####

* igt@kms_frontbuffer_tracking@basic:
- {fi-icl-u2}: FAIL [fdo#103167] -> PASS

* igt@pm_rpm@module-reload:
- {fi-icl-u2}: DMESG-WARN [fdo#108654] -> 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#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315

Participating hosts (47 -> 41)
------------------------------

Additional (1): fi-glk-j4005
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_5459 -> Patchwork_12003

CI_DRM_5459: 0f693a275dd91391b476ada7481cf08f4fe610aa @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4780: 1c1612bdc36b44a704095e7b0ba5542818ce793f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12003: f6c1b42bdd25a3c26ffd12155b322eb57131deba @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

f6c1b42bdd25 drm/i915/crt: simplify CRT VBT check on pre-VLV/DDI 8f9fa9fb8dff drm/i915/lvds: simplify gen 2 lvds presence
a74fbf6829d4 drm/i915: rename has_edp_a() to ilk_has_edp_a()
2574de0daa85 drm/i915/tv: only call intel_tv_init() on platforms that might have TV cdba4c424c11 drm/i915/lvds: nuke intel_lvds_supported()
66e5eb4fa89d drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS 3ae75b736cf4 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_12003/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

✓ Fi.CI.IGT: success for series starting with [v2,1/7] 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 [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup
URL : https://patchwork.freedesktop.org/series/55540/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5459_full -> Patchwork_12003_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_12003_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@pi-ringfull-blt:
- shard-apl: NOTRUN -> FAIL [fdo#103158]

* igt@kms_content_protection@legacy:
- shard-apl: NOTRUN -> FAIL [fdo#108597]

* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-apl: PASS -> FAIL [fdo#103232]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-wc:
- shard-glk: PASS -> FAIL [fdo#103167]

* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-apl: PASS -> FAIL [fdo#103166]

#### Possible fixes ####

* igt@kms_busy@extended-pageflip-hang-oldfb-render-b:
- shard-snb: {SKIP} [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-apl: DMESG-WARN [fdo#107956] -> PASS +1

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS

* igt@kms_cursor_crc@cursor-128x42-random:
- shard-apl: FAIL [fdo#103232] -> PASS +1

* igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled:
- shard-snb: {SKIP} [fdo#109271] -> PASS +4

* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-glk: FAIL [fdo#103166] -> PASS

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: FAIL -> PASS

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-apl: DMESG-FAIL [fdo#108950] -> PASS

* igt@kms_setmode@basic:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS

#### Warnings ####

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: DMESG-FAIL [fdo#105763] / [fdo#106538] -> FAIL [fdo#109381]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
[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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
[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#109381]: https://bugs.freedesktop.org/show_bug.cgi?id=109381

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* Linux: CI_DRM_5459 -> Patchwork_12003

CI_DRM_5459: 0f693a275dd91391b476ada7481cf08f4fe610aa @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4780: 1c1612bdc36b44a704095e7b0ba5542818ce793f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12003: f6c1b42bdd25a3c26ffd12155b322eb57131deba @ 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_12003/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx