All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915/dp: Move initialization of hpd_pin to a new function
@ 2017-02-03 13:39 Ander Conselvan de Oliveira
  2017-02-03 13:39 ` [PATCH 2/3] drm/i915: Store aux power domain in intel_dp Ander Conselvan de Oliveira
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ander Conselvan de Oliveira @ 2017-02-03 13:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ander Conselvan de Oliveira

This shaves a few lines from intel_dp_init_connector() and will serve as
a good place to add other port specific information in a follow up
patch.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 54 ++++++++++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2ab0192..5cac14f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5903,6 +5903,37 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	return false;
 }
 
+static void
+intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
+{
+	struct drm_i915_private *dev_priv =
+		to_i915(intel_dig_port->base.base.dev);
+	struct intel_encoder *encoder = &intel_dig_port->base;
+
+	/* Set up the hotplug pin. */
+	switch (intel_dig_port->port) {
+	case PORT_A:
+		encoder->hpd_pin = HPD_PORT_A;
+		break;
+	case PORT_B:
+		encoder->hpd_pin = HPD_PORT_B;
+		if (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1))
+			encoder->hpd_pin = HPD_PORT_A;
+		break;
+	case PORT_C:
+		encoder->hpd_pin = HPD_PORT_C;
+		break;
+	case PORT_D:
+		encoder->hpd_pin = HPD_PORT_D;
+		break;
+	case PORT_E:
+		encoder->hpd_pin = HPD_PORT_E;
+		break;
+	default:
+		BUG();
+	}
+}
+
 bool
 intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 			struct intel_connector *intel_connector)
@@ -5988,28 +6019,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 	else
 		intel_connector->get_hw_state = intel_connector_get_hw_state;
 
-	/* Set up the hotplug pin. */
-	switch (port) {
-	case PORT_A:
-		intel_encoder->hpd_pin = HPD_PORT_A;
-		break;
-	case PORT_B:
-		intel_encoder->hpd_pin = HPD_PORT_B;
-		if (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1))
-			intel_encoder->hpd_pin = HPD_PORT_A;
-		break;
-	case PORT_C:
-		intel_encoder->hpd_pin = HPD_PORT_C;
-		break;
-	case PORT_D:
-		intel_encoder->hpd_pin = HPD_PORT_D;
-		break;
-	case PORT_E:
-		intel_encoder->hpd_pin = HPD_PORT_E;
-		break;
-	default:
-		BUG();
-	}
+	intel_dp_init_connector_port_info(intel_dig_port);
 
 	/* init MST on ports that can support it */
 	if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-03 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 13:39 [PATCH 1/3] drm/i915/dp: Move initialization of hpd_pin to a new function Ander Conselvan de Oliveira
2017-02-03 13:39 ` [PATCH 2/3] drm/i915: Store aux power domain in intel_dp Ander Conselvan de Oliveira
2017-02-03 13:39 ` [PATCH 3/3] drm/i915: Store encoder power domain in struct intel_encoder Ander Conselvan de Oliveira
2017-02-03 13:45 ` [PATCH 1/3] drm/i915/dp: Move initialization of hpd_pin to a new function Jani Nikula
2017-02-03 13:47 ` Chris Wilson
2017-02-03 15:56 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.