1 From 2b5cde2b272f56ec67b56a2af8c067d42eff7328 Mon Sep 17 00:00:00 2001
2 From: Li Peng <peng.li@intel.com>
3 Date: Fri, 13 Mar 2009 10:25:07 +0800
4 Subject: drm/i915: Fix LVDS dither setting
6 Update bdb_lvds_options structure according to its defination in
7 2D driver. Then we can parse and set 'lvds_dither' bit correctly
10 Signed-off-by: Li Peng <peng.li@intel.com>
11 Signed-off-by: Eric Anholt <eric@anholt.net>
13 drivers/gpu/drm/i915/intel_bios.h | 12 ++++++------
14 drivers/gpu/drm/i915/intel_lvds.c | 2 +-
15 2 files changed, 7 insertions(+), 7 deletions(-)
17 diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
18 index 5ea715a..de621aa 100644
19 --- a/drivers/gpu/drm/i915/intel_bios.h
20 +++ b/drivers/gpu/drm/i915/intel_bios.h
21 @@ -162,13 +162,13 @@ struct bdb_lvds_options {
24 /* LVDS capabilities, stored in a dword */
28 - u8 pfit_ratio_auto:1;
29 - u8 pfit_gfx_mode_enhanced:1;
30 - u8 pfit_text_mode_enhanced:1;
32 + u8 pfit_text_mode_enhanced:1;
33 + u8 pfit_gfx_mode_enhanced:1;
34 + u8 pfit_ratio_auto:1;
39 } __attribute__((packed));
41 diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
42 index 0d211af..6619f26 100644
43 --- a/drivers/gpu/drm/i915/intel_lvds.c
44 +++ b/drivers/gpu/drm/i915/intel_lvds.c
45 @@ -265,7 +265,7 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder,
49 - if (dev_priv->panel_wants_dither)
50 + if (dev_priv->panel_wants_dither || dev_priv->lvds_dither)
51 pfit_control |= PANEL_8TO6_DITHER_ENABLE;