[PATCH 2/2] drm/etnaviv: Fix the debug log for the mmu map/unmap procudure
Sui Jingfeng
sui.jingfeng at linux.dev
Mon Oct 28 16:05:55 UTC 2024
The 'iova' variable is invarant within one invoke of the
etnaviv_iommu_unmap()/etnaviv_iommu_unmap(), which means that the
debug log always print the same GPU virtual address while mapping
or unmaping.
Made the GPU virtual address being printed increment with real GPUVA
being mapped or unmapped.
Signed-off-by: Sui Jingfeng <sui.jingfeng at linux.dev>
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 4ee9ed96b1d8..f6c997c459ca 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -83,7 +83,7 @@ static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova,
dma_addr_t pa = sg_dma_address(sg) + sg->offset;
unsigned int bytes = sg_dma_len(sg) - sg->offset;
- VERB("map[%d]: %08x %pap(%x)", i, iova, &pa, bytes);
+ VERB("map[%d]: %08x %pap(%x)", i, da, &pa, bytes);
ret = etnaviv_context_map(context, da, pa, bytes, prot);
if (ret)
@@ -113,7 +113,7 @@ static void etnaviv_iommu_unmap(struct etnaviv_iommu_context *context, u32 iova,
etnaviv_context_unmap(context, da, bytes);
- VERB("unmap[%d]: %08x(%x)", i, iova, bytes);
+ VERB("unmap[%d]: %08x(%x)", i, da, bytes);
BUG_ON(!PAGE_ALIGNED(bytes));
--
2.34.1
More information about the dri-devel
mailing list