aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-09 10:14:28 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-09 12:00:13 -0400
commit4ef69c7a64b78d477d1666eba258ca049e8bac91 (patch)
tree7d75ec83524c1f1414eddc8ff2c14a4124f54983 /drivers/gpu/drm/i915/intel_dp.c
parent1af5fa1b7e5ff8332f8a2ee3c5fb44d93b34868d (diff)
drm/i915: Rename intel_encoder->enc to base for consistency
[Patch is slightly larger than is strictly necessary to fixup surrounding checkpatch.pl errors.] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c7aa29bfdea9..6cdc53de24ac 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -64,7 +64,7 @@ struct intel_dp {
64 64
65static struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder) 65static struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
66{ 66{
67 return container_of(enc_to_intel_encoder(encoder), struct intel_dp, base); 67 return container_of(encoder, struct intel_dp, base.base);
68} 68}
69 69
70static void intel_dp_start_link_train(struct intel_dp *intel_dp); 70static void intel_dp_start_link_train(struct intel_dp *intel_dp);
@@ -236,7 +236,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
236 uint8_t *recv, int recv_size) 236 uint8_t *recv, int recv_size)
237{ 237{
238 uint32_t output_reg = intel_dp->output_reg; 238 uint32_t output_reg = intel_dp->output_reg;
239 struct drm_device *dev = intel_dp->base.enc.dev; 239 struct drm_device *dev = intel_dp->base.base.dev;
240 struct drm_i915_private *dev_priv = dev->dev_private; 240 struct drm_i915_private *dev_priv = dev->dev_private;
241 uint32_t ch_ctl = output_reg + 0x10; 241 uint32_t ch_ctl = output_reg + 0x10;
242 uint32_t ch_data = ch_ctl + 4; 242 uint32_t ch_data = ch_ctl + 4;
@@ -704,7 +704,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
704{ 704{
705 struct drm_device *dev = encoder->dev; 705 struct drm_device *dev = encoder->dev;
706 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); 706 struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
707 struct drm_crtc *crtc = intel_dp->base.enc.crtc; 707 struct drm_crtc *crtc = intel_dp->base.base.crtc;
708 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 708 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
709 709
710 intel_dp->DP = (DP_VOLTAGE_0_4 | 710 intel_dp->DP = (DP_VOLTAGE_0_4 |
@@ -1174,9 +1174,9 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
1174 uint8_t dp_train_pat, 1174 uint8_t dp_train_pat,
1175 bool first) 1175 bool first)
1176{ 1176{
1177 struct drm_device *dev = intel_dp->base.enc.dev; 1177 struct drm_device *dev = intel_dp->base.base.dev;
1178 struct drm_i915_private *dev_priv = dev->dev_private; 1178 struct drm_i915_private *dev_priv = dev->dev_private;
1179 struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.enc.crtc); 1179 struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
1180 int ret; 1180 int ret;
1181 1181
1182 I915_WRITE(intel_dp->output_reg, dp_reg_value); 1182 I915_WRITE(intel_dp->output_reg, dp_reg_value);
@@ -1200,7 +1200,7 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
1200static void 1200static void
1201intel_dp_start_link_train(struct intel_dp *intel_dp) 1201intel_dp_start_link_train(struct intel_dp *intel_dp)
1202{ 1202{
1203 struct drm_device *dev = intel_dp->base.enc.dev; 1203 struct drm_device *dev = intel_dp->base.base.dev;
1204 int i; 1204 int i;
1205 uint8_t voltage; 1205 uint8_t voltage;
1206 bool clock_recovery = false; 1206 bool clock_recovery = false;
@@ -1280,7 +1280,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
1280static void 1280static void
1281intel_dp_complete_link_train(struct intel_dp *intel_dp) 1281intel_dp_complete_link_train(struct intel_dp *intel_dp)
1282{ 1282{
1283 struct drm_device *dev = intel_dp->base.enc.dev; 1283 struct drm_device *dev = intel_dp->base.base.dev;
1284 struct drm_i915_private *dev_priv = dev->dev_private; 1284 struct drm_i915_private *dev_priv = dev->dev_private;
1285 bool channel_eq = false; 1285 bool channel_eq = false;
1286 int tries; 1286 int tries;
@@ -1345,7 +1345,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
1345static void 1345static void
1346intel_dp_link_down(struct intel_dp *intel_dp) 1346intel_dp_link_down(struct intel_dp *intel_dp)
1347{ 1347{
1348 struct drm_device *dev = intel_dp->base.enc.dev; 1348 struct drm_device *dev = intel_dp->base.base.dev;
1349 struct drm_i915_private *dev_priv = dev->dev_private; 1349 struct drm_i915_private *dev_priv = dev->dev_private;
1350 uint32_t DP = intel_dp->DP; 1350 uint32_t DP = intel_dp->DP;
1351 1351
@@ -1388,7 +1388,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
1388static void 1388static void
1389intel_dp_check_link_status(struct intel_dp *intel_dp) 1389intel_dp_check_link_status(struct intel_dp *intel_dp)
1390{ 1390{
1391 if (!intel_dp->base.enc.crtc) 1391 if (!intel_dp->base.base.crtc)
1392 return; 1392 return;
1393 1393
1394 if (!intel_dp_get_link_status(intel_dp)) { 1394 if (!intel_dp_get_link_status(intel_dp)) {
@@ -1438,7 +1438,7 @@ intel_dp_detect(struct drm_connector *connector)
1438{ 1438{
1439 struct drm_encoder *encoder = intel_attached_encoder(connector); 1439 struct drm_encoder *encoder = intel_attached_encoder(connector);
1440 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); 1440 struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
1441 struct drm_device *dev = intel_dp->base.enc.dev; 1441 struct drm_device *dev = intel_dp->base.base.dev;
1442 struct drm_i915_private *dev_priv = dev->dev_private; 1442 struct drm_i915_private *dev_priv = dev->dev_private;
1443 uint32_t temp, bit; 1443 uint32_t temp, bit;
1444 enum drm_connector_status status; 1444 enum drm_connector_status status;
@@ -1482,7 +1482,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
1482{ 1482{
1483 struct drm_encoder *encoder = intel_attached_encoder(connector); 1483 struct drm_encoder *encoder = intel_attached_encoder(connector);
1484 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); 1484 struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
1485 struct drm_device *dev = intel_dp->base.enc.dev; 1485 struct drm_device *dev = intel_dp->base.base.dev;
1486 struct drm_i915_private *dev_priv = dev->dev_private; 1486 struct drm_i915_private *dev_priv = dev->dev_private;
1487 int ret; 1487 int ret;
1488 1488
@@ -1670,12 +1670,12 @@ intel_dp_init(struct drm_device *dev, int output_reg)
1670 intel_dp->has_audio = false; 1670 intel_dp->has_audio = false;
1671 intel_dp->dpms_mode = DRM_MODE_DPMS_ON; 1671 intel_dp->dpms_mode = DRM_MODE_DPMS_ON;
1672 1672
1673 drm_encoder_init(dev, &intel_encoder->enc, &intel_dp_enc_funcs, 1673 drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
1674 DRM_MODE_ENCODER_TMDS); 1674 DRM_MODE_ENCODER_TMDS);
1675 drm_encoder_helper_add(&intel_encoder->enc, &intel_dp_helper_funcs); 1675 drm_encoder_helper_add(&intel_encoder->base, &intel_dp_helper_funcs);
1676 1676
1677 drm_mode_connector_attach_encoder(&intel_connector->base, 1677 drm_mode_connector_attach_encoder(&intel_connector->base,
1678 &intel_encoder->enc); 1678 &intel_encoder->base);
1679 drm_sysfs_connector_add(connector); 1679 drm_sysfs_connector_add(connector);
1680 1680
1681 /* Set up the DDC bus. */ 1681 /* Set up the DDC bus. */