drm/mgag200: Only set VIDRST bits in CRTC modesetting
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 11 Jul 2024 07:23:04 +0000 (09:23 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 15 Jul 2024 06:17:16 +0000 (08:17 +0200)
commitcd3a2e8b0a0367c636cd82efaf7802cf85ae5dad
treed4dff728793e2b4b6720878997d6241572e26de4
parent0b91c6dacae24a1393f99f8154037c56454c277c
drm/mgag200: Only set VIDRST bits in CRTC modesetting

The VRSTEN and HRSTEN bits control whether a CRTC synchronizes its
display signal with an external source on the VIDRST pin. The G200WB
and G200EW3 models synchronize with a BMC chip, but different external
video encoders, such as the Matrox Maven, can also be attached to the
pin.

Only set VRSTEN and HRSTEN bits in the CRTC mode-setting code, so the
bits are independent from the BMC. Add the field set_vidrst to the CRTC
state for this purpose. Off by default, control the CRTC VIDRST setting
from the CRTC's atomic_check helper.

v3:
- don't clear bits unnecessary (Jocelyn)
v2:
- keep logic entirely in CRTC (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240711072415.11831-2-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_bmc.c
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_g200er.c
drivers/gpu/drm/mgag200/mgag200_g200ev.c
drivers/gpu/drm/mgag200/mgag200_g200se.c
drivers/gpu/drm/mgag200/mgag200_mode.c