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/amd/amdgpu avoid calling drm_...
details: https://anonhg.NetBSD.org/src/rev/c60534240564
branches: trunk
changeset: 378110:c60534240564
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jul 20 18:02:45 2023 +0000
description:
avoid calling drm_sched_fini() for AMDGPU_RING_TYPE_KIQ rings.
drm_sched_init() is not called for these rings, and we'd panic trying
to mutex_destroy() a mutex that wasn't initialised.
this seems like a general bug, not a bug in netbsd port.
diffstat:
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 130794d7566f -r c60534240564 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c Thu Jul 20 16:22:30 2023 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c Thu Jul 20 18:02:45 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_fence.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $ */
+/* $NetBSD: amdgpu_fence.c,v 1.11 2023/07/20 18:02:45 mrg Exp $ */
/*
* Copyright 2009 Jerome Glisse.
@@ -31,7 +31,7 @@
* Dave Airlie
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_fence.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_fence.c,v 1.11 2023/07/20 18:02:45 mrg Exp $");
#include <linux/seq_file.h>
#include <linux/atomic.h>
@@ -541,7 +541,9 @@ void amdgpu_fence_driver_fini(struct amd
}
amdgpu_irq_put(adev, ring->fence_drv.irq_src,
ring->fence_drv.irq_type);
- drm_sched_fini(&ring->sched);
+ if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
+ drm_sched_fini(&ring->sched);
+ }
del_timer_sync(&ring->fence_drv.fallback_timer);
for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
dma_fence_put(ring->fence_drv.fences[j]);
Home |
Main Index |
Thread Index |
Old Index