summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mgag200
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2024-07-18 12:44:13 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2024-07-19 10:40:20 +0200
commite8f834b559621d634a939381caf99a024e272211 (patch)
tree18464e7a73971555a056b55a53b3d77864bc82c9 /drivers/gpu/drm/mgag200
parentdrm/mgag200: Align register field names with documentation (diff)
downloadlinux-e8f834b559621d634a939381caf99a024e272211.tar.xz
linux-e8f834b559621d634a939381caf99a024e272211.zip
drm/mgag200: Use adjusted mode values for CRTCs
Use the values with the crtc_ prefix from struct drm_display_mode to program hardware. The DRM core adjusted these values to the requirements of CRTC hardware. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240718104551.575912-4-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 6a0477426c07..1174fb79831e 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -208,19 +208,19 @@ void mgag200_set_mode_regs(struct mga_device *mdev, const struct drm_display_mod
unsigned int vdispend, vsyncstr, vsyncend, vtotal;
u8 misc, crtcext1, crtcext2, crtcext5;
- hdispend = mode->hdisplay / 8 - 1;
- hsyncstr = mode->hsync_start / 8 - 1;
- hsyncend = mode->hsync_end / 8 - 1;
- htotal = mode->htotal / 8 - 1;
+ hdispend = mode->crtc_hdisplay / 8 - 1;
+ hsyncstr = mode->crtc_hsync_start / 8 - 1;
+ hsyncend = mode->crtc_hsync_end / 8 - 1;
+ htotal = mode->crtc_htotal / 8 - 1;
/* Work around hardware quirk */
if ((htotal & 0x07) == 0x06 || (htotal & 0x07) == 0x04)
htotal++;
- vdispend = mode->vdisplay - 1;
- vsyncstr = mode->vsync_start - 1;
- vsyncend = mode->vsync_end - 1;
- vtotal = mode->vtotal - 2;
+ vdispend = mode->crtc_vdisplay - 1;
+ vsyncstr = mode->crtc_vsync_start - 1;
+ vsyncend = mode->crtc_vsync_end - 1;
+ vtotal = mode->crtc_vtotal - 2;
misc = RREG8(MGA_MISC_IN);