mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/ast: Add VGACRAA register constants
Add register constants for VGACRAA and use them when detecting the size of the VGA memory. Aligns the code with the programming manual. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-3-tzimmermann@suse.de
This commit is contained in:
parent
2b7970e9a6
commit
9f711d1877
|
|
@ -37,9 +37,10 @@ static u32 ast_get_vram_size(struct ast_device *ast)
|
|||
{
|
||||
u8 jreg;
|
||||
u32 vram_size;
|
||||
u8 vgacraa;
|
||||
|
||||
jreg = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xaa, 0xff);
|
||||
switch (jreg & 3) {
|
||||
vgacraa = ast_get_index_reg(ast, AST_IO_VGACRI, 0xaa);
|
||||
switch (vgacraa & AST_IO_VGACRAA_VGAMEM_SIZE_MASK) {
|
||||
case 0:
|
||||
vram_size = SZ_8M;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#define AST_IO_VGACRA1_VGAIO_DISABLED BIT(1)
|
||||
#define AST_IO_VGACRA1_MMIO_ENABLED BIT(2)
|
||||
#define AST_IO_VGACRA3_DVO_ENABLED BIT(7)
|
||||
#define AST_IO_VGACRAA_VGAMEM_SIZE_MASK GENMASK(1, 0)
|
||||
#define AST_IO_VGACRB6_HSYNC_OFF BIT(0)
|
||||
#define AST_IO_VGACRB6_VSYNC_OFF BIT(1)
|
||||
#define AST_IO_VGACRCB_HWC_16BPP BIT(0) /* set: ARGB4444, cleared: 2bpp palette */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user