From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Disable LVDS while modesetting for HD+ panels Date: Mon, 2 Jul 2012 18:53:29 +0200 Message-ID: <20120702165329.GE5064@phenom.ffwll.local> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ey0-f177.google.com (mail-ey0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id B2BCA9E7D9 for ; Mon, 2 Jul 2012 09:53:32 -0700 (PDT) Received: by eaaf11 with SMTP id f11so2233836eaa.36 for ; Mon, 02 Jul 2012 09:53:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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: Takashi Iwai Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Jul 02, 2012 at 06:14:54PM +0200, Takashi Iwai wrote: > Some SNB/IVY Laptops with 1600x900 HD+ panel (e.g. Dell Latitude E6420 > and HP ProBook 65xx) are known to show the whole black/white garbage > or flickering screens while starting up or changing the mode. > This can be worked around by disabling LVDS off while changing the > mode. > > Since this doesn't give any visible drawback on machines I've tested, > enable it generically for HD+ panels for SCH-split case. > > Tested-by: Giacomo Comes > Cc: > Signed-off-by: Takashi Iwai As part of a larger rework effort for the modeset stuff I've stumbled over this, too - I see detiled garbage on some mode switches. http://cgit.freedesktop.org/~danvet/drm/commit/?h=modeset-rework&id=bf8528171b2c2bb94aeca8316e26e017e42643d3 So my question: why so complicated, and what's the justification for the funky hdisplay/vdisplay condiditons? Cheers, Daniel > --- > drivers/gpu/drm/i915/intel_lvds.c | 25 +++++++++++++++++++------ > 1 file changed, 19 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c > index 08eb04c..cf1c150 100644 > --- a/drivers/gpu/drm/i915/intel_lvds.c > +++ b/drivers/gpu/drm/i915/intel_lvds.c > @@ -407,13 +407,26 @@ out: > static void intel_lvds_prepare(struct drm_encoder *encoder) > { > struct intel_lvds *intel_lvds = to_intel_lvds(encoder); > + bool do_disable = false; > > - /* > - * Prior to Ironlake, we must disable the pipe if we want to adjust > - * the panel fitter. However at all other times we can just reset > - * the registers regardless. > - */ > - if (!HAS_PCH_SPLIT(encoder->dev) && intel_lvds->pfit_dirty) > + if (HAS_PCH_SPLIT(encoder->dev)) { > + /* Some HD+ panels require the pipe-off while mode changing; > + * otherwise you'll get B/W garbage or sustaining flickering > + * screen > + */ > + if (intel_lvds->fixed_mode->hdisplay >= 1600 && > + intel_lvds->fixed_mode->vdisplay >= 900) > + do_disable = true; > + } else { > + /* > + * Prior to Ironlake, we must disable the pipe if we want to > + * adjust the panel fitter. However at all other times we can > + * just reset the registers regardless. > + */ > + do_disable = intel_lvds->pfit_dirty; > + } > + > + if (do_disable) > intel_lvds_disable(intel_lvds); > } > > -- > 1.7.10.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48