i915: Add option to bypass vbt table.
Subsystems (2)
PATCH 1/1 i915: Add option to bypass vbt table.
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
Quoted 1 line
From
4c19b0f14a69ece1bd9729bfcd86f7bbe879a0a6Mon Sep 17 00:00:00 2001
From: Mathias Froehlich <[email protected]>
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.
--- drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/intel_bios.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -2
@@ -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 );
drivers/gpu/drm/i915/intel_bios.c +5 -0
@@ -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;
Signature · 1 line
1.7.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Dear Mathias,
thank you for your patch. Could you please resend it as [PATCH v2] with the following things addressed.
1. Please do not send attached patches. Just copy it into your message compose window – make sure to turn off automatic line breaks – and adapt the subject line and recipients or use git send-email ….
Am Mittwoch, den 29.02.2012, 20:34 +0100 schrieb Mathias Fröhlich:
Quoted 2 lines
From
4c19b0f14a69ece1bd9729bfcd86f7bbe879a0a6Mon Sep 17 00:00:00 2001
From: Mathias Froehlich <[email protected]>
Please change this to your address in the Signed-off-by line.
git config --global user.email [email protected]
You can also use umlauts. Nowadays that poses no problem.
Quoted 7 lines
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
inap*p*ropriate
Quoted 28 lines
the video=... modes do something sensible with the attached display.
Signed-off-by Mathias Froehlich <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 4 ++-- drivers/gpu/drm/i915/intel_bios.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_drv.c +2
-2@@ -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 );drivers/gpu/drm/i915/intel_bios.c +0
-0
drivers/gpu/drm/i915/intel_bios.c parse_sdvo_panel_data(struct drm_i915_private *dev_priv, · line 264
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +5
-0@@ -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;
Otherwise this patch looks fine, so you can directly add
to the commit message of the patch.
You can apply all these changes doing the follwing.
git commit --amend --author="Mathias Fröhlich <[email protected]>"
Thanks,
Paul
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 2 lines · On Wednesday, February 29, 2012 22:04:45 you wrote:
thank you for your patch. Could you please resend it as [PATCH v2] with the following things addressed.
Will do. Thanks!
Mathias