From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathias =?ISO-8859-1?Q?Fr=F6hlich?= Subject: [PATCH] i915: Add option to bypass vbt table. Date: Wed, 29 Feb 2012 20:34:37 +0100 Message-ID: <2824173.NJ2ap5z4Oh@notebook> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2916302.9PHzSY4qtG" Content-Transfer-Encoding: 7Bit Return-path: Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by gabe.freedesktop.org (Postfix) with SMTP id E79409E90A for ; Wed, 29 Feb 2012 11:34:40 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: "e.waelde" , koenig@linux.de List-Id: dri-devel@lists.freedesktop.org --nextPart2916302.9PHzSY4qtG Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, Attached is a small change to i915 that fixes a customer case that I had in my day job. The problem happens with an embedded board that contains vbt bios tables that do not match the attached display. Using this change and the apropriate kernel boot command line they are able to use an otherwise completely unusable secondary display on that embedded board. Please review. Thanks! Mathias --nextPart2916302.9PHzSY4qtG Content-Disposition: attachment; filename="0001-i915-Add-option-to-bypass-vbt-table.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-i915-Add-option-to-bypass-vbt-table.patch" >>From 4c19b0f14a69ece1bd9729bfcd86f7bbe879a0a6 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Wed, 29 Feb 2012 20:12:59 +0100 Subject: [PATCH] i915: Add option to bypass vbt table. Add an option to skip reading the mode entries from the vbt bios tables. This change enables the use of displays where the vbt table just contains inapropriate values, but either the vesa defaults or the video=... modes do something sensible with the attached display. Signed-off-by: Mathias Froehlich --- drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/intel_bios.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 308f819..0975895 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -89,8 +89,8 @@ MODULE_PARM_DESC(lvds_use_ssc, int i915_vbt_sdvo_panel_type __read_mostly = -1; module_param_named(vbt_sdvo_panel_type, i915_vbt_sdvo_panel_type, int, 0600); MODULE_PARM_DESC(vbt_sdvo_panel_type, - "Override selection of SDVO panel mode in the VBT " - "(default: auto)"); + "Override/Ignore selection of SDVO panel mode in the VBT " + "(-2=ignore, -1=auto [default], index in VBT BIOS table)"); static bool i915_try_reset __read_mostly = true; module_param_named(reset, i915_try_reset, bool, 0600); diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 63880e2..7670b09 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -255,6 +255,11 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv, int index; index = i915_vbt_sdvo_panel_type; + if (index == -2) { + DRM_DEBUG_KMS("Ignore SDVO panel mode from BIOS VBT tables.\n"); + return; + } + if (index == -1) { struct bdb_sdvo_lvds_options *sdvo_lvds_options; -- 1.7.1 --nextPart2916302.9PHzSY4qtG Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --nextPart2916302.9PHzSY4qtG--