]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mgag200: Move DAC-register setup into model-specific code
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 28 Jul 2022 12:40:51 +0000 (14:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 29 Jul 2022 13:56:46 +0000 (15:56 +0200)
commit3469e629c04c05a2e11f080f082db47be8ab51bc
treeb3102d71b2fb5584281744b541d3117edee81578
parentbd7cc15cb214fea6c1f9d082b5ebb29433e60e4a
drm/mgag200: Move DAC-register setup into model-specific code

Provide an init function for each model's DAC registers. Remove
the shared helper.

The code for initializing the DAC registers consisted of a large
table of default value, plus many exceptions for the various G200
models. Providing a per-model implementation makes if more readable.
At some point, some of the initialization should probably move into
the modesetting code.

v2:
* don't duplicate DAC values unnecessarily (Sam, Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-3-tzimmermann@suse.de
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