From d671ac49c0ed60c8f57b3948cd722fa878fe2f33 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:27:51 +0200 Subject: [PATCH] Review remarks from 63474d29fae821da52581a0c2ba0c188a3a4dcf2 --- src/hw/video/gpu/pfifo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hw/video/gpu/pfifo.cpp b/src/hw/video/gpu/pfifo.cpp index f35afe6..4868e7f 100644 --- a/src/hw/video/gpu/pfifo.cpp +++ b/src/hw/video/gpu/pfifo.cpp @@ -18,7 +18,7 @@ void pfifo::write(uint32_t addr, const uint32_t data) log_io_write(); } - uint32_t addr_off = (addr - NV_PFIFO_BASE) >> 2; + uint32_t addr_off = REGS_PFIFO_idx(addr); switch (addr) { case NV_PFIFO_INTR_0: @@ -60,7 +60,7 @@ uint32_t pfifo::read(uint32_t addr) return 0; } - uint32_t addr_off = (addr - NV_PFIFO_BASE) >> 2; + uint32_t addr_off = REGS_PFIFO_idx(addr); uint32_t value = regs[addr_off]; if constexpr (log) {