]> 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)
commitc8ebfa1af19c3bfc0ada20d8f375f5c512c7c8d9
tree6cea610320bc9eba23e8f38bb1dfb10b411fbf1e
parent0ed9db9e1b3c622f3140f669fde87bf6bcdafc3a
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