Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/scheduler drm: add destruction.
details: https://anonhg.NetBSD.org/src/rev/01e399d7a5ab
branches: trunk
changeset: 1028932:01e399d7a5ab
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:30:47 2021 +0000
description:
drm: add destruction.
Author: phone <mrg%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c | 10 +++++++---
sys/external/bsd/drm2/dist/drm/scheduler/sched_entity.c | 8 ++++++--
2 files changed, 13 insertions(+), 5 deletions(-)
diffs (78 lines):
diff -r af09ec896933 -r 01e399d7a5ab sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c Sun Dec 19 12:30:40 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c Sun Dec 19 12:30:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_vm.c,v 1.7 2021/12/19 12:22:37 riastradh Exp $ */
+/* $NetBSD: amdgpu_vm.c,v 1.8 2021/12/19 12:30:47 riastradh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
* Jerome Glisse
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_vm.c,v 1.7 2021/12/19 12:22:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_vm.c,v 1.8 2021/12/19 12:30:47 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/interval_tree_generic.h>
@@ -2836,7 +2836,7 @@
adev->vm_manager.vm_pte_scheds,
adev->vm_manager.vm_pte_num_scheds, NULL);
if (r)
- return r;
+ goto error_free_destroylock;
r = drm_sched_entity_init(&vm->delayed, DRM_SCHED_PRIORITY_NORMAL,
adev->vm_manager.vm_pte_scheds,
@@ -2926,10 +2926,14 @@
dma_fence_put(vm->last_direct);
dma_fence_put(vm->last_delayed);
drm_sched_entity_destroy(&vm->delayed);
+ mutex_destroy(&vm->eviction_lock);
error_free_direct:
drm_sched_entity_destroy(&vm->direct);
+error_free_destroylock:
+ spin_lock_destroy(&vm->invalidated_lock);
+
return r;
}
diff -r af09ec896933 -r 01e399d7a5ab sys/external/bsd/drm2/dist/drm/scheduler/sched_entity.c
--- a/sys/external/bsd/drm2/dist/drm/scheduler/sched_entity.c Sun Dec 19 12:30:40 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/scheduler/sched_entity.c Sun Dec 19 12:30:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched_entity.c,v 1.3 2021/12/19 12:23:16 riastradh Exp $ */
+/* $NetBSD: sched_entity.c,v 1.4 2021/12/19 12:30:47 riastradh Exp $ */
/*
* Copyright 2015 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sched_entity.c,v 1.3 2021/12/19 12:23:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_entity.c,v 1.4 2021/12/19 12:30:47 riastradh Exp $");
#include <linux/kthread.h>
#include <linux/slab.h>
@@ -302,6 +302,8 @@
drm_sched_rq_remove_entity(entity->rq, entity);
}
+ spin_lock_destroy(&entity->rq_lock);
+
/* Consumption of existing IBs wasn't completed. Forcefully
* remove them here.
*/
@@ -324,6 +326,8 @@
drm_sched_entity_kill_jobs(entity);
}
+ destroy_completion(&entity->entity_idle);
+
dma_fence_put(entity->last_scheduled);
entity->last_scheduled = NULL;
}
Home |
Main Index |
Thread Index |
Old Index