diff options
author | Patrik Jakobsson | 2011-05-24 14:04:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-06-07 21:28:41 +0200 |
commit | 3ab8be53155617fa7ecc5b8cd259a458727a1d90 (patch) | |
tree | 834db02ffd3d5e66d972df7d8cd7d05213485fc5 /drivers/staging/gma500/psb_intel_bios.c | |
parent | staging: usbip: bugfix prevent driver unbind (diff) | |
download | kernel-qcow2-linux-3ab8be53155617fa7ecc5b8cd259a458727a1d90.tar.gz kernel-qcow2-linux-3ab8be53155617fa7ecc5b8cd259a458727a1d90.tar.xz kernel-qcow2-linux-3ab8be53155617fa7ecc5b8cd259a458727a1d90.zip |
staging: gma500: Skip bogus LVDS VBT mode and check for LVDS before adding backlight
On the Fit-PC2 the VBT reports an invalid fixed panel mode for LVDS, this gets
in the way for SDVO. This patch makes VBT parsing skip the invalid mode. When
there is no LVDS output the backlight support crashes so the patch also checks
for this before enabling it.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500/psb_intel_bios.c')
-rw-r--r-- | drivers/staging/gma500/psb_intel_bios.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/gma500/psb_intel_bios.c b/drivers/staging/gma500/psb_intel_bios.c index 48ac8ba7f40b..417965da5e24 100644 --- a/drivers/staging/gma500/psb_intel_bios.c +++ b/drivers/staging/gma500/psb_intel_bios.c @@ -154,10 +154,15 @@ static void parse_lfp_panel_data(struct drm_psb_private *dev_priv, fill_detail_timing_data(panel_fixed_mode, dvo_timing); - dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; - - DRM_DEBUG("Found panel mode in BIOS VBT tables:\n"); - drm_mode_debug_printmodeline(panel_fixed_mode); + if (panel_fixed_mode->htotal > 0 && panel_fixed_mode->vtotal > 0) { + dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; + DRM_DEBUG("Found panel mode in BIOS VBT tables:\n"); + drm_mode_debug_printmodeline(panel_fixed_mode); + } else { + DRM_DEBUG("Ignoring bogus LVDS VBT mode.\n"); + dev_priv->lvds_vbt = 0; + kfree(panel_fixed_mode); + } return; } |