dev-amdgpu: Remove default callback in mem manager API
In almost all cases reading/writing using the GPU memory manager will want to wait until that read or write is complete. Therefore, change the API to not default to no callback so that the user must explicitly specify nullptr indicating they do not want to wait for completion. Updates a write call which cannot use a callback due to being atomic in the base gpu device code. Change-Id: Id19145d49c7cafc97e2e178819682cb97270a16a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62716 Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
This commit is contained in:
@@ -379,7 +379,7 @@ AMDGPUDevice::write(PacketPtr pkt)
|
||||
switch (barnum) {
|
||||
case FRAMEBUFFER_BAR:
|
||||
gpuMemMgr->writeRequest(offset, pkt->getPtr<uint8_t>(),
|
||||
pkt->getSize());
|
||||
pkt->getSize(), 0, nullptr);
|
||||
writeFrame(pkt, offset);
|
||||
break;
|
||||
case DOORBELL_BAR:
|
||||
|
||||
@@ -102,7 +102,7 @@ class AMDGPUMemoryManager : public ClockedObject
|
||||
* @param callback Event callback to call after all bytes are written.
|
||||
*/
|
||||
void writeRequest(Addr addr, uint8_t *data, int size,
|
||||
Request::Flags flag = 0, Event *callback = nullptr);
|
||||
Request::Flags flag, Event *callback);
|
||||
|
||||
/**
|
||||
* Read size amount of data from device memory at addr using flags and
|
||||
@@ -115,7 +115,7 @@ class AMDGPUMemoryManager : public ClockedObject
|
||||
* @param callback Event callback to call after all bytes are read.
|
||||
*/
|
||||
void readRequest(Addr addr, uint8_t *data, int size,
|
||||
Request::Flags flag = 0, Event *callback = nullptr);
|
||||
Request::Flags flag, Event *callback);
|
||||
|
||||
/**
|
||||
* Get the requestorID for the memory manager. This ID is used for all
|
||||
|
||||
Reference in New Issue
Block a user