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/i915/display i915: Rework loc...
details: https://anonhg.NetBSD.org/src/rev/d3ed1a213403
branches: trunk
changeset: 1028805:d3ed1a213403
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:04:42 2021 +0000
description:
i915: Rework locking in intel_pipe_update_start/end.
Use event_lock rather than vbl_lock for the operation; narrow the
scope of vbl_lock.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (66 lines):
diff -r 94afca62ecba -r d3ed1a213403 sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c
--- a/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Sun Dec 19 12:04:33 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Sun Dec 19 12:04:42 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $ */
+/* $NetBSD: intel_sprite.c,v 1.5 2021/12/19 12:04:42 riastradh Exp $ */
/*
* Copyright © 2011 Intel Corporation
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.5 2021/12/19 12:04:42 riastradh Exp $");
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
@@ -122,12 +122,12 @@
psr_status);
spin_lock(&crtc->base.dev->event_lock);
- spin_lock(&dev_priv->drm.vbl_lock);
crtc->debug.min_vbl = min;
crtc->debug.max_vbl = max;
trace_intel_pipe_update_start(crtc);
+ spin_lock(&dev_priv->drm.vbl_lock);
DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, wq, &dev_priv->drm.vbl_lock,
timeout,
(scanline = intel_get_crtc_scanline(crtc),
@@ -154,6 +154,7 @@
*/
while (need_vlv_dsi_wa && scanline == vblank_start)
scanline = intel_get_crtc_scanline(crtc);
+ spin_unlock(&dev_priv->drm.vbl_lock);
crtc->debug.scanline_start = scanline;
crtc->debug.start_vbl_time = ktime_get();
@@ -164,7 +165,6 @@
irq_disable:
spin_lock(&crtc->base.dev->event_lock);
- spin_lock(&dev_priv->drm.vbl_lock);
}
/**
@@ -191,9 +191,7 @@
* event outside of the critical section - the spinlock might spin for a
* while ... */
if (new_crtc_state->uapi.event) {
-#ifndef __NetBSD__ /* XXX locking against self */
WARN_ON(drm_crtc_vblank_get(&crtc->base) != 0);
-#endif
drm_crtc_arm_vblank_event(&crtc->base,
new_crtc_state->uapi.event);
@@ -201,7 +199,6 @@
new_crtc_state->uapi.event = NULL;
}
- spin_unlock(&dev_priv->drm.vbl_lock);
spin_unlock(&crtc->base.dev->event_lock);
if (intel_vgpu_active(dev_priv))
Home |
Main Index |
Thread Index |
Old Index