Skip to content

Commit 146e87f

Browse files
James A. MacInneslumag
authored andcommitted
drm/msm/disp: Correct porch timing for SDM845
Type-C DisplayPort inoperable due to incorrect porch settings. - Re-used wide_bus_en as flag to prevent porch shifting Fixes: c943b49 ("drm/msm/dp: add displayPort driver support") Signed-off-by: James A. MacInnes <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/636945/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 83c4c67 commit 146e87f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,21 @@ static void drm_mode_to_intf_timing_params(
9494
timing->vsync_polarity = 0;
9595
}
9696

97-
/* for DP/EDP, Shift timings to align it to bottom right */
98-
if (phys_enc->hw_intf->cap->type == INTF_DP) {
97+
timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
98+
timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
99+
100+
/*
101+
* For DP/EDP, Shift timings to align it to bottom right.
102+
* wide_bus_en is set for everything excluding SDM845 &
103+
* porch changes cause DisplayPort failure and HDMI tearing.
104+
*/
105+
if (phys_enc->hw_intf->cap->type == INTF_DP && timing->wide_bus_en) {
99106
timing->h_back_porch += timing->h_front_porch;
100107
timing->h_front_porch = 0;
101108
timing->v_back_porch += timing->v_front_porch;
102109
timing->v_front_porch = 0;
103110
}
104111

105-
timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
106-
timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
107-
108112
/*
109113
* for DP, divide the horizonal parameters by 2 when
110114
* widebus is enabled

0 commit comments

Comments
 (0)