Skip to content

Commit 76c332d

Browse files
author
Thomas Zimmermann
committed
drm/mgag200: Fix value in <VBLKSTR> register
Fix an off-by-one error when setting the vblanking start in <VBLKSTR>. Commit d6460bd ("drm/mgag200: Add dedicated variables for blanking fields") switched the value from crtc_vdisplay to crtc_vblank_start, which DRM helpers copy from the former. The commit missed to subtract one though. Reported-by: Wakko Warner <[email protected]> Closes: https://lore.kernel.org/dri-devel/CAMwc25rKPKooaSp85zDq2eh-9q4UPZD=RqSDBRp1fAagDnmRmA@mail.gmail.com/ Reported-by: Сергей <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Closes: https://bbs.archlinux.org/viewtopic.php?id=303819 Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: d6460bd ("drm/mgag200: Add dedicated variables for blanking fields") Cc: Thomas Zimmermann <[email protected]> Cc: Jocelyn Falempe <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: <[email protected]> # v6.12+ Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Wakko Warner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8260731 commit 76c332d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/mgag200/mgag200_mode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void mgag200_set_mode_regs(struct mga_device *mdev, const struct drm_display_mod
223223
vsyncstr = mode->crtc_vsync_start - 1;
224224
vsyncend = mode->crtc_vsync_end - 1;
225225
vtotal = mode->crtc_vtotal - 2;
226-
vblkstr = mode->crtc_vblank_start;
226+
vblkstr = mode->crtc_vblank_start - 1;
227227
vblkend = vtotal + 1;
228228

229229
linecomp = vdispend;

0 commit comments

Comments
 (0)