diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-08 14:17:15 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-06 02:20:58 -0400 |
commit | e24c5c2900ba45e2fa5ed8575ab75f6d4c7e8156 (patch) | |
tree | 8fdc9c941bc262093f6a27901f45280774dab9f4 /drivers/gpu/drm/i915/intel_lvds.c | |
parent | 6ed0f796c22cd638fac60f29ff72b3a7a03485e6 (diff) |
drm/i915: use staged outuput config in lvds->mode_fixup
- Use the check_cloned helper from the previous patch.
- Use encoder->new_crtc to check crtc properties.
v2: Kill the double negation with s/!non_cloned/is_cloned, suggested
by Jesse Barnes.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 52f9e7f37405..25b892d907b2 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -250,9 +250,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
250 | { | 250 | { |
251 | struct drm_device *dev = encoder->dev; | 251 | struct drm_device *dev = encoder->dev; |
252 | struct drm_i915_private *dev_priv = dev->dev_private; | 252 | struct drm_i915_private *dev_priv = dev->dev_private; |
253 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); | ||
254 | struct intel_lvds *intel_lvds = to_intel_lvds(encoder); | 253 | struct intel_lvds *intel_lvds = to_intel_lvds(encoder); |
255 | struct intel_encoder *tmp_encoder; | 254 | struct intel_crtc *intel_crtc = intel_lvds->base.new_crtc; |
256 | u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; | 255 | u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; |
257 | int pipe; | 256 | int pipe; |
258 | 257 | ||
@@ -262,14 +261,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
262 | return false; | 261 | return false; |
263 | } | 262 | } |
264 | 263 | ||
265 | /* Should never happen!! */ | 264 | if (intel_encoder_check_is_cloned(&intel_lvds->base)) |
266 | for_each_encoder_on_crtc(dev, encoder->crtc, tmp_encoder) { | 265 | return false; |
267 | if (&tmp_encoder->base != encoder) { | ||
268 | DRM_ERROR("Can't enable LVDS and another " | ||
269 | "encoder on the same pipe\n"); | ||
270 | return false; | ||
271 | } | ||
272 | } | ||
273 | 266 | ||
274 | /* | 267 | /* |
275 | * We have timings from the BIOS for the panel, put them in | 268 | * We have timings from the BIOS for the panel, put them in |