Skip to content

Commit 166ce26

Browse files
ideakrodrigovivi
authored andcommitted
drm/i915/ddi: Fix HDMI port width programming in DDI_BUF_CTL
Fix the port width programming in the DDI_BUF_CTL register on MTLP+, where this had an off-by-one error. Cc: <stable@vger.kernel.org> # v6.5+ Fixes: b66a8ab ("drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI") Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250214142001.552916-3-imre.deak@intel.com (cherry picked from commit b2ecdab) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 879f703 commit 166ce26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3487,7 +3487,7 @@ static void intel_ddi_enable_hdmi(struct intel_atomic_state *state,
34873487
intel_de_rmw(dev_priv, XELPDP_PORT_BUF_CTL1(dev_priv, port),
34883488
XELPDP_PORT_WIDTH_MASK | XELPDP_PORT_REVERSAL, port_buf);
34893489

3490-
buf_ctl |= DDI_PORT_WIDTH(lane_count);
3490+
buf_ctl |= DDI_PORT_WIDTH(crtc_state->lane_count);
34913491

34923492
if (DISPLAY_VER(dev_priv) >= 20)
34933493
buf_ctl |= XE2LPD_DDI_BUF_D2D_LINK_ENABLE;

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3633,7 +3633,7 @@ enum skl_power_gate {
36333633
#define DDI_BUF_IS_IDLE (1 << 7)
36343634
#define DDI_BUF_CTL_TC_PHY_OWNERSHIP REG_BIT(6)
36353635
#define DDI_A_4_LANES (1 << 4)
3636-
#define DDI_PORT_WIDTH(width) (((width) - 1) << 1)
3636+
#define DDI_PORT_WIDTH(width) (((width) == 3 ? 4 : ((width) - 1)) << 1)
36373637
#define DDI_PORT_WIDTH_MASK (7 << 1)
36383638
#define DDI_PORT_WIDTH_SHIFT 1
36393639
#define DDI_INIT_DISPLAY_DETECTED (1 << 0)

0 commit comments

Comments
 (0)