Skip to contentSkip to conversation

CHROMIUM: i915: Added default LVDS options for the no-VBT case

PATCH Superseded Simon Que 2 participants 2 messages Sep 23, 2010 1 message not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Simon Que

author
#1 lore raw

PATCH 1/1 CHROMIUM: i915: Added default LVDS options for the no-VBT case

I've subscribed to the intel-gfx list and am re-sending my email. Please see below, thanks.

Simon

---------- Forwarded message ----------
From: <[email protected]>
Date: Thu, Sep 23, 2010 at 12:10 PM
Subject: [PATCH] CHROMIUM: i915: Added default LVDS options for the no-VBT case
To: [email protected]

Your message has been automatically rejected because this mailing list only accepts mails from members (to avoid spam). You could subscribe the membership at
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

---------- Forwarded message ----------
From: Simon Que <[email protected]>
To: Chris Wilson <[email protected]>, Jesse Barnes <[email protected]>, Eric Anholt <[email protected]>, [email protected]
Date: Thu, 23 Sep 2010 12:10:49 -0700
Subject: [PATCH] CHROMIUM: i915: Added default LVDS options for the no-VBT case Hello,

Here is a patch that sets default LVDS values for the i915 video driver when there is no Video BIOS Table (VBT) found.

Currently, intel_bios.c in the i915 driver attempts to find the VBT.
- If the VBT is found, it will parse the VBT for each section.  The parse functions set default values for each section in case that section is missing from the VBT.
- If the VBT is not found, it exits without setting anything.

There are no default settings for the second case, where the VBT is not found.  This patch will add a function that is called only in the case of VBT not being found.  The function will set some default values for the video driver.

Currently the only thing that is being set by this function is the dither bit.  More could be added in the future.  The motivation is that our hardware does not have a VBT, but the dither bit needs to be set for the display to work properly.  We expect that the case of not having a VBT will be rare on other systems.

Please provide your comments and feedback.

Thanks,
Simon

========================================================

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.

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(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_bios.c
index 70c9d4b..ad76f30 100644

drivers/gpu/drm/i915/intel_bios.c +0 -0
@@ -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;
  }

drivers/gpu/drm/Kconfig +0 -0
index 14e21c3..94979a5 100644
@@ -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

From a9a26c9892baeb4d39557d8520be12b33245d201 Mon Sep 17 00:00:00 2001
From: Simon Que <[email protected]>
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.

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(-)
drivers/gpu/drm/i915/intel_bios.c +10 -0
index 70c9d4b..ad76f30 100644
@@ -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;
 	}
 
drivers/gpu/drm/Kconfig +9 -0
index 14e21c3..94979a5 100644
@@ -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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 2 lines · Simon Que

I've subscribed to the intel-gfx list and am re-sending my email. Please see below, thanks.

It's probably a safe assumption that the vast majority of panels will want to have dithering enabled, so just rearrange the code to set the defaults appropriately irrespective of whether a VBT is found.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre