aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Nie <[email protected]>2024-05-30 13:56:46 +0800
committerDmitry Baryshkov <[email protected]>2024-06-23 01:15:39 +0300
commit17236bc0ee0a78d58c03a28c3015b21bde5e445f (patch)
treefcb5538a4a275f7cdcb7ddc8fb8c63551e1ff0c4
parentf9ce482d7dc0ca47fff6d192d29d39f1df7c3441 (diff)
drm/msm/dpu: adjust data width for widen bus case
data is valid for only half the active window if widebus is enabled Signed-off-by: Jun Nie <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Tested-by: Neil Armstrong <[email protected]> # on SM8650-QRD Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Jessica Zhang <[email protected]> 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 <[email protected]>
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
index 225c1c7768ff..f97221423249 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
@@ -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;