Skip to content

Commit 7e6ee55

Browse files
Krishna Manikandanrobclark
authored andcommitted
drm/msm/disp/dpu1: enable DATA_HCTL_EN for sc7280 target
The reset value of INTF_CONFIG2 register is changed for SC7280 family. Changes are added to program this register correctly based on the target. DATA_HCTL_EN in INTF_CONFIG2 register allows data to be transferred at a different rate than video timing. When this is set, the number of data per line follows DISPLAY_DATA_HCTL register value. This change adds support to program these registers for sc7280 target. Signed-off-by: Krishna Manikandan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
1 parent b3652e8 commit 7e6ee55

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#define INTF_TEST_CTL 0x054
3232
#define INTF_TP_COLOR0 0x058
3333
#define INTF_TP_COLOR1 0x05C
34+
#define INTF_CONFIG2 0x060
35+
#define INTF_DISPLAY_DATA_HCTL 0x064
3436
#define INTF_FRAME_LINE_COUNT_EN 0x0A8
3537
#define INTF_FRAME_COUNT 0x0AC
3638
#define INTF_LINE_COUNT 0x0B0
@@ -93,7 +95,7 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
9395
u32 active_hctl, display_hctl, hsync_ctl;
9496
u32 polarity_ctl, den_polarity, hsync_polarity, vsync_polarity;
9597
u32 panel_format;
96-
u32 intf_cfg;
98+
u32 intf_cfg, intf_cfg2 = 0, display_data_hctl = 0;
9799

98100
/* read interface_cfg */
99101
intf_cfg = DPU_REG_READ(c, INTF_CONFIG);
@@ -178,6 +180,13 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
178180
(COLOR_8BIT << 4) |
179181
(0x21 << 8));
180182

183+
if (ctx->cap->features & BIT(DPU_DATA_HCTL_EN)) {
184+
intf_cfg2 |= BIT(4);
185+
display_data_hctl = display_hctl;
186+
DPU_REG_WRITE(c, INTF_CONFIG2, intf_cfg2);
187+
DPU_REG_WRITE(c, INTF_DISPLAY_DATA_HCTL, display_data_hctl);
188+
}
189+
181190
DPU_REG_WRITE(c, INTF_HSYNC_CTL, hsync_ctl);
182191
DPU_REG_WRITE(c, INTF_VSYNC_PERIOD_F0, vsync_period * hsync_period);
183192
DPU_REG_WRITE(c, INTF_VSYNC_PULSE_WIDTH_F0,

0 commit comments

Comments
 (0)