Commit e24c5c29 authored by Daniel Vetter's avatar Daniel Vetter

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6ed0f796
...@@ -250,9 +250,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, ...@@ -250,9 +250,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
{ {
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_lvds *intel_lvds = to_intel_lvds(encoder); struct intel_lvds *intel_lvds = to_intel_lvds(encoder);
struct intel_encoder *tmp_encoder; struct intel_crtc *intel_crtc = intel_lvds->base.new_crtc;
u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0;
int pipe; int pipe;
...@@ -262,14 +261,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, ...@@ -262,14 +261,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
return false; return false;
} }
/* Should never happen!! */ if (intel_encoder_check_is_cloned(&intel_lvds->base))
for_each_encoder_on_crtc(dev, encoder->crtc, tmp_encoder) { return false;
if (&tmp_encoder->base != encoder) {
DRM_ERROR("Can't enable LVDS and another "
"encoder on the same pipe\n");
return false;
}
}
/* /*
* We have timings from the BIOS for the panel, put them in * We have timings from the BIOS for the panel, put them in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment