diff mbox series

[2/2] drm/etnaviv: Fix the debug log for the mmu map/unmap procudure

Message ID 20241028160555.1006559-2-sui.jingfeng@linux.dev (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/etnaviv: Fix misunderstanding about the scatterlist structure | expand

Commit Message

Sui Jingfeng Oct. 28, 2024, 4:05 p.m. UTC
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@linux.dev>
---
 drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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));