]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: adjust data width for widen bus case
authorJun Nie <jun.nie@linaro.org>
Thu, 30 May 2024 05:56:46 +0000 (13:56 +0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 22 Jun 2024 22:15:39 +0000 (01:15 +0300)
data is valid for only half the active window if widebus
is enabled

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/596229/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-2-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c

index 225c1c7768ff8bf1a60bb4af2beef26619fbefed..f972214232492d354c3a56cdfd1fcd7c527680a2 100644 (file)
@@ -168,6 +168,15 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *intf,
 
        data_width = p->width;
 
+       /*
+        * If widebus is enabled, data is valid for only half the active window
+        * since the data rate is doubled in this mode. But for the compression
+        * mode in DP case, the p->width is already adjusted in
+        * drm_mode_to_intf_timing_params()
+        */
+       if (p->wide_bus_en && !dp_intf)
+               data_width = p->width >> 1;
+
        hsync_data_start_x = hsync_start_x;
        hsync_data_end_x =  hsync_start_x + data_width - 1;