diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-21 15:36:57 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-04 15:25:19 -0400 |
commit | 69438e64afc7343e641afa57f6e73618e46d8984 (patch) | |
tree | 21660ee99f92325d4e05e2ff40dca1b996ef6515 /drivers/gpu/drm/i915/intel_dvo.c | |
parent | cd234b0bfd5ab012e42274b24aae420fa1823d58 (diff) |
drm/i915/dvo: use intel_encoder to the upcast macro
More natural and will soon be even better!
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 8b4ad27791f3..39cf596cc42c 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -100,9 +100,9 @@ struct intel_dvo { | |||
100 | bool panel_wants_dither; | 100 | bool panel_wants_dither; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static struct intel_dvo *enc_to_intel_dvo(struct drm_encoder *encoder) | 103 | static struct intel_dvo *enc_to_dvo(struct intel_encoder *encoder) |
104 | { | 104 | { |
105 | return container_of(encoder, struct intel_dvo, base.base); | 105 | return container_of(encoder, struct intel_dvo, base); |
106 | } | 106 | } |
107 | 107 | ||
108 | static struct intel_dvo *intel_attached_dvo(struct drm_connector *connector) | 108 | static struct intel_dvo *intel_attached_dvo(struct drm_connector *connector) |
@@ -123,7 +123,7 @@ static bool intel_dvo_get_hw_state(struct intel_encoder *encoder, | |||
123 | { | 123 | { |
124 | struct drm_device *dev = encoder->base.dev; | 124 | struct drm_device *dev = encoder->base.dev; |
125 | struct drm_i915_private *dev_priv = dev->dev_private; | 125 | struct drm_i915_private *dev_priv = dev->dev_private; |
126 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base); | 126 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
127 | u32 tmp; | 127 | u32 tmp; |
128 | 128 | ||
129 | tmp = I915_READ(intel_dvo->dev.dvo_reg); | 129 | tmp = I915_READ(intel_dvo->dev.dvo_reg); |
@@ -140,7 +140,7 @@ static void intel_dvo_get_config(struct intel_encoder *encoder, | |||
140 | struct intel_crtc_config *pipe_config) | 140 | struct intel_crtc_config *pipe_config) |
141 | { | 141 | { |
142 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; | 142 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; |
143 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base); | 143 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
144 | u32 tmp, flags = 0; | 144 | u32 tmp, flags = 0; |
145 | 145 | ||
146 | tmp = I915_READ(intel_dvo->dev.dvo_reg); | 146 | tmp = I915_READ(intel_dvo->dev.dvo_reg); |
@@ -159,7 +159,7 @@ static void intel_dvo_get_config(struct intel_encoder *encoder, | |||
159 | static void intel_disable_dvo(struct intel_encoder *encoder) | 159 | static void intel_disable_dvo(struct intel_encoder *encoder) |
160 | { | 160 | { |
161 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; | 161 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; |
162 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base); | 162 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
163 | u32 dvo_reg = intel_dvo->dev.dvo_reg; | 163 | u32 dvo_reg = intel_dvo->dev.dvo_reg; |
164 | u32 temp = I915_READ(dvo_reg); | 164 | u32 temp = I915_READ(dvo_reg); |
165 | 165 | ||
@@ -171,7 +171,7 @@ static void intel_disable_dvo(struct intel_encoder *encoder) | |||
171 | static void intel_enable_dvo(struct intel_encoder *encoder) | 171 | static void intel_enable_dvo(struct intel_encoder *encoder) |
172 | { | 172 | { |
173 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; | 173 | struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; |
174 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base); | 174 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
175 | u32 dvo_reg = intel_dvo->dev.dvo_reg; | 175 | u32 dvo_reg = intel_dvo->dev.dvo_reg; |
176 | u32 temp = I915_READ(dvo_reg); | 176 | u32 temp = I915_READ(dvo_reg); |
177 | 177 | ||
@@ -245,7 +245,7 @@ static bool intel_dvo_mode_fixup(struct drm_encoder *encoder, | |||
245 | const struct drm_display_mode *mode, | 245 | const struct drm_display_mode *mode, |
246 | struct drm_display_mode *adjusted_mode) | 246 | struct drm_display_mode *adjusted_mode) |
247 | { | 247 | { |
248 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder); | 248 | struct intel_dvo *intel_dvo = enc_to_dvo(to_intel_encoder(encoder)); |
249 | 249 | ||
250 | /* If we have timings from the BIOS for the panel, put them in | 250 | /* If we have timings from the BIOS for the panel, put them in |
251 | * to the adjusted mode. The CRTC will be set up for this mode, | 251 | * to the adjusted mode. The CRTC will be set up for this mode, |
@@ -279,7 +279,7 @@ static void intel_dvo_mode_set(struct drm_encoder *encoder, | |||
279 | struct drm_device *dev = encoder->dev; | 279 | struct drm_device *dev = encoder->dev; |
280 | struct drm_i915_private *dev_priv = dev->dev_private; | 280 | struct drm_i915_private *dev_priv = dev->dev_private; |
281 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); | 281 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); |
282 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder); | 282 | struct intel_dvo *intel_dvo = enc_to_dvo(to_intel_encoder(encoder)); |
283 | int pipe = intel_crtc->pipe; | 283 | int pipe = intel_crtc->pipe; |
284 | u32 dvo_val; | 284 | u32 dvo_val; |
285 | u32 dvo_reg = intel_dvo->dev.dvo_reg, dvo_srcdim_reg; | 285 | u32 dvo_reg = intel_dvo->dev.dvo_reg, dvo_srcdim_reg; |
@@ -391,7 +391,7 @@ static const struct drm_connector_helper_funcs intel_dvo_connector_helper_funcs | |||
391 | 391 | ||
392 | static void intel_dvo_enc_destroy(struct drm_encoder *encoder) | 392 | static void intel_dvo_enc_destroy(struct drm_encoder *encoder) |
393 | { | 393 | { |
394 | struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder); | 394 | struct intel_dvo *intel_dvo = enc_to_dvo(to_intel_encoder(encoder)); |
395 | 395 | ||
396 | if (intel_dvo->dev.dev_ops->destroy) | 396 | if (intel_dvo->dev.dev_ops->destroy) |
397 | intel_dvo->dev.dev_ops->destroy(&intel_dvo->dev); | 397 | intel_dvo->dev.dev_ops->destroy(&intel_dvo->dev); |