From: Chris Wilson Subject: Re: [PATCH 2/2] drm/i915: set dither bits on eDP panels too Date: Tue, 07 Sep 2010 23:09:42 +0100 Message-ID: <8u3s94$ger48a@orsmga002.jf.intel.com> References: <1283896086-2727-1-git-send-email-jbarnes@virtuousgeek.org> <1283896086-2727-2-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D2FD9E772 for ; Tue, 7 Sep 2010 15:09:45 -0700 (PDT) In-Reply-To: <1283896086-2727-2-git-send-email-jbarnes@virtuousgeek.org> 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 , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 7 Sep 2010 14:48:06 -0700, Jesse Barnes wrote: > We really need a macro to test whether a given connector has a panel attached rather than sprinkling HAS_PCH_SPLIT/IS_eDP/has_edp_encoder etc all over. Now that you mention it, it would be nice. ;-) Comment inline. > Signed-off-by: Jesse Barnes > --- > drivers/gpu/drm/i915/intel_display.c | 25 +++++++++++++------------ > 1 files changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index c23e7e3..f0a9f00 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -3954,23 +3954,24 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, > * appropriately here, but we need to look more thoroughly into how > * panels behave in the two modes. > */ > - /* set the dithering flag */ > + /* set the dithering flag on non-PCH LVDS as needed */ > if (IS_I965G(dev)) { > - if (dev_priv->lvds_dither) { > - if (HAS_PCH_SPLIT(dev)) { > - pipeconf |= PIPECONF_DITHER_EN; > - pipeconf |= PIPECONF_DITHER_TYPE_ST1; > - } else > - lvds |= LVDS_ENABLE_DITHER; > - } else { > - if (!HAS_PCH_SPLIT(dev)) { > - lvds &= ~LVDS_ENABLE_DITHER; > - } > - } > + if (dev_priv->lvds_dither && !HAS_PCH_SPLIT(dev)) > + lvds |= LVDS_ENABLE_DITHER; > + else if (!HAS_PCH_SPLIT(dev)) > + lvds &= ~LVDS_ENABLE_DITHER; Lets take one more step in cleaning up this conditional... -- Chris Wilson, Intel Open Source Technology Centre