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
This commit is contained in:
Matthew Poremba
2024-05-03 10:06:34 -07:00
parent 8249d6d1cd
commit 29f63f630b

View File

@@ -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<uint64_t>(
[ = ] (const uint64_t &) { ptePdeDone(q, pkt, dmaBuffer); });
dmaWriteVirt(pkt->dest, sizeof(uint64_t) * pkt->count, cb,