drm/mgag200: Provide per-device callbacks for PIXPLLC
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 28 Jul 2022 12:41:00 +0000 (14:41 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 29 Jul 2022 14:01:47 +0000 (16:01 +0200)
commit877507bb954e7d0a4f2d3ba9957127a83c03e447
treebefbafd7ec19cbd8692de0289103f9b4605a47b0
parent8aeeb3144fe27b2b8aa30db262de2f654f2edb9a
drm/mgag200: Provide per-device callbacks for PIXPLLC

Move the PIXPLLC code into per-model source files and wire it up
with per-model callbacks. No functional changes.

The PIXPLLC pixel-clock is part of the CRTC, but really separate
hardware that varies with each model of the G200. Move the PIXPLLC
code for each model into the per-model source file and call it from
CRTC helpers via device functions.

This allows to remove struct mgag200_pll and the related code. The
new callbacks behave like the CRTC's atomic_check and atomic_enable
functions.

v3:
* clean up style

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-12-tzimmermann@suse.de
12 files changed:
drivers/gpu/drm/mgag200/Makefile
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_g200.c
drivers/gpu/drm/mgag200/mgag200_g200eh.c
drivers/gpu/drm/mgag200/mgag200_g200eh3.c
drivers/gpu/drm/mgag200/mgag200_g200er.c
drivers/gpu/drm/mgag200/mgag200_g200ev.c
drivers/gpu/drm/mgag200/mgag200_g200ew3.c
drivers/gpu/drm/mgag200/mgag200_g200se.c
drivers/gpu/drm/mgag200/mgag200_g200wb.c
drivers/gpu/drm/mgag200/mgag200_mode.c
drivers/gpu/drm/mgag200/mgag200_pll.c [deleted file]