aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imagination/pvr_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-09-06 11:25:38 +1000
committerDave Airlie <airlied@redhat.com>2024-09-06 11:25:46 +1000
commitca10367a5abe5f04df1374b227a10439ef686b90 (patch)
treed5be738851922d962f9146ec39c706aabd41bece /drivers/gpu/drm/imagination/pvr_vm.c
parent4de4a0f160cf8ccf29a9a70f00403e6948e7e108 (diff)
parent5a498d4d06d6d9bad76d8a50a7f8fe01670ad46f (diff)
Merge tag 'drm-misc-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
A zpos normalization fix for komeda, a register bitmask fix for nouveau, a memory leak fix for imagination, three fixes for the recent bridge HDMI work, a potential DoS fix and a cache coherency for panthor, a change of panel compatible and a deferred-io fix when used with non-highmem memory. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240905-original-radical-guan-e7a2ae@houat
Diffstat (limited to 'drivers/gpu/drm/imagination/pvr_vm.c')
-rw-r--r--drivers/gpu/drm/imagination/pvr_vm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c
index e59517ba039e..97c0f772ed65 100644
--- a/drivers/gpu/drm/imagination/pvr_vm.c
+++ b/drivers/gpu/drm/imagination/pvr_vm.c
@@ -114,6 +114,8 @@ struct pvr_vm_gpuva {
struct drm_gpuva base;
};
+#define to_pvr_vm_gpuva(va) container_of_const(va, struct pvr_vm_gpuva, base)
+
enum pvr_vm_bind_type {
PVR_VM_BIND_TYPE_MAP,
PVR_VM_BIND_TYPE_UNMAP,
@@ -386,6 +388,7 @@ pvr_vm_gpuva_unmap(struct drm_gpuva_op *op, void *op_ctx)
drm_gpuva_unmap(&op->unmap);
drm_gpuva_unlink(op->unmap.va);
+ kfree(to_pvr_vm_gpuva(op->unmap.va));
return 0;
}
@@ -433,6 +436,7 @@ pvr_vm_gpuva_remap(struct drm_gpuva_op *op, void *op_ctx)
}
drm_gpuva_unlink(op->remap.unmap->va);
+ kfree(to_pvr_vm_gpuva(op->remap.unmap->va));
return 0;
}