Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/57533 )

 (

13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: dev-amdgpu: Add device memory
......................................................................

dev-amdgpu: Add device memory

This adds the actual backing store for the GPU framebuffer.

Change-Id: I22c6dd9bd25b216c4ec99ee472c83d4cb2648efb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57533
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/amdgpu/amdgpu_device.cc
M src/dev/amdgpu/amdgpu_device.hh
2 files changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/dev/amdgpu/amdgpu_device.cc b/src/dev/amdgpu/amdgpu_device.cc
index 2badb6b..6714908 100644
--- a/src/dev/amdgpu/amdgpu_device.cc
+++ b/src/dev/amdgpu/amdgpu_device.cc
@@ -54,7 +54,8 @@
     : PciDevice(p), gpuMemMgr(p.memory_manager), deviceIH(p.device_ih),
       sdma0(p.sdma0), sdma1(p.sdma1), pm4PktProc(p.pm4_pkt_proc), cp(p.cp),
       checkpoint_before_mmios(p.checkpoint_before_mmios),
-      init_interrupt_count(0), _lastVMID(0)
+      init_interrupt_count(0), _lastVMID(0),
+      deviceMem(name() + ".deviceMem", p.memories, false, "", false)
 {
     // Loading the rom binary dumped from hardware.
     std::ifstream romBin;
@@ -513,6 +514,7 @@
     SERIALIZE_ARRAY(sdma_engs, sizeof(sdma_engs)/sizeof(sdma_engs[0]));

     // Serialize the device memory
+    deviceMem.serializeSection(cp, "deviceMem");
 }

 void
@@ -573,6 +575,7 @@
     }

     // Unserialize the device memory
+    deviceMem.unserializeSection(cp, "deviceMem");
 }

 uint16_t
diff --git a/src/dev/amdgpu/amdgpu_device.hh b/src/dev/amdgpu/amdgpu_device.hh
index 6697d82..fbb0d1c 100644
--- a/src/dev/amdgpu/amdgpu_device.hh
+++ b/src/dev/amdgpu/amdgpu_device.hh
@@ -131,6 +131,11 @@
     // last vmid allocated by map_process PM4 packet
     uint16_t _lastVMID;

+    /*
+     * Backing store for GPU memory / framebuffer / VRAM
+     */
+    memory::PhysicalMemory deviceMem;
+
   public:
     AMDGPUDevice(const AMDGPUDeviceParams &p);


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57533
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I22c6dd9bd25b216c4ec99ee472c83d4cb2648efb
Gerrit-Change-Number: 57533
Gerrit-PatchSet: 19
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to