From 29f63f630b3db1435569dd2157a6198dc4155084 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Fri, 3 May 2024 10:06:34 -0700 Subject: [PATCH] dev-amdgpu: Correct missing GART warning SDMA ptePde packets are generating a warning that a GART address is missing, causing a wrong address to be clobbered by the operation. This commit fixes this by converting the GART address when the queue is running in privledged mode, which is the only mode allowed to use GART addresses. This removes the warnings and writes to the correct memory region. Change-Id: I64acac308db2431c5996b876bf4cda704f51cf25 --- src/dev/amdgpu/sdma_engine.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dev/amdgpu/sdma_engine.cc b/src/dev/amdgpu/sdma_engine.cc index dcf0acac1a..735be554b4 100644 --- a/src/dev/amdgpu/sdma_engine.cc +++ b/src/dev/amdgpu/sdma_engine.cc @@ -1000,6 +1000,9 @@ SDMAEngine::ptePde(SDMAQueue *q, sdmaPtePde *pkt) sizeof(uint64_t) * pkt->count, 0, cb); } else { + if (q->priv()) { + pkt->dest = getGARTAddr(pkt->dest); + } auto cb = new DmaVirtCallback( [ = ] (const uint64_t &) { ptePdeDone(q, pkt, dmaBuffer); }); dmaWriteVirt(pkt->dest, sizeof(uint64_t) * pkt->count, cb,