Skip to content

Commit 9af8cd1

Browse files
author
Thomas Zimmermann
committed
drm/ast: Do not enable PCI resources multiple times
Remove ast_init_pci_config() as the ast driver already enables the PCI resources by calling pcim_enable_device(). Suggested-by: Sui Jingfeng <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b30cb96 commit 9af8cd1

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

drivers/gpu/drm/ast/ast_main.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,6 @@
3535

3636
#include "ast_drv.h"
3737

38-
static int ast_init_pci_config(struct pci_dev *pdev)
39-
{
40-
int err;
41-
u16 pcis04;
42-
43-
err = pci_read_config_word(pdev, PCI_COMMAND, &pcis04);
44-
if (err)
45-
goto out;
46-
47-
pcis04 |= PCI_COMMAND_MEMORY | PCI_COMMAND_IO;
48-
49-
err = pci_write_config_word(pdev, PCI_COMMAND, pcis04);
50-
51-
out:
52-
return pcibios_err_to_errno(err);
53-
}
54-
5538
static bool ast_is_vga_enabled(struct drm_device *dev)
5639
{
5740
struct ast_device *ast = to_ast_device(dev);
@@ -483,10 +466,6 @@ struct ast_device *ast_device_create(const struct drm_driver *drv,
483466
return ERR_PTR(-EIO);
484467
}
485468

486-
ret = ast_init_pci_config(pdev);
487-
if (ret)
488-
return ERR_PTR(ret);
489-
490469
if (!ast_is_vga_enabled(dev)) {
491470
drm_info(dev, "VGA not enabled on entry, requesting chip POST\n");
492471
need_post = true;

0 commit comments

Comments
 (0)