OSDN Git Service

drm/mgag200: Initialize PCI registers early during device setup
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 30 Jul 2020 10:28:39 +0000 (12:28 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 3 Aug 2020 07:42:19 +0000 (09:42 +0200)
commit2021708e0d6eed7b5a8bd11071ae1ac40df6c060
tree6cea610320bc9eba23e8f38bb1dfb10b411fbf1e
parent42452165dc7777e144f8a8550f5fcf484597715d
drm/mgag200: Initialize PCI registers early during device setup

So far, PCI option registers were initialized as part of modesetting,
which is late in the process. As these registers control fundamental
operation, they should be set early.

The patch moves the PCI option handling into device register setup,
before even the device MMIO memory is being mapped. No functional
changes made.

Moving the PCI code next to the device-register setup also allows to
remove the has_sdram field from struct mga_device. The state is now
local to the init helper.

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