Skip to contentSkip to conversation

accel/ivpu: Remove skip of dma unmap for imported buffers

PATCH In review Maciej Falkowski 3 participants 3 messages Oct 27, 2025 – Oct 28, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/ivpu: Remove skip of dma unmap for imported buffers

Rework of imported buffers introduced in the commit e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers") switched the logic of imported buffers by dma mapping/unmaping them just as the regular buffers.

The commit didn't include removal of skipping dma unmap of imported buffers which results in them being mapped without unmapping.

Fixes e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers")
---
 drivers/accel/ivpu/ivpu_gem.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +0 -3
index e7277e02840a..2a159535421a 100644
@@ -158,9 +158,6 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
 		bo->ctx = NULL;
 	}
 
-	if (drm_gem_is_imported(&bo->base.base))
-		return;
-
 	if (bo->base.sgt) {
 		if (bo->base.base.import_attach) {
 			dma_buf_unmap_attachment(bo->base.base.import_attach,
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Maciej Falkowski

Rework of imported buffers introduced in the commit e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers") switched the logic of imported buffers by dma mapping/unmaping them just as the regular buffers.

The commit didn't include removal of skipping dma unmap of imported buffers which results in them being mapped without unmapping.

Fixes e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers")
---
 drivers/accel/ivpu/ivpu_gem.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +0 -0
index e7277e02840a..2a159535421a 100644

drivers/accel/ivpu/ivpu_gem.c static void ivpu_bo_unbind_locked(struct ivpu_bo *bo) · line 163

Quoted 9 lines
drivers/accel/ivpu/ivpu_gem.c +0 -3
@@ -158,9 +158,6 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
 		bo->ctx = NULL;
 	}
 
-	if (drm_gem_is_imported(&bo->base.base))
-		return;
-
 	if (bo->base.sgt) {
 		if (bo->base.base.import_attach) {
 			dma_buf_unmap_attachment(bo->base.base.import_attach,
Reviewed-by on v1 1/1
#2 lore raw
In reply to Maciej Falkowski
Quoted 10 lines · Maciej Falkowski

Rework of imported buffers introduced in the commit e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers") switched the logic of imported buffers by dma mapping/unmaping them just as the regular buffers.

The commit didn't include removal of skipping dma unmap of imported buffers which results in them being mapped without unmapping.

Fixes e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers")