drm/mgag200: Provide per-device callbacks for BMC synchronization
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 28 Jul 2022 12:40:59 +0000 (14:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 29 Jul 2022 14:01:47 +0000 (16:01 +0200)
commit8aeeb3144fe27b2b8aa30db262de2f654f2edb9a
treedd00892e470583818ec1c78890e6261466a3c09b
parentf639f74a789570fff9fb093a603bda550b53f3d9
drm/mgag200: Provide per-device callbacks for BMC synchronization

Move the BMC-related code into its own file and wire it up with device
callbacks.

While programming a new display mode, G200EW3 and G200WB have to de-
synchronize with the BMC. Synchronization is done via VIDRST pins
and controlled via VRSTEN and HRSTEN bits. Move the BMC code behind
a serviceable interface and call it from the CRTC's enable and
disable functions.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-11-tzimmermann@suse.de
drivers/gpu/drm/mgag200/Makefile
drivers/gpu/drm/mgag200/mgag200_bmc.c [new file with mode: 0644]
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_g200ew3.c
drivers/gpu/drm/mgag200/mgag200_g200wb.c
drivers/gpu/drm/mgag200/mgag200_mode.c