diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-10-20 03:01:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2012-10-20 03:01:41 +0000 |
commit | d4951790dec719507d9115477c792128e39f5601 (patch) | |
tree | 5c7c1f7672a0addef7b54ce41a7d7cf3ae014d92 | |
parent | ba9c1b6cfcd857aa54f7753c4eb36784e346ce5d (diff) |
Make the hdmi modesetting code handle multiple display pipes.
Problem noticed by by rivo nurges and blambert@ after ivy bridge
support enabled multiple pipes for pch devices.
Fix based on what the upstream drm code does and
tested by rivo nurges, blambert@ and sthen@
ok kettenis@
-rw-r--r-- | driver/xf86-video-intel/src/i830_hdmi.c | 10 | ||||
-rw-r--r-- | driver/xf86-video-intel/src/i830_reg.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/driver/xf86-video-intel/src/i830_hdmi.c b/driver/xf86-video-intel/src/i830_hdmi.c index 3c856cbc7..5c4ae8379 100644 --- a/driver/xf86-video-intel/src/i830_hdmi.c +++ b/driver/xf86-video-intel/src/i830_hdmi.c @@ -87,11 +87,17 @@ i830_hdmi_mode_set(xf86OutputPtr output, DisplayModePtr mode, SDVO_VSYNC_ACTIVE_HIGH | SDVO_HSYNC_ACTIVE_HIGH; + /* Required on CPT */ + if (dev_priv->has_hdmi_sink && HAS_PCH_CPT(intel)) + sdvox |= HDMI_MODE_SELECT; + if (dev_priv->has_hdmi_sink) sdvox |= SDVO_AUDIO_ENABLE; - if (intel_crtc->pipe == 1) - sdvox |= SDVO_PIPE_B_SELECT; + if (HAS_PCH_CPT(intel)) + sdvox |= PORT_TRANS_SEL_CPT(intel_crtc->pipe); + else if (intel_crtc->pipe == 1) + sdvox |= SDVO_PIPE_B_SELECT; OUTREG(dev_priv->output_reg, sdvox); POSTING_READ(dev_priv->output_reg); diff --git a/driver/xf86-video-intel/src/i830_reg.h b/driver/xf86-video-intel/src/i830_reg.h index 8f010d3fa..f9234acdc 100644 --- a/driver/xf86-video-intel/src/i830_reg.h +++ b/driver/xf86-video-intel/src/i830_reg.h @@ -4263,6 +4263,8 @@ typedef enum { #define SDVO_ENCODING (0) #define TMDS_ENCODING (2 << 10) #define NULL_PACKET_VSYNC_ENABLE (1 << 9) +/* CPT */ +#define HDMI_MODE_SELECT (1 << 9) #define SDVOB_BORDER_ENABLE (1 << 7) #define AUDIO_ENABLE (1 << 6) #define VSYNC_ACTIVE_HIGH (1 << 4) |