Module Name: src Committed By: riastradh Date: Mon Aug 27 13:34:50 UTC 2018
Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fence.c Log Message: Fix fence API usage: lock is _not_ held here, so acquire it. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.12 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.13 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.12 Mon Aug 27 07:49:25 2018 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c Mon Aug 27 13:34:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_fence.c,v 1.12 2018/08/27 07:49:25 riastradh Exp $ */ +/* $NetBSD: radeon_fence.c,v 1.13 2018/08/27 13:34:50 riastradh Exp $ */ /* * Copyright 2009 Jerome Glisse. @@ -31,7 +31,7 @@ * Dave Airlie */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.12 2018/08/27 07:49:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.13 2018/08/27 13:34:50 riastradh Exp $"); #include <linux/seq_file.h> #include <linux/atomic.h> @@ -1165,7 +1165,7 @@ radeon_fence_default_wait(struct fence * struct radeon_device *rdev = fence->rdev; int r; - BUG_ON(!spin_is_locked(&rdev->fence_lock)); + spin_lock(&rdev->fence_lock); if (intr) { DRM_SPIN_TIMED_WAIT_UNTIL(r, &rdev->fence_queue, &rdev->fence_lock, timo, @@ -1175,6 +1175,7 @@ radeon_fence_default_wait(struct fence * &rdev->fence_lock, timo, radeon_test_signaled(fence)); } + spin_unlock(&rdev->fence_lock); return r; }