mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 22:41:07 +00:00
ati-vga: Fix aperture sizes
Apparently these should be half the memory region sizes confirmed at least by Radeon FCocde ROM while Rage 128 Pro ROMs don't seem to use these. Linux r100 DRM driver also checks for a bit in HOST_PATH_CNTL so we also add that even though the FCode ROM does not seem to set it. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <d077d4f90d19db731df78da6f05058db074cada1.1698871239.git.balaton@eik.bme.hu>
This commit is contained in:
parent
9d9ae0f07b
commit
f7ecde051d
3 changed files with 7 additions and 2 deletions
|
@ -349,14 +349,17 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, unsigned int size)
|
|||
PCI_BASE_ADDRESS_0, size) & 0xfffffff0;
|
||||
break;
|
||||
case CONFIG_APER_SIZE:
|
||||
val = s->vga.vram_size;
|
||||
val = s->vga.vram_size / 2;
|
||||
break;
|
||||
case CONFIG_REG_1_BASE:
|
||||
val = pci_default_read_config(&s->dev,
|
||||
PCI_BASE_ADDRESS_2, size) & 0xfffffff0;
|
||||
break;
|
||||
case CONFIG_REG_APER_SIZE:
|
||||
val = memory_region_size(&s->mm);
|
||||
val = memory_region_size(&s->mm) / 2;
|
||||
break;
|
||||
case HOST_PATH_CNTL:
|
||||
val = BIT(23); /* Radeon HDP_APER_CNTL */
|
||||
break;
|
||||
case MC_STATUS:
|
||||
val = 5;
|
||||
|
|
|
@ -38,6 +38,7 @@ static struct ati_regdesc ati_reg_names[] = {
|
|||
{"CONFIG_APER_SIZE", 0x0108},
|
||||
{"CONFIG_REG_1_BASE", 0x010c},
|
||||
{"CONFIG_REG_APER_SIZE", 0x0110},
|
||||
{"HOST_PATH_CNTL", 0x0130},
|
||||
{"MEM_CNTL", 0x0140},
|
||||
{"MC_FB_LOCATION", 0x0148},
|
||||
{"MC_AGP_LOCATION", 0x014C},
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#define CONFIG_APER_SIZE 0x0108
|
||||
#define CONFIG_REG_1_BASE 0x010c
|
||||
#define CONFIG_REG_APER_SIZE 0x0110
|
||||
#define HOST_PATH_CNTL 0x0130
|
||||
#define MEM_CNTL 0x0140
|
||||
#define MC_FB_LOCATION 0x0148
|
||||
#define MC_AGP_LOCATION 0x014C
|
||||
|
|
Loading…
Reference in a new issue