Skip to content

Commit bebaa67

Browse files
pzanoni-intelgregkh
authored andcommitted
drm/i915: set the right SDVO transcoder for CPT
commit 3573c41 upstream. v2: add a CPT-specific macro, make code cleaner v3: fix commit message Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41272 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 3ea268b commit bebaa67

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎drivers/gpu/drm/i915/i915_reg.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,10 +3271,10 @@
32713271
/* or SDVOB */
32723272
#define HDMIB 0xe1140
32733273
#define PORT_ENABLE (1 << 31)
3274-
#define TRANSCODER_A (0)
3275-
#define TRANSCODER_B (1 << 30)
3276-
#define TRANSCODER(pipe) ((pipe) << 30)
3277-
#define TRANSCODER_MASK (1 << 30)
3274+
#define TRANSCODER(pipe) ((pipe) << 30)
3275+
#define TRANSCODER_CPT(pipe) ((pipe) << 29)
3276+
#define TRANSCODER_MASK (1 << 30)
3277+
#define TRANSCODER_MASK_CPT (3 << 29)
32783278
#define COLOR_FORMAT_8bpc (0)
32793279
#define COLOR_FORMAT_12bpc (3 << 26)
32803280
#define SDVOB_HOTPLUG_ENABLE (1 << 23)

‎drivers/gpu/drm/i915/intel_sdvo.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,12 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
10851085
}
10861086
sdvox |= (9 << 19) | SDVO_BORDER_ENABLE;
10871087
}
1088-
if (intel_crtc->pipe == 1)
1089-
sdvox |= SDVO_PIPE_B_SELECT;
1088+
1089+
if (INTEL_PCH_TYPE(dev) >= PCH_CPT)
1090+
sdvox |= TRANSCODER_CPT(intel_crtc->pipe);
1091+
else
1092+
sdvox |= TRANSCODER(intel_crtc->pipe);
1093+
10901094
if (intel_sdvo->has_hdmi_audio)
10911095
sdvox |= SDVO_AUDIO_ENABLE;
10921096

0 commit comments

Comments
 (0)