From patchwork Thu Nov 14 01:59:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 3180551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 017E9C045B for ; Thu, 14 Nov 2013 02:02:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 186D720945 for ; Thu, 14 Nov 2013 02:02:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2FD1520944 for ; Thu, 14 Nov 2013 02:02:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18FABFB25C; Wed, 13 Nov 2013 18:02:45 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 63E59FB25C for ; Wed, 13 Nov 2013 18:02:42 -0800 (PST) Received: by mail-pa0-f50.google.com with SMTP id hz1so1320415pad.23 for ; Wed, 13 Nov 2013 18:02:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8hed4zPRYXAzMohffoSp/LTAcpUpW+5vT2MHdWN43qM=; b=kbopUY/7RNEmsV7uSBL9bnY2TvwgmUYUCEXjeOxaDhH1T4Vv+NlBxtGi4Fbye/xAEN FczRVs6D4IlJFC1078mN7RfZoaQgXZ7dhxnz27REfA27MOcxfQZ0Gov7lZX8W4ER29+Z utsrjeHt0pjs1ePSk/Q+3JgAM4QtIBNGTkPnp50KEn2S2W4W1FWvTDb/LlKKRmetArke uTT0J5JFtcsyxl9EWGhozoyBxGM5hxbQxnzSXmqS7vWAzRrXB+G3NReoXcRbw99RT5s/ kobB0ld+ohWwZ5+PmZTt97QPhkMpPD/WMQ4djTKEXToPXqkeWDns5IyLo0Xl75typys6 nnUQ== X-Gm-Message-State: ALoCoQl5lnG2i+MCSIvREaVjNbKsLB6GdRQ7IzzWkdwKPLPOPxyYrpGXQ8qz8b/YyqQO9wsrVTrT X-Received: by 10.68.189.5 with SMTP id ge5mr44821598pbc.42.1384394561387; Wed, 13 Nov 2013 18:02:41 -0800 (PST) Received: from quad.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id wp8sm47506262pbc.26.2013.11.13.18.02.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 18:02:40 -0800 (PST) From: Olof Johansson To: Daniel Vetter Subject: [PATCH] i915: Use 120MHz LVDS SSC clock for gen5/gen6/gen7 Date: Wed, 13 Nov 2013 17:59:43 -0800 Message-Id: <1384394383-8582-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.8.4.1.601.g02b3b1d Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Duncan Laurie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Duncan Laurie We had been using a DMI table workaround to select the right frequency for devices, but this is fragile and must be updated with every new platform. Instead the default case when VBT is missing is changed to use 120MHz clock for LVDS SSC for these generations. The docs for 2010-Core, SandyBridge, and IvyBridge all indicate that the reference frequency for LVDS is 120MHz: "2010 Core" http://intellinuxgraphics.org/IHD_OS_Vol3_Part3r2.pdf page 38 Reference Frequency: 120MHz for CRT and LVDS. 100MHz for the FDI. "2011 SandyBridge" http://intellinuxgraphics.org/documentation/SNB/IHD_OS_Vol3_Part3.pdf page 33 Reference Frequency: 120MHz for CRT, HDMI, LVDS. 100MHz for the FDI. "2012 IvyBridge" http://intellinuxgraphics.org/documentation/IVB/IHD_OS_Vol3_Part4.pdf page 27 Reference Frequency: 120 MHz for CRT, HDMI, LVDS, 100MHz for the FDI. Signed-off-by: Duncan Laurie [olof: Fixup for recent base, switched from if/else to single call] Signed-off-by: Olof Johansson Reviewed-by: Rodrigo Vivi --- Daniel, This applies on top of -next, which I'm presuming is close to your for-3.13 base right now. It'd be good to see this go in since it's needed to boot on Chromebooks (with developer mode off), and is thus blocking testing next/mainline on a regular basis here. Thanks! -Olof drivers/gpu/drm/i915/intel_bios.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 6dd622d733b9..e4fba39631a5 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -790,7 +790,12 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) /* Default to using SSC */ dev_priv->vbt.lvds_use_ssc = 1; - dev_priv->vbt.lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); + /* + * Core/SandyBridge/IvyBridge use alternative (120MHz) reference + * clock for LVDS. + */ + dev_priv->vbt.lvds_ssc_freq = intel_bios_ssc_frequency(dev, + !HAS_PCH_SPLIT(dev)); DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->vbt.lvds_ssc_freq); for (port = PORT_A; port < I915_MAX_PORTS; port++) {