Skip to content

Commit fc3a69e

Browse files
fltorobclark
authored andcommitted
drm/msm/dpu: intf timing path for displayport
Calculate the correct timings for displayport, from downstream driver. Signed-off-by: Jonathan Marek <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 4376f2e commit fc3a69e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
107107
display_v_end = ((vsync_period - p->v_front_porch) * hsync_period) +
108108
p->hsync_skew - 1;
109109

110-
if (ctx->cap->type == INTF_EDP || ctx->cap->type == INTF_DP) {
111-
display_v_start += p->hsync_pulse_width + p->h_back_porch;
112-
display_v_end -= p->h_front_porch;
113-
}
114-
115110
hsync_start_x = p->h_back_porch + p->hsync_pulse_width;
116111
hsync_end_x = hsync_period - p->h_front_porch - 1;
117112

@@ -144,10 +139,25 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
144139
hsync_ctl = (hsync_period << 16) | p->hsync_pulse_width;
145140
display_hctl = (hsync_end_x << 16) | hsync_start_x;
146141

142+
if (ctx->cap->type == INTF_EDP || ctx->cap->type == INTF_DP) {
143+
active_h_start = hsync_start_x;
144+
active_h_end = active_h_start + p->xres - 1;
145+
active_v_start = display_v_start;
146+
active_v_end = active_v_start + (p->yres * hsync_period) - 1;
147+
148+
display_v_start += p->hsync_pulse_width + p->h_back_porch;
149+
150+
active_hctl = (active_h_end << 16) | active_h_start;
151+
display_hctl = active_hctl;
152+
}
153+
147154
den_polarity = 0;
148155
if (ctx->cap->type == INTF_HDMI) {
149156
hsync_polarity = p->yres >= 720 ? 0 : 1;
150157
vsync_polarity = p->yres >= 720 ? 0 : 1;
158+
} else if (ctx->cap->type == INTF_DP) {
159+
hsync_polarity = p->hsync_polarity;
160+
vsync_polarity = p->vsync_polarity;
151161
} else {
152162
hsync_polarity = 0;
153163
vsync_polarity = 0;

0 commit comments

Comments
 (0)