From: Yongtaek Jeon Date: Tue, 15 Apr 2025 10:02:11 +0000 (+0900) Subject: gpu: drm: img-rouge: Replace with *_unlocked variants to avoid resv lock warning X-Git-Tag: accepted/tizen/unified/20250514.114144~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=502c3528ca2189a8b3670ca0a9f601c71452a096;p=platform%2Fkernel%2Flinux-riscv.git gpu: drm: img-rouge: Replace with *_unlocked variants to avoid resv lock warning Using dma_buf_map/unmap_attachment() without holding dma_resv_lock() causes a WARN when lockdep is enabled. Switched to *_unlocked variants, which handle locking internally, to avoid the warning. Change-Id: Icbd1b5a1cf25a850100277dfcb4e0f2ac9a6b774 Signed-off-by: Yongtaek Jeon --- diff --git a/drivers/gpu/drm/img-rogue/physmem_dmabuf.c b/drivers/gpu/drm/img-rogue/physmem_dmabuf.c index 619b9b5b4e4d..d11e71f7b299 100644 --- a/drivers/gpu/drm/img-rogue/physmem_dmabuf.c +++ b/drivers/gpu/drm/img-rogue/physmem_dmabuf.c @@ -317,7 +317,7 @@ static void PMRFinalizeDmaBuf(PMR_IMPL_PRIVDATA pvPriv) psPrivData->ui32PhysPageCount = 0; - dma_buf_unmap_attachment(psAttachment, psSgTable, DMA_BIDIRECTIONAL); + dma_buf_unmap_attachment_unlocked(psAttachment, psSgTable, DMA_BIDIRECTIONAL); if (psPrivData->bPoisonOnFree) { @@ -645,7 +645,7 @@ PhysmemCreateNewDmaBufBackedPMR(PHYS_HEAP *psHeap, } } - table = dma_buf_map_attachment(psAttachment, DMA_BIDIRECTIONAL); + table = dma_buf_map_attachment_unlocked(psAttachment, DMA_BIDIRECTIONAL); if (IS_ERR_OR_NULL(table)) { eError = PVRSRV_ERROR_INVALID_PARAMS; @@ -761,7 +761,7 @@ PhysmemCreateNewDmaBufBackedPMR(PHYS_HEAP *psHeap, return PVRSRV_OK; errUnmap: - dma_buf_unmap_attachment(psAttachment, table, DMA_BIDIRECTIONAL); + dma_buf_unmap_attachment_unlocked(psAttachment, table, DMA_BIDIRECTIONAL); errFreePhysAddr: OSFreeMem(psPrivData->pasDevPhysAddr); errFreePrivData: