From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 49/58] drm/i915: use staged outuput config in lvds->mode_fixup Date: Wed, 5 Sep 2012 11:02:47 -0700 Message-ID: <20120905110247.78c54fa2@jbarnes-desktop> References: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> <1345403595-9678-50-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy9.bluehost.com (oproxy9.bluehost.com [69.89.24.6]) by gabe.freedesktop.org (Postfix) with SMTP id 7C026A0305 for ; Wed, 5 Sep 2012 11:02:49 -0700 (PDT) In-Reply-To: <1345403595-9678-50-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Sun, 19 Aug 2012 21:13:06 +0200 Daniel Vetter wrote: > - Use the check_cloned helper from the previous patch. > - Use encoder->new_crtc to check crtc properties. > > Signed-Off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/intel_lvds.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c > index 52f9e7f..7f730af 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, > { > struct drm_device *dev = encoder->dev; > 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_encoder *tmp_encoder; > + struct intel_crtc *intel_crtc = intel_lvds->base.new_crtc; > u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; > int pipe; > > @@ -262,14 +261,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, > return false; > } > > - /* Should never happen!! */ > - for_each_encoder_on_crtc(dev, encoder->crtc, tmp_encoder) { > - if (&tmp_encoder->base != encoder) { > - DRM_ERROR("Can't enable LVDS and another " > - "encoder on the same pipe\n"); > - return false; > - } > - } > + if (!intel_encoder_check_non_cloned(&intel_lvds->base)) > + return false; > > /* > * We have timings from the BIOS for the panel, put them in Reviewed-by: Jesse Barnes -- Jesse Barnes, Intel Open Source Technology Center