summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2009-07-10 06:39:59 (GMT)
committerEric Anholt <eric@anholt.net>2009-07-10 21:11:06 (GMT)
commit5019914ca3b7517b2d82db2e92e3f683ac48e535 (patch)
tree3415d0d5b89cae51076567854f68f0148b69506c
parentd05ca301997c94c2ef3c112b15319d13fa8cddab (diff)
downloadlinux-5019914ca3b7517b2d82db2e92e3f683ac48e535.tar.xz
drm/i915: Fix for LVDS VBT change on IGDNG
IGDNG mobile chip's LVDS data block removes panel fitting register definition. So this fixes offset for LVDS timing block parsing. Thanks for Michael Fu to catch this. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index da22863..7cc4471 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -97,6 +97,7 @@ static void
parse_lfp_panel_data(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
+ struct drm_device *dev = dev_priv->dev;
struct bdb_lvds_options *lvds_options;
struct bdb_lvds_lfp_data *lvds_lfp_data;
struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
@@ -132,7 +133,14 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
entry = (struct bdb_lvds_lfp_data_entry *)
((uint8_t *)lvds_lfp_data->data + (lfp_data_size *
lvds_options->panel_type));
- dvo_timing = &entry->dvo_timing;
+
+ /* On IGDNG mobile, LVDS data block removes panel fitting registers.
+ So dec 2 dword from dvo_timing offset */
+ if (IS_IGDNG(dev))
+ dvo_timing = (struct lvds_dvo_timing *)
+ ((u8 *)&entry->dvo_timing - 8);
+ else
+ dvo_timing = &entry->dvo_timing;
panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);