[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 6/8] Fix MC STATUS resgister
From: |
aaron . zakhrov |
Subject: |
[RFC 6/8] Fix MC STATUS resgister |
Date: |
Mon, 25 Nov 2019 19:49:14 +0530 |
From: Aaron Dominick <address@hidden>
---
hw/display/r300.c | 15 ++++++++++++---
hw/display/r300.h | 1 +
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/display/r300.c b/hw/display/r300.c
index 94e90b7a95..653474c3aa 100644
--- a/hw/display/r300.c
+++ b/hw/display/r300.c
@@ -278,6 +278,10 @@ static uint64_t r300_mm_read(void *opaque, hwaddr addr,
unsigned int size)
uint64_t val = 0;
switch (addr) {
+ case RADEON_MC_STATUS:
+ val = s->regs.mc_status;
+ break;
+
case RADEON_MM_INDEX:
val = s->regs.mm_index;
break;
@@ -358,9 +362,9 @@ static uint64_t r300_mm_read(void *opaque, hwaddr addr,
unsigned int size)
case RADEON_CONFIG_REG_APER_SIZE:
val = memory_region_size(&s->mm);
break;
- case RADEON_MC_STATUS:
- val = 5;
- break;
+ // case RADEON_MC_STATUS:
+ // val = 5;
+ // break;
case RADEON_RBBM_STATUS:
val = 64; /* free CMDFIFO entries */
break;
@@ -512,6 +516,10 @@ static void r300_mm_write(void *opaque, hwaddr addr,
trace_ati_mm_write(size, addr, r300_reg_name(addr & ~3ULL), data);
}
switch (addr) {
+ case RADEON_MC_STATUS:
+ s->regs.mc_status = R300_MC_IDLE;
+ s->regs.mc_status = data;
+ break;
case RADEON_RBBM_STATUS:
s->regs.rbbm_status = data|= RADEON_RBBM_FIFOCNT_MASK;
break;
@@ -946,6 +954,7 @@ static void r300_vga_realize(PCIDevice *dev, Error **errp)
static void r300_vga_reset(DeviceState *dev)
{
RADVGAState *s = RAD_VGA(dev);
+ s->regs.mc_status = R300_MC_IDLE;
timer_del(&s->vblank_timer);
r300_vga_update_irq(s);
diff --git a/hw/display/r300.h b/hw/display/r300.h
index 60f572647f..a9e1db32be 100644
--- a/hw/display/r300.h
+++ b/hw/display/r300.h
@@ -81,6 +81,7 @@ typedef struct RADVGARegs{
uint32_t default_pitch;
uint32_t default_tile;
uint32_t default_sc_bottom_right;
+ uint32_t mc_status;
//Color Buffer RB3D
uint32_t r300_rb3d_aaresolve_ctl;
--
2.24.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RFC 6/8] Fix MC STATUS resgister,
aaron . zakhrov <=