Commit 9af8cd1a authored by Thomas Zimmermann's avatar Thomas Zimmermann

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: default avatarSui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Tested-by: default avatarSui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230712130826.3318-1-tzimmermann@suse.de
parent b30cb966
...@@ -35,23 +35,6 @@ ...@@ -35,23 +35,6 @@
#include "ast_drv.h" #include "ast_drv.h"
static int ast_init_pci_config(struct pci_dev *pdev)
{
int err;
u16 pcis04;
err = pci_read_config_word(pdev, PCI_COMMAND, &pcis04);
if (err)
goto out;
pcis04 |= PCI_COMMAND_MEMORY | PCI_COMMAND_IO;
err = pci_write_config_word(pdev, PCI_COMMAND, pcis04);
out:
return pcibios_err_to_errno(err);
}
static bool ast_is_vga_enabled(struct drm_device *dev) static bool ast_is_vga_enabled(struct drm_device *dev)
{ {
struct ast_device *ast = to_ast_device(dev); struct ast_device *ast = to_ast_device(dev);
...@@ -483,10 +466,6 @@ struct ast_device *ast_device_create(const struct drm_driver *drv, ...@@ -483,10 +466,6 @@ struct ast_device *ast_device_create(const struct drm_driver *drv,
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
} }
ret = ast_init_pci_config(pdev);
if (ret)
return ERR_PTR(ret);
if (!ast_is_vga_enabled(dev)) { if (!ast_is_vga_enabled(dev)) {
drm_info(dev, "VGA not enabled on entry, requesting chip POST\n"); drm_info(dev, "VGA not enabled on entry, requesting chip POST\n");
need_post = true; need_post = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment