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: drm_update_vblank_count ...
details: https://anonhg.NetBSD.org/src/rev/02e6f482c811
branches: trunk
changeset: 1028476:02e6f482c811
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:08:10 2021 +0000
description:
drm: drm_update_vblank_count requires vbl_lock.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_vblank.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r b37e6d296e0c -r 02e6f482c811 sys/external/bsd/drm2/dist/drm/drm_vblank.c
--- a/sys/external/bsd/drm2/dist/drm/drm_vblank.c Sun Dec 19 11:08:02 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_vblank.c Sun Dec 19 11:08:10 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_vblank.c,v 1.6 2021/12/19 11:08:02 riastradh Exp $ */
+/* $NetBSD: drm_vblank.c,v 1.7 2021/12/19 11:08:10 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.6 2021/12/19 11:08:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vblank.c,v 1.7 2021/12/19 11:08:10 riastradh Exp $");
#include <linux/export.h>
#include <linux/moduleparam.h>
@@ -345,12 +345,14 @@
WARN_ONCE(drm_debug_enabled(DRM_UT_VBL) && !dev->driver->get_vblank_timestamp,
"This function requires support for accurate vblank timestamps.");
+ spin_lock(&dev->vbl_lock);
spin_lock_irqsave(&dev->vblank_time_lock, flags);
drm_update_vblank_count(dev, pipe, false);
vblank = drm_vblank_count(dev, pipe);
spin_unlock_irqrestore(&dev->vblank_time_lock, flags);
+ spin_unlock(&dev->vbl_lock);
return vblank;
}
Home |
Main Index |
Thread Index |
Old Index