]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/msm/disp: Correct porch timing for SDM845
authorJames A. MacInnes <james.a.macinnes@gmail.com>
Wed, 12 Feb 2025 23:03:47 +0000 (15:03 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sun, 8 Jun 2025 22:36:03 +0000 (01:36 +0300)
Type-C DisplayPort inoperable due to incorrect porch settings.
- Re-used wide_bus_en as flag to prevent porch shifting

Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
Signed-off-by: James A. MacInnes <james.a.macinnes@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/636945/
Link: https://lore.kernel.org/r/20250212-sdm845_dp-v2-2-4954e51458f4@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

index 8a618841e3ea89acfe4a42d48319a6c54a1b3495..1c468ca5d692b7fee0438427c5b94af491dba94f 100644 (file)
@@ -94,17 +94,21 @@ static void drm_mode_to_intf_timing_params(
                timing->vsync_polarity = 0;
        }
 
-       /* for DP/EDP, Shift timings to align it to bottom right */
-       if (phys_enc->hw_intf->cap->type == INTF_DP) {
+       timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
+       timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
+
+       /*
+        *  For DP/EDP, Shift timings to align it to bottom right.
+        *  wide_bus_en is set for everything excluding SDM845 &
+        *  porch changes cause DisplayPort failure and HDMI tearing.
+        */
+       if (phys_enc->hw_intf->cap->type == INTF_DP && timing->wide_bus_en) {
                timing->h_back_porch += timing->h_front_porch;
                timing->h_front_porch = 0;
                timing->v_back_porch += timing->v_front_porch;
                timing->v_front_porch = 0;
        }
 
-       timing->wide_bus_en = dpu_encoder_is_widebus_enabled(phys_enc->parent);
-       timing->compression_en = dpu_encoder_is_dsc_enabled(phys_enc->parent);
-
        /*
         * for DP, divide the horizonal parameters by 2 when
         * widebus is enabled