[PATCH 3/3] drm/i915: Rename intel_digital_port to intel_digital

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Damien Lespiau <damien.lespiau at intel.com>

With DDI, intel_digital_port was introduced to paper over the fact that
this encoder can operate in both DisplayPort and HDMI mode. The later
structures are named intel_dp and intel_hdmi, so this newly introduced
name somewhat clashes with them.

This patches renames intel_digital_port and related functions to
intel_digital.

It is the result of :
  sed -i -e "s/intel_digital_port/intel_digital/g;s/_dig_port/_digital/g \
  drivers/gpu/drm/i915/*[ch]

and some manual fixes where the shorter name makes things fit in 80
columns again.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c  | 47 +++++++++++------------
 drivers/gpu/drm/i915/intel_dp.c   | 78 +++++++++++++++++++--------------------
 drivers/gpu/drm/i915/intel_drv.h  | 30 +++++++--------
 drivers/gpu/drm/i915/intel_hdmi.c | 46 +++++++++++------------
 4 files changed, 98 insertions(+), 103 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 59b778d..eb6023a 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -65,9 +65,8 @@ static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
 
 	if (type == INTEL_OUTPUT_DISPLAYPORT || type == INTEL_OUTPUT_EDP ||
 	    type == INTEL_OUTPUT_HDMI || type == INTEL_OUTPUT_UNKNOWN) {
-		struct intel_digital_port *intel_dig_port =
-			enc_to_dig_port(encoder);
-		return intel_dig_port->port;
+		struct intel_digital *intel_digital = enc_to_digital(encoder);
+		return intel_digital->port;
 
 	} else if (type == INTEL_OUTPUT_ANALOG) {
 		return PORT_E;
@@ -678,10 +677,9 @@ static void intel_ddi_mode_set(struct drm_encoder *encoder,
 
 	if (type == INTEL_OUTPUT_DISPLAYPORT || type == INTEL_OUTPUT_EDP) {
 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
-		struct intel_digital_port *intel_dig_port =
-			enc_to_dig_port(encoder);
+		struct intel_digital *intel_digital = enc_to_digital(encoder);
 
-		intel_dp->DP = intel_dig_port->port_reversal |
+		intel_dp->DP = intel_digital->port_reversal |
 			       DDI_BUF_CTL_ENABLE | DDI_BUF_EMP_400MV_0DB_HSW;
 		switch (intel_dp->lane_count) {
 		case 1:
@@ -1295,15 +1293,14 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)
 	int type = intel_encoder->type;
 
 	if (type == INTEL_OUTPUT_HDMI) {
-		struct intel_digital_port *intel_dig_port =
-			enc_to_dig_port(encoder);
+		struct intel_digital *intel_digital = enc_to_digital(encoder);
 
 		/* In HDMI/DVI mode, the port width, and swing/emphasis values
 		 * are ignored so nothing special needs to be done besides
 		 * enabling the port.
 		 */
 		I915_WRITE(DDI_BUF_CTL(port),
-			   intel_dig_port->port_reversal | DDI_BUF_CTL_ENABLE);
+			   intel_digital->port_reversal | DDI_BUF_CTL_ENABLE);
 	} else if (type == INTEL_OUTPUT_EDP) {
 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
 
@@ -1358,10 +1355,10 @@ void intel_ddi_pll_init(struct drm_device *dev)
 
 void intel_ddi_prepare_link_retrain(struct drm_encoder *encoder)
 {
-	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
-	struct intel_dp *intel_dp = &intel_dig_port->dp;
+	struct intel_digital *intel_digital = enc_to_digital(encoder);
+	struct intel_dp *intel_dp = &intel_digital->dp;
 	struct drm_i915_private *dev_priv = encoder->dev->dev_private;
-	enum port port = intel_dig_port->port;
+	enum port port = intel_digital->port;
 	bool wait;
 	uint32_t val;
 
@@ -1466,19 +1463,19 @@ static const struct drm_encoder_helper_funcs intel_ddi_helper_funcs = {
 void intel_ddi_init(struct drm_device *dev, enum port port)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct intel_digital_port *intel_dig_port;
+	struct intel_digital *intel_digital;
 	struct intel_encoder *intel_encoder;
 	struct drm_encoder *encoder;
 	struct intel_connector *hdmi_connector = NULL;
 	struct intel_connector *dp_connector = NULL;
 
-	intel_dig_port = kzalloc(sizeof(struct intel_digital_port), GFP_KERNEL);
-	if (!intel_dig_port)
+	intel_digital = kzalloc(sizeof(struct intel_digital), GFP_KERNEL);
+	if (!intel_digital)
 		return;
 
 	dp_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
 	if (!dp_connector) {
-		kfree(intel_dig_port);
+		kfree(intel_digital);
 		return;
 	}
 
@@ -1487,12 +1484,12 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 					 GFP_KERNEL);
 		if (!hdmi_connector) {
 			kfree(dp_connector);
-			kfree(intel_dig_port);
+			kfree(intel_digital);
 			return;
 		}
 	}
 
-	intel_encoder = &intel_dig_port->base;
+	intel_encoder = &intel_digital->base;
 	encoder = &intel_encoder->base;
 
 	drm_encoder_init(dev, encoder, &intel_ddi_funcs,
@@ -1505,14 +1502,14 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 	intel_encoder->post_disable = intel_ddi_post_disable;
 	intel_encoder->get_hw_state = intel_ddi_get_hw_state;
 
-	intel_dig_port->port = port;
-	intel_dig_port->port_reversal = I915_READ(DDI_BUF_CTL(port)) &
+	intel_digital->port = port;
+	intel_digital->port_reversal = I915_READ(DDI_BUF_CTL(port)) &
 					DDI_BUF_PORT_REVERSAL;
 	if (hdmi_connector)
-		intel_dig_port->hdmi.sdvox_reg = DDI_BUF_CTL(port);
+		intel_digital->hdmi.sdvox_reg = DDI_BUF_CTL(port);
 	else
-		intel_dig_port->hdmi.sdvox_reg = 0;
-	intel_dig_port->dp.output_reg = DDI_BUF_CTL(port);
+		intel_digital->hdmi.sdvox_reg = 0;
+	intel_digital->dp.output_reg = DDI_BUF_CTL(port);
 
 	intel_encoder->type = INTEL_OUTPUT_UNKNOWN;
 	intel_encoder->crtc_mask =  (1 << 0) | (1 << 1) | (1 << 2);
@@ -1520,6 +1517,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 	intel_encoder->hot_plug = intel_ddi_hot_plug;
 
 	if (hdmi_connector)
-		intel_hdmi_init_connector(intel_dig_port, hdmi_connector);
-	intel_dp_init_connector(intel_dig_port, dp_connector);
+		intel_hdmi_init_connector(intel_digital, hdmi_connector);
+	intel_dp_init_connector(intel_digital, dp_connector);
 }
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d76258d..c767ea9 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -47,9 +47,9 @@
  */
 static bool is_edp(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
 
-	return intel_dig_port->base.type == INTEL_OUTPUT_EDP;
+	return intel_digital->base.type == INTEL_OUTPUT_EDP;
 }
 
 /**
@@ -78,9 +78,9 @@ static bool is_cpu_edp(struct intel_dp *intel_dp)
 
 static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
 
-	return intel_dig_port->base.base.dev;
+	return intel_digital->base.base.dev;
 }
 
 static struct intel_dp *intel_attached_dp(struct drm_connector *connector)
@@ -336,8 +336,8 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		uint8_t *recv, int recv_size)
 {
 	uint32_t output_reg = intel_dp->output_reg;
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_device *dev = intel_digital->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t ch_ctl = output_reg + 0x10;
 	uint32_t ch_data = ch_ctl + 4;
@@ -348,7 +348,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 	int try, precharge;
 
 	if (IS_HASWELL(dev)) {
-		switch (intel_dig_port->port) {
+		switch (intel_digital->port) {
 		case PORT_A:
 			ch_ctl = DPA_AUX_CH_CTL;
 			ch_data = DPA_AUX_CH_DATA1;
@@ -1174,10 +1174,10 @@ void ironlake_edp_panel_off(struct intel_dp *intel_dp)
 
 void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_device *dev = intel_digital->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	int pipe = to_intel_crtc(intel_dig_port->base.base.crtc)->pipe;
+	int pipe = to_intel_crtc(intel_digital->base.base.crtc)->pipe;
 	u32 pp;
 
 	if (!is_edp(intel_dp))
@@ -1220,8 +1220,8 @@ void ironlake_edp_backlight_off(struct intel_dp *intel_dp)
 
 static void ironlake_edp_pll_on(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_crtc *crtc = intel_digital->base.base.crtc;
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	u32 dpa_ctl;
@@ -1246,8 +1246,8 @@ static void ironlake_edp_pll_on(struct intel_dp *intel_dp)
 
 static void ironlake_edp_pll_off(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_crtc *crtc = intel_digital->base.base.crtc;
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	u32 dpa_ctl;
@@ -1678,10 +1678,10 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
 			uint32_t dp_reg_value,
 			uint8_t dp_train_pat)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_device *dev = intel_digital->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	enum port port = intel_dig_port->port;
+	enum port port = intel_digital->port;
 	int ret;
 	uint32_t temp;
 
@@ -1783,7 +1783,7 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
 void
 intel_dp_start_link_train(struct intel_dp *intel_dp)
 {
-	struct drm_encoder *encoder = &dp_to_dig_port(intel_dp)->base.base;
+	struct drm_encoder *encoder = &dp_to_digital(intel_dp)->base.base;
 	struct drm_device *dev = encoder->dev;
 	int i;
 	uint8_t voltage;
@@ -1961,8 +1961,8 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
 static void
 intel_dp_link_down(struct intel_dp *intel_dp)
 {
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct drm_device *dev = intel_digital->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t DP = intel_dp->DP;
 
@@ -2002,7 +2002,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 
 	if (HAS_PCH_IBX(dev) &&
 	    I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
-		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
+		struct drm_crtc *crtc = intel_digital->base.base.crtc;
 
 		/* Hardware workaround: leaving our transcoder select
 		 * set to transcoder B while it's off will prevent the
@@ -2118,7 +2118,7 @@ intel_dp_handle_test_request(struct intel_dp *intel_dp)
 void
 intel_dp_check_link_status(struct intel_dp *intel_dp)
 {
-	struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
+	struct intel_encoder *intel_encoder = &dp_to_digital(intel_dp)->base;
 	u8 sink_irq_vector;
 	u8 link_status[DP_LINK_STATUS_SIZE];
 
@@ -2301,8 +2301,8 @@ static enum drm_connector_status
 intel_dp_detect(struct drm_connector *connector, bool force)
 {
 	struct intel_dp *intel_dp = intel_attached_dp(connector);
-	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-	struct intel_encoder *intel_encoder = &intel_dig_port->base;
+	struct intel_digital *intel_digital = dp_to_digital(intel_dp);
+	struct intel_encoder *intel_encoder = &intel_digital->base;
 	struct drm_device *dev = connector->dev;
 	enum drm_connector_status status;
 	struct edid *edid = NULL;
@@ -2476,8 +2476,8 @@ intel_dp_destroy(struct drm_connector *connector)
 
 void intel_dp_encoder_destroy(struct drm_encoder *encoder)
 {
-	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
-	struct intel_dp *intel_dp = &intel_dig_port->dp;
+	struct intel_digital *intel_digital = enc_to_digital(encoder);
+	struct intel_dp *intel_dp = &intel_digital->dp;
 
 	i2c_del_adapter(&intel_dp->adapter);
 	drm_encoder_cleanup(encoder);
@@ -2485,7 +2485,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
 		cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
 		ironlake_panel_vdd_off_sync(intel_dp);
 	}
-	kfree(intel_dig_port);
+	kfree(intel_digital);
 }
 
 static const struct drm_encoder_helper_funcs intel_dp_helper_funcs = {
@@ -2690,16 +2690,16 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,
 }
 
 void
-intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
+intel_dp_init_connector(struct intel_digital *intel_digital,
 			struct intel_connector *intel_connector)
 {
 	struct drm_connector *connector = &intel_connector->base;
-	struct intel_dp *intel_dp = &intel_dig_port->dp;
-	struct intel_encoder *intel_encoder = &intel_dig_port->base;
+	struct intel_dp *intel_dp = &intel_digital->dp;
+	struct intel_encoder *intel_encoder = &intel_digital->base;
 	struct drm_device *dev = intel_encoder->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct drm_display_mode *fixed_mode = NULL;
-	enum port port = intel_dig_port->port;
+	enum port port = intel_digital->port;
 	const char *name = NULL;
 	int type;
 
@@ -2851,22 +2851,22 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 void
 intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
 {
-	struct intel_digital_port *intel_dig_port;
+	struct intel_digital *intel_digital;
 	struct intel_encoder *intel_encoder;
 	struct drm_encoder *encoder;
 	struct intel_connector *intel_connector;
 
-	intel_dig_port = kzalloc(sizeof(struct intel_digital_port), GFP_KERNEL);
-	if (!intel_dig_port)
+	intel_digital = kzalloc(sizeof(struct intel_digital), GFP_KERNEL);
+	if (!intel_digital)
 		return;
 
 	intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
 	if (!intel_connector) {
-		kfree(intel_dig_port);
+		kfree(intel_digital);
 		return;
 	}
 
-	intel_encoder = &intel_dig_port->base;
+	intel_encoder = &intel_digital->base;
 	encoder = &intel_encoder->base;
 
 	drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
@@ -2879,13 +2879,13 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
 	intel_encoder->post_disable = intel_post_disable_dp;
 	intel_encoder->get_hw_state = intel_dp_get_hw_state;
 
-	intel_dig_port->port = port;
-	intel_dig_port->dp.output_reg = output_reg;
+	intel_digital->port = port;
+	intel_digital->dp.output_reg = output_reg;
 
 	intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
 	intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
 	intel_encoder->cloneable = false;
 	intel_encoder->hot_plug = intel_dp_hot_plug;
 
-	intel_dp_init_connector(intel_dig_port, intel_connector);
+	intel_dp_init_connector(intel_digital, intel_connector);
 }
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index afa45a9..15118e0 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -374,7 +374,7 @@ struct intel_dp {
 	struct intel_connector *attached_connector;
 };
 
-struct intel_digital_port {
+struct intel_digital {
 	struct intel_encoder base;
 	enum port port;
 	u32 port_reversal;
@@ -428,7 +428,7 @@ extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector)
 extern void intel_crt_init(struct drm_device *dev);
 extern void intel_hdmi_init(struct drm_device *dev,
 			    int sdvox_reg, enum port port);
-extern void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
+extern void intel_hdmi_init_connector(struct intel_digital *intel_digital,
 				      struct intel_connector *intel_connector);
 extern struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder);
 extern bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
@@ -446,7 +446,7 @@ extern void intel_mark_fb_idle(struct drm_i915_gem_object *obj);
 extern bool intel_lvds_init(struct drm_device *dev);
 extern void intel_dp_init(struct drm_device *dev, int output_reg,
 			  enum port port);
-extern void intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
+extern void intel_dp_init_connector(struct intel_digital *intel_digital,
 				    struct intel_connector *intel_connector);
 void
 intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
@@ -524,27 +524,27 @@ static inline struct intel_encoder *intel_attached_encoder(struct drm_connector
 
 static inline struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
 {
-	struct intel_digital_port *intel_dig_port =
-		container_of(encoder, struct intel_digital_port, base.base);
-	return &intel_dig_port->dp;
+	struct intel_digital *intel_digital =
+		container_of(encoder, struct intel_digital, base.base);
+	return &intel_digital->dp;
 }
 
-static inline struct intel_digital_port *
-enc_to_dig_port(struct drm_encoder *encoder)
+static inline struct intel_digital *
+enc_to_digital(struct drm_encoder *encoder)
 {
-	return container_of(encoder, struct intel_digital_port, base.base);
+	return container_of(encoder, struct intel_digital, base.base);
 }
 
-static inline struct intel_digital_port *
-dp_to_dig_port(struct intel_dp *intel_dp)
+static inline struct intel_digital *
+dp_to_digital(struct intel_dp *intel_dp)
 {
-	return container_of(intel_dp, struct intel_digital_port, dp);
+	return container_of(intel_dp, struct intel_digital, dp);
 }
 
-static inline struct intel_digital_port *
-hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
+static inline struct intel_digital *
+hdmi_to_digital(struct intel_hdmi *intel_hdmi)
 {
-	return container_of(intel_hdmi, struct intel_digital_port, hdmi);
+	return container_of(intel_hdmi, struct intel_digital, hdmi);
 }
 
 extern void intel_connector_attach_encoder(struct intel_connector *connector,
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 2ee9821..3fdc4c8 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -38,7 +38,7 @@
 
 static struct drm_device *intel_hdmi_to_dev(struct intel_hdmi *intel_hdmi)
 {
-	return hdmi_to_dig_port(intel_hdmi)->base.base.dev;
+	return hdmi_to_digital(intel_hdmi)->base.base.dev;
 }
 
 static void
@@ -56,9 +56,9 @@ assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi)
 
 struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
 {
-	struct intel_digital_port *intel_dig_port =
-		container_of(encoder, struct intel_digital_port, base.base);
-	return &intel_dig_port->hdmi;
+	struct intel_digital *intel_digital =
+		container_of(encoder, struct intel_digital, base.base);
+	return &intel_digital->hdmi;
 }
 
 static struct intel_hdmi *intel_attached_hdmi(struct drm_connector *connector)
@@ -794,9 +794,8 @@ static enum drm_connector_status
 intel_hdmi_detect(struct drm_connector *connector, bool force)
 {
 	struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
-	struct intel_digital_port *intel_dig_port =
-		hdmi_to_dig_port(intel_hdmi);
-	struct intel_encoder *intel_encoder = &intel_dig_port->base;
+	struct intel_digital *intel_digital = hdmi_to_digital(intel_hdmi);
+	struct intel_encoder *intel_encoder = &intel_digital->base;
 	struct drm_i915_private *dev_priv = connector->dev->dev_private;
 	struct edid *edid;
 	enum drm_connector_status status = connector_status_disconnected;
@@ -871,8 +870,7 @@ intel_hdmi_set_property(struct drm_connector *connector,
 			uint64_t val)
 {
 	struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
-	struct intel_digital_port *intel_dig_port =
-		hdmi_to_dig_port(intel_hdmi);
+	struct intel_digital *intel_digital = hdmi_to_digital(intel_hdmi);
 	struct drm_i915_private *dev_priv = connector->dev->dev_private;
 	int ret;
 
@@ -912,8 +910,8 @@ intel_hdmi_set_property(struct drm_connector *connector,
 	return -EINVAL;
 
 done:
-	if (intel_dig_port->base.base.crtc) {
-		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
+	if (intel_digital->base.base.crtc) {
+		struct drm_crtc *crtc = intel_digital->base.base.crtc;
 		intel_set_mode(crtc, &crtc->mode,
 			       crtc->x, crtc->y, crtc->fb);
 	}
@@ -959,15 +957,15 @@ intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *c
 	intel_attach_broadcast_rgb_property(connector);
 }
 
-void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
+void intel_hdmi_init_connector(struct intel_digital *intel_digital,
 			       struct intel_connector *intel_connector)
 {
 	struct drm_connector *connector = &intel_connector->base;
-	struct intel_hdmi *intel_hdmi = &intel_dig_port->hdmi;
-	struct intel_encoder *intel_encoder = &intel_dig_port->base;
+	struct intel_hdmi *intel_hdmi = &intel_digital->hdmi;
+	struct intel_encoder *intel_encoder = &intel_digital->base;
 	struct drm_device *dev = intel_encoder->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	enum port port = intel_dig_port->port;
+	enum port port = intel_digital->port;
 
 	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
 			   DRM_MODE_CONNECTOR_HDMIA);
@@ -1035,22 +1033,22 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 
 void intel_hdmi_init(struct drm_device *dev, int sdvox_reg, enum port port)
 {
-	struct intel_digital_port *intel_dig_port;
+	struct intel_digital *intel_digital;
 	struct intel_encoder *intel_encoder;
 	struct drm_encoder *encoder;
 	struct intel_connector *intel_connector;
 
-	intel_dig_port = kzalloc(sizeof(struct intel_digital_port), GFP_KERNEL);
-	if (!intel_dig_port)
+	intel_digital = kzalloc(sizeof(struct intel_digital), GFP_KERNEL);
+	if (!intel_digital)
 		return;
 
 	intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
 	if (!intel_connector) {
-		kfree(intel_dig_port);
+		kfree(intel_digital);
 		return;
 	}
 
-	intel_encoder = &intel_dig_port->base;
+	intel_encoder = &intel_digital->base;
 	encoder = &intel_encoder->base;
 
 	drm_encoder_init(dev, &intel_encoder->base, &intel_hdmi_enc_funcs,
@@ -1065,9 +1063,9 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg, enum port port)
 	intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
 	intel_encoder->cloneable = false;
 
-	intel_dig_port->port = port;
-	intel_dig_port->hdmi.sdvox_reg = sdvox_reg;
-	intel_dig_port->dp.output_reg = 0;
+	intel_digital->port = port;
+	intel_digital->hdmi.sdvox_reg = sdvox_reg;
+	intel_digital->dp.output_reg = 0;
 
-	intel_hdmi_init_connector(intel_dig_port, intel_connector);
+	intel_hdmi_init_connector(intel_digital, intel_connector);
 }
-- 
1.7.11.7



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux