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 drm: Use drm_vblank_get_locke...
details: https://anonhg.NetBSD.org/src/rev/caf2e349f482
branches: trunk
changeset: 1028891:caf2e349f482
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:24:57 2021 +0000
description:
drm: Use drm_vblank_get_locked/unlocked.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_vblank.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (45 lines):
diff -r d95d324969e0 -r caf2e349f482 sys/external/bsd/drm2/dist/drm/drm_vblank.c
--- a/sys/external/bsd/drm2/dist/drm/drm_vblank.c Sun Dec 19 12:24:49 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_vblank.c Sun Dec 19 12:24:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_vblank.c,v 1.12 2021/12/19 12:05:08 riastradh Exp $ */
+/* $NetBSD: drm_vblank.c,v 1.13 2021/12/19 12:24:57 riastradh Exp $ */
/*
* drm_irq.c IRQ and vblank support
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_vblank.c,v 1.12 2021/12/19 12:05:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vblank.c,v 1.13 2021/12/19 12:24:57 riastradh Exp $");
#include <linux/export.h>
#include <linux/moduleparam.h>
@@ -1201,20 +1201,21 @@
if (WARN_ON(pipe >= dev->num_crtcs))
return;
- ret = drm_vblank_get(dev, pipe);
+ spin_lock(&dev->event_lock);
+
+ ret = drm_vblank_get_locked(dev, pipe);
if (WARN(ret, "vblank not available on crtc %i, ret=%i\n", pipe, ret))
- return;
+ goto out;
- spin_lock(&dev->event_lock);
last = drm_vblank_count(dev, pipe);
DRM_SPIN_TIMED_WAIT_UNTIL(ret, &vblank->queue, &dev->event_lock,
msecs_to_jiffies(100),
last != drm_vblank_count(dev, pipe));
- spin_unlock(&dev->event_lock);
WARN(ret == 0, "vblank wait timed out on crtc %i\n", pipe);
- drm_vblank_put(dev, pipe);
+ drm_vblank_put_locked(dev, pipe);
+out: spin_unlock(&dev->event_lock);
}
EXPORT_SYMBOL(drm_wait_one_vblank);
Home |
Main Index |
Thread Index |
Old Index