From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 48/58] drm/i915: use staged outuput config in tv->mode_fixup Date: Thu, 6 Sep 2012 09:30:01 +0200 Message-ID: <20120906073001.GC5523@phenom.ffwll.local> References: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> <1345403595-9678-49-git-send-email-daniel.vetter@ffwll.ch> <20120905110215.2e81a4cd@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com [209.85.214.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C8679E8B3 for ; Thu, 6 Sep 2012 00:29:31 -0700 (PDT) Received: by bkcji2 with SMTP id ji2so620630bkc.36 for ; Thu, 06 Sep 2012 00:29:30 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20120905110215.2e81a4cd@jbarnes-desktop> 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: Jesse Barnes Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Sep 05, 2012 at 11:02:15AM -0700, Jesse Barnes wrote: > On Sun, 19 Aug 2012 21:13:05 +0200 > Daniel Vetter wrote: > > > The "is this encoder cloned" check will be reused by the lvds encoder, > > hence exract it. > > > > v2: Be a bit more careful about that we need to check the new, staged > > ouput configuration in the check_non_cloned helper ... > > > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++++++++ > > drivers/gpu/drm/i915/intel_drv.h | 1 + > > drivers/gpu/drm/i915/intel_tv.c | 7 ++----- > > 3 files changed, 25 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index c7bd573..c59569e 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -6563,6 +6563,28 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = { > > .disable = intel_crtc_disable, > > }; > > > > +bool intel_encoder_check_non_cloned(struct intel_encoder *encoder) > > +{ > > + struct intel_encoder *other_encoder; > > + struct drm_crtc *crtc = &encoder->new_crtc->base; > > + > > + if (WARN_ON(!crtc)) > > + return true; > > + > > + list_for_each_entry(other_encoder, > > + &crtc->dev->mode_config.encoder_list, > > + base.head) { > > + > > + if (&other_encoder->new_crtc->base != crtc || > > + encoder == other_encoder) > > + continue; > > + else > > + return false; > > + } > > + > > + return true; > > +} > > encoder_is_cloned() would make the callers more readable and avoid the > double negative... Ok, got a bit bored and applied this bikeshed here, too. Won't bother with resending though. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48