diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-09-07 17:48:06 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 07:44:12 -0400 |
commit | 434ed097245423c5ea277d18121c0fad0df42abf (patch) | |
tree | 2fb6acacab73b9931cadc7d7f6a064d4a58ea4ee /drivers/gpu/drm/i915/intel_display.c | |
parent | 4f0d1aff791db8935ee146fe7928b63bba0f1b59 (diff) |
drm/i915: set dither bits on eDP panels too
We really need a macro to test whether a given connector has a panel
attached rather than sprinkling HAS_PCH_SPLIT/IS_eDP/has_edp_encoder
etc all over. In the meantime, fix the bug...
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[ickle: tidy up the duplicity in the conditionals]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 948a3608d1bd..4b23646304df 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3909,11 +3909,6 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3909 | udelay(150); | 3909 | udelay(150); |
3910 | } | 3910 | } |
3911 | 3911 | ||
3912 | if (HAS_PCH_SPLIT(dev)) { | ||
3913 | pipeconf &= ~PIPECONF_DITHER_EN; | ||
3914 | pipeconf &= ~PIPECONF_DITHER_TYPE_MASK; | ||
3915 | } | ||
3916 | |||
3917 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. | 3912 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. |
3918 | * This is an exception to the general rule that mode_set doesn't turn | 3913 | * This is an exception to the general rule that mode_set doesn't turn |
3919 | * things on. | 3914 | * things on. |
@@ -3951,23 +3946,27 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3951 | * appropriately here, but we need to look more thoroughly into how | 3946 | * appropriately here, but we need to look more thoroughly into how |
3952 | * panels behave in the two modes. | 3947 | * panels behave in the two modes. |
3953 | */ | 3948 | */ |
3954 | /* set the dithering flag */ | 3949 | /* set the dithering flag on non-PCH LVDS as needed */ |
3955 | if (IS_I965G(dev)) { | 3950 | if (IS_I965G(dev) && !HAS_PCH_SPLIT(dev)) { |
3956 | if (dev_priv->lvds_dither) { | 3951 | if (dev_priv->lvds_dither) |
3957 | if (HAS_PCH_SPLIT(dev)) { | 3952 | lvds |= LVDS_ENABLE_DITHER; |
3958 | pipeconf |= PIPECONF_DITHER_EN; | 3953 | else |
3959 | pipeconf |= PIPECONF_DITHER_TYPE_ST1; | 3954 | lvds &= ~LVDS_ENABLE_DITHER; |
3960 | } else | ||
3961 | lvds |= LVDS_ENABLE_DITHER; | ||
3962 | } else { | ||
3963 | if (!HAS_PCH_SPLIT(dev)) { | ||
3964 | lvds &= ~LVDS_ENABLE_DITHER; | ||
3965 | } | ||
3966 | } | ||
3967 | } | 3955 | } |
3968 | I915_WRITE(lvds_reg, lvds); | 3956 | I915_WRITE(lvds_reg, lvds); |
3969 | I915_READ(lvds_reg); | 3957 | I915_READ(lvds_reg); |
3970 | } | 3958 | } |
3959 | |||
3960 | /* set the dithering flag and clear for anything other than a panel. */ | ||
3961 | if (HAS_PCH_SPLIT(dev)) { | ||
3962 | pipeconf &= ~PIPECONF_DITHER_EN; | ||
3963 | pipeconf &= ~PIPECONF_DITHER_TYPE_MASK; | ||
3964 | if (dev_priv->lvds_dither && (is_lvds || has_edp_encoder)) { | ||
3965 | pipeconf |= PIPECONF_DITHER_EN; | ||
3966 | pipeconf |= PIPECONF_DITHER_TYPE_ST1; | ||
3967 | } | ||
3968 | } | ||
3969 | |||
3971 | if (is_dp) | 3970 | if (is_dp) |
3972 | intel_dp_set_m_n(crtc, mode, adjusted_mode); | 3971 | intel_dp_set_m_n(crtc, mode, adjusted_mode); |
3973 | else if (HAS_PCH_SPLIT(dev)) { | 3972 | else if (HAS_PCH_SPLIT(dev)) { |