summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast/ast_post.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-06-21 15:53:40 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2023-06-27 15:26:30 +0300
commit48b6701eded8a326566dbd9b01a473bc849f79c1 (patch)
treec3649b348f751010c7dcdecace94d516d3d62d7f /drivers/gpu/drm/ast/ast_post.c
parent3bfe25b5119d6d8f2c9105840d9b0282c69c48d8 (diff)
downloadlinux-48b6701eded8a326566dbd9b01a473bc849f79c1.tar.xz
drm/ast: Set PCI config before accessing I/O registers
Access to I/O registers is required to detect and set up the device. Enable the rsp PCI config bits before. While at it, convert the magic number to macro constants. Enabling the PCI config bits was done after trying to detect the device. It was probably too late at this point. v2: * use standard 16-bit PCI r/w access (Jingfeng) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Tested-by: Jocelyn Falempe <jfalempe@redhat.com> # AST2600 Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn> Link: https://patchwork.freedesktop.org/patch/msgid/20230621130032.3568-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_post.c')
-rw-r--r--drivers/gpu/drm/ast/ast_post.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
index aa3f2cb00f82..2da5bdb4bac4 100644
--- a/drivers/gpu/drm/ast/ast_post.c
+++ b/drivers/gpu/drm/ast/ast_post.c
@@ -361,12 +361,6 @@ static void ast_init_dram_reg(struct drm_device *dev)
void ast_post_gpu(struct drm_device *dev)
{
struct ast_device *ast = to_ast_device(dev);
- struct pci_dev *pdev = to_pci_dev(dev->dev);
- u32 reg;
-
- pci_read_config_dword(pdev, 0x04, &reg);
- reg |= 0x3;
- pci_write_config_dword(pdev, 0x04, reg);
ast_enable_vga(dev);
ast_open_key(ast);