]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9f33cef924b6346d9fa848b29140b7ce898363f4
tree6cea610320bc9eba23e8f38bb1dfb10b411fbf1e
parentc6e0031ed07e4774da1afbb64f98aaad11c4b846
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