From patchwork Mon Nov 5 12:28:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1696821 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4732B3FCDE for ; Mon, 5 Nov 2012 12:38:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AC059F772 for ; Mon, 5 Nov 2012 04:38:48 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 395E99F755 for ; Mon, 5 Nov 2012 04:37:08 -0800 (PST) Received: by mail-ea0-f177.google.com with SMTP id n13so2277152eaa.36 for ; Mon, 05 Nov 2012 04:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PzwPOXCJxv4FdMyWs2ovODShzyiadPihceJCcoP0nCw=; b=YNAQSULsC7O1hOXZDuqDrAZ/MhY7uVy91a5Qoj+myF93E05ply23M1+XdeZZ3IBO5p 1adoSJNny7C9NE00lNGydU41TIVRj4zhg/DVKF2dcu5oy/KW3laYUUbg93yG45LXale2 2YB/fQBdi/gIm/WDPDHO8JBh6dtZnPdsqaxDs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=PzwPOXCJxv4FdMyWs2ovODShzyiadPihceJCcoP0nCw=; b=Ok6722tLn+yCuXlQNHbK9oDu6U6n4mBrGB6Gocc1B1pfWcbBRk9pFSEhxAJbtew8PT 3dTIFavKyu6kCn7QO+W1pIMJXiW2oHZVjF7t42fUdCipD1VpLIEUm88BPZFLYv7pYvkY 3zQXcNpeEu0sROQ7b8nMmy0s9YjjPHCLlJuBMK9TLDxPy60rbS+Wcsif4nTtBn2bERtP dElVyUy1zaZI4EeDP1NLbYXwJpgZfNATn2GrDYZxdcfHlhGzHnkRwA2YFD6BJtUe1UEf jQqj/Wkd5/ZuLUP3uTaVn+009rnuXSTgAD5pwNzcqgIUABtxoz4GIFAC0+VTEgWQimh2 pi2A== Received: by 10.14.182.5 with SMTP id n5mr36358426eem.5.1352119027294; Mon, 05 Nov 2012 04:37:07 -0800 (PST) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id g5sm47854744eem.4.2012.11.05.04.37.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Nov 2012 04:37:06 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Mon, 5 Nov 2012 13:28:21 +0100 Message-Id: <1352118507-6933-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1352118507-6933-1-git-send-email-daniel.vetter@ffwll.ch> References: <1352118507-6933-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnodbo22if78AIpob56dpBcWcKVyU4oAAd27K75CT8Tu0+JA/0xiK71y5EmX5CpkZQZn1t5 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/8] drm/i915: replace ad-hoc dual-link lvds checks 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: , MIME-Version: 1.0 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 ... with is_dual_link_lvds introduced in commit b03543857fd75876b96e10d4320b775e95041bb7 Author: Takashi Iwai Date: Tue Mar 20 13:07:05 2012 +0100 drm/i915: Check VBIOS value for determining LVDS dual channel mode, too All these checks predate this commit and have simply been overlooked. Since we don't support switching between single-link and dual-link modes anyway, this different checks could at best only get in the way of refactorings, and in the worst case cause inconsistencies. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1ad6d34..0973391 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -690,8 +690,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_clock_t clock; int err = target; - if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && - (I915_READ(LVDS)) != 0) { + if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { /* * For LVDS, if the panel is on, just rely on its current * settings for dual-channel. We haven't figured out how to @@ -766,8 +765,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, lvds_reg = PCH_LVDS; else lvds_reg = LVDS; - if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) == - LVDS_CLKB_POWER_UP) + if (is_dual_link_lvds(dev_priv, lvds_reg)) clock.p2 = limit->p2.p2_fast; else clock.p2 = limit->p2.p2_slow; @@ -5360,7 +5358,7 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc, if (is_lvds) { if ((intel_panel_use_ssc(dev_priv) && dev_priv->lvds_ssc_freq == 100) || - (I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP) + is_dual_link_lvds(dev_priv, PCH_LVDS)) factor = 25; } else if (is_sdvo && is_tv) factor = 20;