From a9a26c9892baeb4d39557d8520be12b33245d201 Mon Sep 17 00:00:00 2001
From: Simon Que <sque@google.com>
Date: Wed, 22 Sep 2010 14:24:10 -0700
Subject: [PATCH] CHROMIUM: i915: Added default LVDS options for the no-VBT case
Added a function that sets the LVDS values to default settings (currently only
dither bit) when there is no VBT (video BIOS table) found.
Signed-off-by: Simon Que <sque@chromium.org>
BUG=none
TEST=Splash screen looks dithered upon boot.
Change-Id: If19c763824ee938ad107f655d8d94c65e39cfa56
---
drivers/gpu/drm/Kconfig | 9 +++++++++
drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
@@ -501,6 +501,15 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
}
return;
}
+
+static void
+get_no_vbt_default_settings(struct drm_i915_private *dev_priv)
+{
+#if CONFIG_DRM_I915_ENABLE_NO_VBT_DEFAULTS
+ dev_priv->lvds_dither = 1;
+#endif
+}
+
/**
* intel_init_bios - initialize VBIOS settings & find VBT
* @dev: DRM device
@@ -541,6 +550,7 @@ intel_init_bios(struct drm_device *dev)
if (!vbt) {
DRM_ERROR("VBT signature missing\n");
pci_unmap_rom(pdev, bios);
+ get_no_vbt_default_settings(dev_priv);
return -1;
}
@@ -136,6 +136,15 @@ config DRM_I915_DIRECT_BACKLIGHT
Direct backlight control gives finer granularity (0-256) than ACPI
and does not require BIOS support.
+config DRM_I915_ENABLE_NO_VBT_DEFAULTS
+ bool "Set default BIOS settings when VBT is not found"
+ depends on DRM_I915
+ help
+ Choose this option if you want the i915 driver to set the device
+ settings to a set of defaults in the event that VBT is not found.
+ This will happen on systems with firmware that does not initialize
+ video.
+
endchoice
config DRM_MGA
--
1.7.1