From patchwork Wed Jan 12 21:38:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Freed X-Patchwork-Id: 475041 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0CLdOLR005314 for ; Wed, 12 Jan 2011 21:39:46 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C1459EED8 for ; Wed, 12 Jan 2011 13:39:24 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by gabe.freedesktop.org (Postfix) with ESMTP id D4BD29EEBC for ; Wed, 12 Jan 2011 13:39:02 -0800 (PST) Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p0CLd17Y010351; Wed, 12 Jan 2011 13:39:01 -0800 Received: from bstar.mtv.corp.google.com (bstar.mtv.corp.google.com [172.22.72.32]) by hpaq12.eem.corp.google.com with ESMTP id p0CLcxnd025377; Wed, 12 Jan 2011 13:38:59 -0800 Received: by bstar.mtv.corp.google.com (Postfix, from userid 103270) id D57FA26CE23; Wed, 12 Jan 2011 13:38:58 -0800 (PST) From: bfreed@chromium.org To: intel-gfx@lists.freedesktop.org Date: Wed, 12 Jan 2011 13:38:39 -0800 Message-Id: <1294868319-17479-1-git-send-email-bfreed@chromium.org> X-Mailer: git-send-email 1.7.3.1 Cc: mdhayter@chromium.org, Bryan Freed Subject: [Intel-gfx] [PATCH] drm/i915: Modify for pineview clock source X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 12 Jan 2011 21:41:13 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index b0b1200..a1c7269 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -555,9 +555,20 @@ parse_device_mapping(struct drm_i915_private *dev_priv, return; } +static int intel_bios_ssc_frequency(struct drm_device *dev, bool high_speed) +{ + if (IS_GEN2(dev)) + return high_speed ? 66 : 48; + if (IS_GEN3(dev) || IS_GEN4(dev)) + return high_speed ? 100 : 96; + return high_speed ? 120 : 100; +} + static void init_vbt_defaults(struct drm_i915_private *dev_priv) { + struct drm_device *dev = dev_priv->dev; + dev_priv->crt_ddc_pin = GMBUS_PORT_VGADDC; /* LFP panel data */ @@ -570,7 +581,11 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) /* general features */ dev_priv->int_tv_support = 1; dev_priv->int_crt_support = 1; - dev_priv->lvds_use_ssc = 0; + + /* Default to using SSC */ + dev_priv->lvds_use_ssc = 1; + dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); + DRM_DEBUG("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq); /* eDP data */ dev_priv->edp.bpp = 18;