qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: aaron.zakhrov@gmail.com
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com, Aaron Dominick <aaron.zakhrov@gmail.com>
Subject: [RFC 2/8] Fix MC STATUS resgister
Date: Mon, 25 Nov 2019 19:49:06 +0530	[thread overview]
Message-ID: <20191125141908.5441-3-aaron.zakhrov@gmail.com> (raw)
In-Reply-To: <20191125141908.5441-1-aaron.zakhrov@gmail.com>

From: Aaron Dominick <aaron.zakhrov@gmail.com>

---
 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



  parent reply	other threads:[~2019-11-28  7:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191125141908.5441-1-aaron.zakhrov@gmail.com>
2019-11-25 14:19 ` [RFC 1/8] Add Radeon kernel headers. Will clean up later aaron.zakhrov
2019-11-25 14:19 ` aaron.zakhrov [this message]
2019-11-25 14:19 ` [RFC 3/8] R300 fixes aaron.zakhrov
2019-11-25 14:19 ` [RFC 4/8] Got GPU init working. Stops at probing display aaron.zakhrov
2019-11-25 14:19 ` [RFC 5/8] Add Radeon kernel headers. Will clean up later aaron.zakhrov
2019-11-25 14:19 ` [RFC 6/8] Fix MC STATUS resgister aaron.zakhrov
2019-11-25 14:19 ` [RFC 7/8] R300 fixes aaron.zakhrov
2019-11-25 14:19 ` [RFC 8/8] Got GPU init working. Stops at probing display aaron.zakhrov
2019-11-26  4:56 [RFC 0/8] ATI R300 emulated graphics card aaron.zakhrov
2019-11-26  4:56 ` [RFC 2/8] Fix MC STATUS resgister aaron.zakhrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125141908.5441-3-aaron.zakhrov@gmail.com \
    --to=aaron.zakhrov@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).