summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ddi.c
diff options
context:
space:
mode:
authorPaulo Zanoni2012-08-08 19:15:27 +0200
committerDaniel Vetter2012-08-09 18:36:04 +0200
commit3f7c447faab3e750b0b2f94edad605ba8eb28a7f (patch)
tree5f6238ef1ad6c5368ee368c02d9c8b09b988310b /drivers/gpu/drm/i915/intel_ddi.c
parentdrm/i915: dump the device info (diff)
downloadkernel-qcow2-linux-3f7c447faab3e750b0b2f94edad605ba8eb28a7f.tar.gz
kernel-qcow2-linux-3f7c447faab3e750b0b2f94edad605ba8eb28a7f.tar.xz
kernel-qcow2-linux-3f7c447faab3e750b0b2f94edad605ba8eb28a7f.zip
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,
temp = I915_READ(DDI_FUNC_CTL(pipe));
temp &= ~PIPE_DDI_PORT_MASK;
temp &= ~PIPE_DDI_BPC_12;
+ temp &= ~PIPE_DDI_MODE_SELECT_MASK;
temp |= PIPE_DDI_SELECT_PORT(port) |
- PIPE_DDI_MODE_SELECT_HDMI |
((intel_crtc->bpp > 24) ?
PIPE_DDI_BPC_12 :
PIPE_DDI_BPC_8) |
PIPE_DDI_FUNC_ENABLE;
+ if (intel_hdmi->has_hdmi_sink)
+ temp |= PIPE_DDI_MODE_SELECT_HDMI;
+ else
+ temp |= PIPE_DDI_MODE_SELECT_DVI;
+
I915_WRITE(DDI_FUNC_CTL(pipe), temp);
intel_hdmi->set_infoframes(encoder, adjusted_mode);