diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-21 14:53:41 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-27 14:26:32 +0200 |
commit | 5b71707dd13cb611bba07ab5f38f92b8f7859d6e (patch) | |
tree | 648e5483ba5e0bc5ad95e72c3fa502c76896888e /drivers/gpu/drm/ast/ast_post.c | |
parent | 48b6701eded8a326566dbd9b01a473bc849f79c1 (diff) | |
download | linux-5b71707dd13cb611bba07ab5f38f92b8f7859d6e.tar.gz linux-5b71707dd13cb611bba07ab5f38f92b8f7859d6e.tar.bz2 linux-5b71707dd13cb611bba07ab5f38f92b8f7859d6e.zip |
drm/ast: Enable and unlock device access early during init
POST and memory management contains code to enable access to the
device's memory spaces. This is too late. Consolidate this code at
the beginning of the device initialization.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com> # AST2600
Link: https://patchwork.freedesktop.org/patch/msgid/20230621130032.3568-8-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_post.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_post.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index 2da5bdb4bac4..b765eeb55e5f 100644 --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/gpu/drm/ast/ast_post.c @@ -37,32 +37,6 @@ static void ast_post_chip_2300(struct drm_device *dev); static void ast_post_chip_2500(struct drm_device *dev); -void ast_enable_vga(struct drm_device *dev) -{ - struct ast_device *ast = to_ast_device(dev); - - ast_io_write8(ast, AST_IO_VGA_ENABLE_PORT, 0x01); - ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, 0x01); -} - -void ast_enable_mmio(struct drm_device *dev) -{ - struct ast_device *ast = to_ast_device(dev); - - ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x06); -} - - -bool ast_is_vga_enabled(struct drm_device *dev) -{ - struct ast_device *ast = to_ast_device(dev); - u8 ch; - - ch = ast_io_read8(ast, AST_IO_VGA_ENABLE_PORT); - - return !!(ch & 0x01); -} - static const u8 extreginfo[] = { 0x0f, 0x04, 0x1c, 0xff }; static const u8 extreginfo_ast2300[] = { 0x0f, 0x04, 0x1f, 0xff }; @@ -362,9 +336,6 @@ void ast_post_gpu(struct drm_device *dev) { struct ast_device *ast = to_ast_device(dev); - ast_enable_vga(dev); - ast_open_key(ast); - ast_enable_mmio(dev); ast_set_def_ext_reg(dev); if (ast->chip == AST2600) { |