Skip to content

Commit 762ccc1

Browse files
committed
drm/i915/dsi: Assert that vfp+vsync+vbp == vtotal on BXT/GLK
Windows code seems to do some dodgy looking +/-1 adjustments to some of the vertical timings. Not sure if that's correct or not, but let's at least cross check some of the values we got from the hardware to double check whether the GOP did the same or not. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Jani Nikula <[email protected]>
1 parent 7b3685c commit 762ccc1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/i915/display/vlv_dsi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
10191019
unsigned int lane_count = intel_dsi->lane_count;
10201020
unsigned int bpp, fmt;
10211021
enum port port;
1022-
u16 hactive, hfp, hsync, hbp, vfp, vsync;
1022+
u16 hactive, hfp, hsync, hbp, vfp, vsync, vbp;
10231023
u16 hfp_sw, hsync_sw, hbp_sw;
10241024
u16 crtc_htotal_sw, crtc_hsync_start_sw, crtc_hsync_end_sw,
10251025
crtc_hblank_start_sw, crtc_hblank_end_sw;
@@ -1083,6 +1083,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
10831083

10841084
/* vertical values are in terms of lines */
10851085
vfp = intel_de_read(display, MIPI_VFP_COUNT(display, port));
1086+
vbp = intel_de_read(display, MIPI_VBP_COUNT(display, port));
10861087
vsync = intel_de_read(display, MIPI_VSYNC_PADDING_COUNT(display, port));
10871088

10881089
adjusted_mode->crtc_htotal = hactive + hfp + hsync + hbp;
@@ -1091,6 +1092,8 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
10911092
adjusted_mode->crtc_hblank_start = adjusted_mode->crtc_hdisplay;
10921093
adjusted_mode->crtc_hblank_end = adjusted_mode->crtc_htotal;
10931094

1095+
drm_WARN_ON(display->drm, adjusted_mode->crtc_vdisplay +
1096+
vfp + vsync + vbp != adjusted_mode->crtc_vtotal);
10941097
adjusted_mode->crtc_vsync_start = vfp + adjusted_mode->crtc_vdisplay;
10951098
adjusted_mode->crtc_vsync_end = vsync + adjusted_mode->crtc_vsync_start;
10961099
adjusted_mode->crtc_vblank_start = adjusted_mode->crtc_vdisplay;

0 commit comments

Comments
 (0)