diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2011-10-14 17:16:22 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-12-16 11:49:55 -0500 |
commit | 3573c4103f7a486838bb6b5b8353788103f91802 (patch) | |
tree | 7da908c16baa846c3f14a80442225a1cf81a6b7b /drivers | |
parent | 0999bbe08196cd9459683204974fda4d62a7d1b3 (diff) |
drm/i915: set the right SDVO transcoder for CPT
v2: add a CPT-specific macro, make code cleaner
v3: fix commit message
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41272
Cc: stable@kernel.org
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 6ef68c74189d..a26d5b0a3690 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -3303,10 +3303,10 @@ | |||
3303 | /* or SDVOB */ | 3303 | /* or SDVOB */ |
3304 | #define HDMIB 0xe1140 | 3304 | #define HDMIB 0xe1140 |
3305 | #define PORT_ENABLE (1 << 31) | 3305 | #define PORT_ENABLE (1 << 31) |
3306 | #define TRANSCODER_A (0) | 3306 | #define TRANSCODER(pipe) ((pipe) << 30) |
3307 | #define TRANSCODER_B (1 << 30) | 3307 | #define TRANSCODER_CPT(pipe) ((pipe) << 29) |
3308 | #define TRANSCODER(pipe) ((pipe) << 30) | 3308 | #define TRANSCODER_MASK (1 << 30) |
3309 | #define TRANSCODER_MASK (1 << 30) | 3309 | #define TRANSCODER_MASK_CPT (3 << 29) |
3310 | #define COLOR_FORMAT_8bpc (0) | 3310 | #define COLOR_FORMAT_8bpc (0) |
3311 | #define COLOR_FORMAT_12bpc (3 << 26) | 3311 | #define COLOR_FORMAT_12bpc (3 << 26) |
3312 | #define SDVOB_HOTPLUG_ENABLE (1 << 23) | 3312 | #define SDVOB_HOTPLUG_ENABLE (1 << 23) |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 3003fb25aefd..e308d674c669 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -1086,8 +1086,12 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, | |||
1086 | } | 1086 | } |
1087 | sdvox |= (9 << 19) | SDVO_BORDER_ENABLE; | 1087 | sdvox |= (9 << 19) | SDVO_BORDER_ENABLE; |
1088 | } | 1088 | } |
1089 | if (intel_crtc->pipe == 1) | 1089 | |
1090 | sdvox |= SDVO_PIPE_B_SELECT; | 1090 | if (INTEL_PCH_TYPE(dev) >= PCH_CPT) |
1091 | sdvox |= TRANSCODER_CPT(intel_crtc->pipe); | ||
1092 | else | ||
1093 | sdvox |= TRANSCODER(intel_crtc->pipe); | ||
1094 | |||
1091 | if (intel_sdvo->has_hdmi_audio) | 1095 | if (intel_sdvo->has_hdmi_audio) |
1092 | sdvox |= SDVO_AUDIO_ENABLE; | 1096 | sdvox |= SDVO_AUDIO_ENABLE; |
1093 | 1097 | ||