From patchwork Thu Sep 30 00:20:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Que X-Patchwork-Id: 218402 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 o8U0KmMT002786 for ; Thu, 30 Sep 2010 00:21:09 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21AF99F0D6 for ; Wed, 29 Sep 2010 17:20:48 -0700 (PDT) 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 A423E9E744 for ; Wed, 29 Sep 2010 17:20:26 -0700 (PDT) Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id o8U0KP0V015961 for ; Wed, 29 Sep 2010 17:20:25 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1285806025; bh=+nlZiAjv/nctcel1tD9iUScPp9w=; h=MIME-Version:Sender:Date:Message-ID:Subject:From:To:Cc: Content-Type; b=Kp7YFVp52YhXj4NWEYPZcgI/q06JVEBgIoLIaBTbcr0ig4Jo/+SKZXi3U/myn37oU 9M7zILNw+X1XlgwaTWy0Q== Received: from qyk34 (qyk34.prod.google.com [10.241.83.162]) by kpbe11.cbf.corp.google.com with ESMTP id o8U0HjxK032714 for ; Wed, 29 Sep 2010 17:20:24 -0700 Received: by qyk34 with SMTP id 34so2268759qyk.18 for ; Wed, 29 Sep 2010 17:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=wUOZJIZjLVETGso7eSVcn9AvYkUVaX6RDoQGLyok3jQ=; b=a7/uuFoB0qrFShcFg06H91XCg6lsmmsAJz4vJ4GBaJ6f9HeaK4Rb+tNABhAZt96Plc SshVHsNLuCpJC9PVhzFg== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=juzFgLbISaQz8Eb0hJxYFHjEuh6NKQ03KkUnvJCP2mWpzCwGUV849UTWj/WuxbjPn4 S1za0i8qfFOdeRgo4ijw== MIME-Version: 1.0 Received: by 10.229.192.21 with SMTP id do21mr1860740qcb.57.1285806023799; Wed, 29 Sep 2010 17:20:23 -0700 (PDT) Received: by 10.229.78.97 with HTTP; Wed, 29 Sep 2010 17:20:23 -0700 (PDT) Date: Wed, 29 Sep 2010 17:20:23 -0700 X-Google-Sender-Auth: T29d7hgI-mmf1rQz-c5LH7vEzf4 Message-ID: From: Simon Que To: Chris Wilson , Jesse Barnes , Eric Anholt , intel-gfx@lists.freedesktop.org X-System-Of-Record: true Cc: Olof Johansson , Mandeep Baines , Bryan Freed Subject: [Intel-gfx] Subject: [PATCH v4] i915: Added function to initialize VBT settings 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: , 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 00:21:09 +0000 (UTC) From 070ccd99c1f2bb6c3df40c75aa4752ac01a67e45 Mon Sep 17 00:00:00 2001 From: Simon Que Date: Wed, 22 Sep 2010 14:24:10 -0700 Subject: [PATCH] i915: Added function to initialize VBT settings Added a function that sets the LVDS values to default settings. This will be called by intel_init_bios before checking for the VBT (video BIOS table). The default values are thus loaded regardless of whether a VBT is found. The default settings in each parse function have been moved to the new function. This consolidates all the default settings into one place. The default dither bit value has been changed from 0 to 1. We can assume that display devices will want dithering enabled. Signed-off-by: Simon Que Acked-by: Olof Johansson BUG=none TEST=Splash screen looks dithered upon boot. Change-Id: If19c763824ee938ad107f655d8d94c65e39cfa56 --- drivers/gpu/drm/i915/intel_bios.c | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 96f75d7..bb298f6 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -129,10 +129,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv, int i, temp_downclock; struct drm_display_mode *temp_mode; - /* Defaults if we can't find VBT info */ - dev_priv->lvds_dither = 0; - dev_priv->lvds_vbt = 0; - lvds_options = find_section(bdb, BDB_LVDS_OPTIONS); if (!lvds_options) return; @@ -230,8 +226,6 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv, struct lvds_dvo_timing *dvo_timing; struct drm_display_mode *panel_fixed_mode; - dev_priv->sdvo_lvds_vbt_mode = NULL; - sdvo_lvds_options = find_section(bdb, BDB_SDVO_LVDS_OPTIONS); if (!sdvo_lvds_options) return; @@ -260,10 +254,6 @@ parse_general_features(struct drm_i915_private *dev_priv, struct drm_device *dev = dev_priv->dev; struct bdb_general_features *general; - /* Set sensible defaults in case we can't find the general block */ - dev_priv->int_tv_support = 1; - dev_priv->int_crt_support = 1; - general = find_section(bdb, BDB_GENERAL_FEATURES); if (general) { dev_priv->int_tv_support = general->int_tv_support; @@ -513,6 +503,22 @@ parse_device_mapping(struct drm_i915_private *dev_priv, } return; } + +static void +init_vbt_defaults(struct drm_i915_private *dev_priv) +{ + /* LFP panel data */ + dev_priv->lvds_dither = 1; + dev_priv->lvds_vbt = 0; + + /* SDVO panel data */ + dev_priv->sdvo_lvds_vbt_mode = NULL; + + /* general features */ + dev_priv->int_tv_support = 1; + dev_priv->int_crt_support = 1; +} + /** * intel_init_bios - initialize VBIOS settings & find VBT * @dev: DRM device @@ -550,6 +556,9 @@ intel_init_bios(struct drm_device *dev) } } + /* Initialize to default VBT values */ + init_vbt_defaults(dev_priv); + if (!vbt) { DRM_ERROR("VBT signature missing\n"); pci_unmap_rom(pdev, bios); -- 1.7.1