mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/ast: Add constant for VGACR91
Register VGACR91 receives a password that enables the new mode-info header in other registers. Replace the password's magic value with a constant. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patch.msgid.link/20260414070522.33943-2-tzimmermann@suse.de
This commit is contained in:
parent
17394e05b2
commit
6033c027c8
|
|
@ -168,7 +168,7 @@ static void ast_set_vbios_color_reg(struct ast_device *ast,
|
|||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, 0x00);
|
||||
|
||||
if (vmode->flags & NewModeInfo) {
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, 0xa8);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, AST_IO_VGACR91_PASSWORD);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x92, format->cpp[0] * 8);
|
||||
}
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ static void ast_set_vbios_mode_reg(struct ast_device *ast,
|
|||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, 0x00);
|
||||
|
||||
if (vmode->flags & NewModeInfo) {
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, 0xa8);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x91, AST_IO_VGACR91_PASSWORD);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x93, adjusted_mode->clock / 1000);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x94, adjusted_mode->crtc_hdisplay);
|
||||
ast_set_index_reg(ast, AST_IO_VGACRI, 0x95, adjusted_mode->crtc_hdisplay >> 8);
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#define AST_IO_VGACRI (0x54)
|
||||
#define AST_IO_VGACR17_SYNC_ENABLE BIT(7) /* called "Hardware reset" in docs */
|
||||
#define AST_IO_VGACR80_PASSWORD (0xa8)
|
||||
#define AST_IO_VGACR91_PASSWORD (0xa8)
|
||||
#define AST_IO_VGACR99_VGAMEM_RSRV_MASK GENMASK(1, 0)
|
||||
#define AST_IO_VGACRA1_VGAIO_DISABLED BIT(1)
|
||||
#define AST_IO_VGACRA1_MMIO_ENABLED BIT(2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user