提交 78010c75 编写于 作者: A Alan Cox 提交者: Greg Kroah-Hartman

gma500: Sort out dither

Ubuntu users reported that dithering was not being set on Poulsbo, and they
have a point as we set one variable and check another which is never set.
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Tested-by: NLuca Forina <luca.forina@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f00dfacb
...@@ -356,6 +356,7 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder, ...@@ -356,6 +356,7 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder,
struct psb_intel_mode_device *mode_dev = struct psb_intel_mode_device *mode_dev =
enc_to_psb_intel_output(encoder)->mode_dev; enc_to_psb_intel_output(encoder)->mode_dev;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
u32 pfit_control; u32 pfit_control;
/* /*
...@@ -377,7 +378,7 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder, ...@@ -377,7 +378,7 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder,
else else
pfit_control = 0; pfit_control = 0;
if (mode_dev->panel_wants_dither) if (dev_priv->lvds_dither)
pfit_control |= PANEL_8TO6_DITHER_ENABLE; pfit_control |= PANEL_8TO6_DITHER_ENABLE;
REG_WRITE(PFIT_CONTROL, pfit_control); REG_WRITE(PFIT_CONTROL, pfit_control);
......
...@@ -91,6 +91,7 @@ static void mrst_lvds_mode_set(struct drm_encoder *encoder, ...@@ -91,6 +91,7 @@ static void mrst_lvds_mode_set(struct drm_encoder *encoder,
struct psb_intel_mode_device *mode_dev = struct psb_intel_mode_device *mode_dev =
enc_to_psb_intel_output(encoder)->mode_dev; enc_to_psb_intel_output(encoder)->mode_dev;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
u32 lvds_port; u32 lvds_port;
uint64_t v = DRM_MODE_SCALE_FULLSCREEN; uint64_t v = DRM_MODE_SCALE_FULLSCREEN;
...@@ -107,7 +108,9 @@ static void mrst_lvds_mode_set(struct drm_encoder *encoder, ...@@ -107,7 +108,9 @@ static void mrst_lvds_mode_set(struct drm_encoder *encoder,
LVDS_PORT_EN | LVDS_PORT_EN |
LVDS_BORDER_EN; LVDS_BORDER_EN;
if (mode_dev->panel_wants_dither) /* If the firmware says dither on Moorestown, or the BIOS does
on Oaktrail then enable dithering */
if (mode_dev->panel_wants_dither || dev_priv->lvds_dither)
lvds_port |= MRST_PANEL_8TO6_DITHER_ENABLE; lvds_port |= MRST_PANEL_8TO6_DITHER_ENABLE;
REG_WRITE(LVDS, lvds_port); REG_WRITE(LVDS, lvds_port);
......
...@@ -470,6 +470,7 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder, ...@@ -470,6 +470,7 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder,
struct psb_intel_mode_device *mode_dev = struct psb_intel_mode_device *mode_dev =
enc_to_psb_intel_output(encoder)->mode_dev; enc_to_psb_intel_output(encoder)->mode_dev;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
u32 pfit_control; u32 pfit_control;
/* /*
...@@ -491,7 +492,7 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder, ...@@ -491,7 +492,7 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder,
else else
pfit_control = 0; pfit_control = 0;
if (mode_dev->panel_wants_dither) if (dev_priv->lvds_dither)
pfit_control |= PANEL_8TO6_DITHER_ENABLE; pfit_control |= PANEL_8TO6_DITHER_ENABLE;
REG_WRITE(PFIT_CONTROL, pfit_control); REG_WRITE(PFIT_CONTROL, pfit_control);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册