aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ddi.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-08-08 13:15:27 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-08-09 12:36:04 -0400
commit3f7c447faab3e750b0b2f94edad605ba8eb28a7f (patch)
tree5f6238ef1ad6c5368ee368c02d9c8b09b988310b /drivers/gpu/drm/i915/intel_ddi.c
parentc96ea64ebbbe911becccb20dea1609017caad3c9 (diff)
drm/i915: fix pipe DDI mode select
Mask the value before changing it and also select DVI when needed. DVI was working in cases where the BIOS was setting the correct value because we were not masking the value before changing it. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ddi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 32604ac80204..0d7acd76c1b4 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -726,13 +726,18 @@ void intel_ddi_mode_set(struct drm_encoder *encoder,
726 temp = I915_READ(DDI_FUNC_CTL(pipe)); 726 temp = I915_READ(DDI_FUNC_CTL(pipe));
727 temp &= ~PIPE_DDI_PORT_MASK; 727 temp &= ~PIPE_DDI_PORT_MASK;
728 temp &= ~PIPE_DDI_BPC_12; 728 temp &= ~PIPE_DDI_BPC_12;
729 temp &= ~PIPE_DDI_MODE_SELECT_MASK;
729 temp |= PIPE_DDI_SELECT_PORT(port) | 730 temp |= PIPE_DDI_SELECT_PORT(port) |
730 PIPE_DDI_MODE_SELECT_HDMI |
731 ((intel_crtc->bpp > 24) ? 731 ((intel_crtc->bpp > 24) ?
732 PIPE_DDI_BPC_12 : 732 PIPE_DDI_BPC_12 :
733 PIPE_DDI_BPC_8) | 733 PIPE_DDI_BPC_8) |
734 PIPE_DDI_FUNC_ENABLE; 734 PIPE_DDI_FUNC_ENABLE;
735 735
736 if (intel_hdmi->has_hdmi_sink)
737 temp |= PIPE_DDI_MODE_SELECT_HDMI;
738 else
739 temp |= PIPE_DDI_MODE_SELECT_DVI;
740
736 I915_WRITE(DDI_FUNC_CTL(pipe), temp); 741 I915_WRITE(DDI_FUNC_CTL(pipe), temp);
737 742
738 intel_hdmi->set_infoframes(encoder, adjusted_mode); 743 intel_hdmi->set_infoframes(encoder, adjusted_mode);