diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-07-08 09:21:14 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-07-14 15:14:45 +0200 |
commit | 7d09c7606346db9a48b62b4e02454a6b8f323043 (patch) | |
tree | 4aa8d8700c8c8126f4cdf390c3a51889d8529bcc | |
parent | 4fa05a67b558d2cb3acd2bb299b91220d405ca5e (diff) |
drm/mgag200: Don't read-back PCI option register before writingdrm-misc-next-fixes-2022-07-14
Remove the read operation from mgag200_init_pci_options(). It was
incorrectly added while refactoring the code. Reading the PCI option
register clears the register's new value and subsequently leads to
re-writing the old value.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Fixes: ce19021fd99a ("drm/mgag200: Move PCI-option setup into model-specific code")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220708072114.13960-1-tzimmermann@suse.de
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_drv.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index 73e8e4e9e54b..251a1bb648cc 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -28,12 +28,6 @@ int mgag200_init_pci_options(struct pci_dev *pdev, u32 option, u32 option2) struct device *dev = &pdev->dev; int err; - err = pci_read_config_dword(pdev, PCI_MGA_OPTION, &option); - if (err != PCIBIOS_SUCCESSFUL) { - dev_err(dev, "pci_read_config_dword(PCI_MGA_OPTION) failed: %d\n", err); - return pcibios_err_to_errno(err); - } - err = pci_write_config_dword(pdev, PCI_MGA_OPTION, option); if (err != PCIBIOS_SUCCESSFUL) { dev_err(dev, "pci_write_config_dword(PCI_MGA_OPTION) failed: %d\n", err); |