From patchwork Mon Jul 2 16:14:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 1147441 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id C57B5DFFAD for ; Mon, 2 Jul 2012 16:15:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A244C9F4F2 for ; Mon, 2 Jul 2012 09:15:28 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 83BD79F2FD for ; Mon, 2 Jul 2012 09:14:55 -0700 (PDT) Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id BEB00A0FF6 for ; Mon, 2 Jul 2012 18:14:54 +0200 (CEST) Date: Mon, 02 Jul 2012 18:14:54 +0200 Message-ID: From: Takashi Iwai To: intel-gfx@lists.freedesktop.org User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Subject: [Intel-gfx] [PATCH] drm/i915: Disable LVDS while modesetting for HD+ panels X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org 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 --- 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); }