drm/mgag200: Move register initialization into helper function
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 30 Jul 2020 10:28:38 +0000 (12:28 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 3 Aug 2020 07:42:11 +0000 (09:42 +0200)
commit42452165dc7777e144f8a8550f5fcf484597715d
tree015c69ac5443c22c870e76e934a02696ae90e9dd
parent0b34d58b6c321a30b5a97ec6c9a71e6f472827d2
drm/mgag200: Move register initialization into helper function

The mgag200 driver maps registers into the address space. Move the
code into a separate helper function. No functional changes.

One small difference is in the handling of SDRAM/SGRAM. MGA devices
can come with either SDRAM or SGRAM. So far, the driver checked for
SDRAM, which is the common case. The patch moves this code into a
separate helper and checks for SGRAM, which is the special case. The
test itself is the same as before.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-3-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_drv.c
drivers/gpu/drm/mgag200/mgag200_reg.h