Displaying 20 results from an estimated 30 matches for "drm_handle_vblank".
2013 Aug 27
0
[PATCH 6/9] drm/nouveau: Convert event handler list to RCU
...=============
[ INFO: possible circular locking dependency detected ]
3.10.0-0+tip-xeon+lockdep #0+tip Not tainted
-------------------------------------------------------
swapper/7/0 is trying to acquire lock:
(&(&dev->vblank_time_lock)->rlock){-.....}, at: [<ffffffffa0086269>] drm_handle_vblank+0x69/0x400 [drm]
but task is already holding lock:
(&(&event->lock)->rlock){-.....}, at: [<ffffffffa0101dbd>] nouveau_event_trigger+0x4d/0xd0 [nouveau]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&(&even...
2013 Aug 12
2
[PATCH] drm/nouveau: fix vblank deadlock
...ways taken when the vblank state is toggled,
which caused a deadlock when &event->lock was also taken during
event_get/put.
Solve the race by requiring that lock to change enable/disable state,
and always keeping vblank on the event list. Core drm ignores unwanted
vblanks, so extra calls to drm_handle_vblank are harmless.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
---
diff --git a/drivers/gpu/drm/nouveau/core/core/event.c b/drivers/gpu/drm/nouveau/core/core/event.c
index 7eb81c1..78bff7c 100644
--- a/drivers/gpu/drm/nouveau/core/core/event.c
+++ b/drivers/gpu/drm/nouve...
2016 Jul 05
0
[PATCH 4/6] drm/nouveau: use drm_crtc_handle_vblank()
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Remove legacy usage of drm_handle_vblank()
Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index bd8d5bb..6e9786...
2013 Aug 27
11
[PATCH 0/9] drm/nouveau: Cleanup event/handler design
This series was originally motivated by a deadlock, introduced in
commit 1d7c71a3e2f77336df536855b0efd2dc5bdeb41b
'drm/nouveau/disp: port vblank handling to event interface',
due to inverted lock order between nouveau_drm_vblank_enable()
and nouveau_drm_vblank_handler() (the complete
lockdep report is included in the patch 4/5 changelog).
Because this series fixes the vblank event
2015 Oct 30
5
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...t(struct drm_crtc *crtc,
struct drm_pending_vblank_event *e);
+void drm_send_vblank_event(struct drm_device *dev, unsigned int pipe,
+ struct drm_pending_vblank_event *e);
+void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
+ struct drm_pending_vblank_event *e);
extern bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe);
extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc);
extern int drm_vblank_get(struct drm_device *dev, unsigned int pipe);
--
2.5.1
2013 Aug 19
0
[PATCH] drm/nouveau: fix vblank deadlock
...ate is toggled,
> which caused a deadlock when &event->lock was also taken during
> event_get/put.
>
> Solve the race by requiring that lock to change enable/disable state,
> and always keeping vblank on the event list. Core drm ignores unwanted
> vblanks, so extra calls to drm_handle_vblank are harmless.
I don't feel this is the appropriate solution to the lock inversion
between vblank_time_lock and event->lock.
Preferably drm core should correct the interface layer bug; ie., calling
into a sub-driver holding a lock _and_ requiring the sub-driver to call a
drm helper function...
2020 Jan 15
1
[PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...st vblank.
*/
- if (dev->vblank_disable_immediate &&
+ if (__vblank_disable_immediate(dev, pipe) &&
drm_wait_vblank_is_query(vblwait) &&
READ_ONCE(vblank->enabled)) {
drm_wait_vblank_reply(dev, pipe, &vblwait->reply);
@@ -1820,7 +1816,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
* been signaled. The disable has to be last (after
* drm_handle_vblank_events) so that the timestamp is always accurate.
*/
- disable_irq = (dev->vblank_disable_immediate &&
+ disable_irq = (__vblank_disable_immediate(dev, pipe) &&a...
2015 Nov 06
0
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...ac0ae7c7ce5751f25ebe60f28
Author: Mario Kleiner <mario.kleiner.de at gmail.com>
Date: Tue May 13 00:42:08 2014 +0200
drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
Cards with nv04 display engine can't reliably use vblank
counts and timestamps computed via drm_handle_vblank(), as
the function gets invoked after sending the pageflip events.
Fix this by defaulting to the old crtcid = -1 fallback path
on <= NV-50 cards, and only using the precise path on NV-50
and later.
Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
Signe...
2020 Mar 18
4
[PATCH 1/9] drm/vblank: Add vblank works
...timer_setup(&vblank->disable_timer, vblank_disable_fn, 0);
> seqlock_init(&vblank->seqlock);
> +
> + vblank_work_init(vblank);
> }
>
> DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n");
> @@ -1825,6 +1935,22 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
> trace_drm_vblank_event(pipe, seq, now, high_prec);
> }
>
> +static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
> +{
> + struct drm_vblank_work *work, *next;
> + u64 count = atomic64_read(&vblank->c...
2020 May 08
0
[RFC v4 04/12] drm/vblank: Add vblank works
..._vblank_init(struct drm_device *dev, unsigned int num_crtcs)
vblank);
if (ret)
return ret;
+
+ ret = vblank_worker_init(vblank);
+ if (ret)
+ return ret;
}
DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n");
@@ -1878,6 +1922,45 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
trace_drm_vblank_event(pipe, seq, now, high_prec);
}
+static void queue_vbl_work(struct drm_vblank_work *work)
+{
+ struct kthread_flush_work *fwork, *tmp;
+ bool busy, reinit = false;
+
+ busy = kthread_queue_work(work->vblank->worker, &...
2020 Mar 18
0
[PATCH 1/9] drm/vblank: Add vblank works
...tqueue_head(&vblank->queue);
timer_setup(&vblank->disable_timer, vblank_disable_fn, 0);
seqlock_init(&vblank->seqlock);
+
+ vblank_work_init(vblank);
}
DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n");
@@ -1825,6 +1935,22 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
trace_drm_vblank_event(pipe, seq, now, high_prec);
}
+static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
+{
+ struct drm_vblank_work *work, *next;
+ u64 count = atomic64_read(&vblank->count);
+
+ list_for_each_entry_safe...
2017 Apr 15
1
[Bug 100691] New: [4.10] BUG: KASAN: use-after-free in drm_calc_vbltimestamp_from_scanoutpos+0x625/0x740
...(kernel/locking/spinlock.c:190)
? try_to_wake_up+0xc6/0xd00 (kernel/sched/core.c:2010)
? debug_check_no_locks_freed+0x280/0x280 (kernel/locking/lockdep.c:4270)
? debug_check_no_locks_freed+0x280/0x280 (kernel/locking/lockdep.c:4270)
? migrate_swap_stop+0x790/0x790 (kernel/sched/core.c:1291)
? drm_handle_vblank+0x1c1/0x7d0 (drivers/gpu/drm/drm_irq.c:1704)
nouveau_display_vblstamp+0x16d/0x2a0 [nouveau]
(drivers/gpu/drm/nouveau/nouveau_display.c:159)
drm_get_last_vbltimestamp+0xcb/0x160 (drivers/gpu/drm/drm_irq.c:878)
? get_drm_timestamp+0x40/0x40 (drivers/gpu/drm/drm_irq.c:848)
? trace_hardirqs_off+0xd...
2013 Mar 23
1
[bisected][3.9.0-rc3] NULL ptr dereference from nv50_disp_intr()
On Tue, 2013-03-19 at 11:13 -0400, Peter Hurley wrote:
> On vanilla 3.9.0-rc3, I get this 100% repeatable oops after login when
> the user X session is coming up:
Perhaps I wasn't clear that this happens on every boot and is a
regression from 3.8
I'd be happy to help resolve this but time is of the essence; it would
be a shame to have to revert all of this for 3.9
Regards,
Peter
2020 Jun 22
0
[RFC v5 02/10] drm/vblank: Add vblank works
...lize vblank support
* @dev: DRM device
@@ -539,6 +629,10 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
vblank);
if (ret)
return ret;
+
+ ret = vblank_worker_init(vblank);
+ if (ret)
+ return ret;
}
return 0;
@@ -1891,6 +1985,24 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
trace_drm_vblank_event(pipe, seq, now, high_prec);
}
+static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
+{
+ struct drm_vblank_work *work, *next;
+ u64 count = atomic64_read(&vblank->count);
+
+ spin_lock(&vblank-&g...
2020 Mar 27
2
[PATCH 1/9] drm/vblank: Add vblank works
...> > > seqlock_init(&vblank->seqlock);
> > > +
> > > + vblank_work_init(vblank);
> > > }
> > >
> > > DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n");
> > > @@ -1825,6 +1935,22 @@ static void drm_handle_vblank_events(struct
> > > drm_device *dev, unsigned int pipe)
> > > trace_drm_vblank_event(pipe, seq, now, high_prec);
> > > }
> > >
> > > +static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
> > > +{
> > > + struct drm_v...
2020 Jan 15
0
[Intel-gfx] [PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...v->vblank_disable_immediate &&
> + if (__vblank_disable_immediate(dev, pipe) &&
> drm_wait_vblank_is_query(vblwait) &&
> READ_ONCE(vblank->enabled)) {
> drm_wait_vblank_reply(dev, pipe, &vblwait->reply);
> @@ -1820,7 +1816,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
> * been signaled. The disable has to be last (after
> * drm_handle_vblank_events) so that the timestamp is always accurate.
> */
> - disable_irq = (dev->vblank_disable_immediate &&
> + disable_irq = (__vblank_disable_imm...
2020 Mar 27
0
[PATCH 1/9] drm/vblank: Add vblank works
...able_timer, vblank_disable_fn, 0);
> > seqlock_init(&vblank->seqlock);
> > +
> > + vblank_work_init(vblank);
> > }
> >
> > DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n");
> > @@ -1825,6 +1935,22 @@ static void drm_handle_vblank_events(struct
> > drm_device *dev, unsigned int pipe)
> > trace_drm_vblank_event(pipe, seq, now, high_prec);
> > }
> >
> > +static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
> > +{
> > + struct drm_vblank_work *work, *next;
> >...
2020 Apr 13
0
[PATCH 1/9] drm/vblank: Add vblank works
...lock);
> > > > +
> > > > + vblank_work_init(vblank);
> > > > }
> > > >
> > > > DRM_INFO("Supports vblank timestamp caching Rev 2
> > > > (21.10.2013).\n");
> > > > @@ -1825,6 +1935,22 @@ static void drm_handle_vblank_events(struct
> > > > drm_device *dev, unsigned int pipe)
> > > > trace_drm_vblank_event(pipe, seq, now, high_prec);
> > > > }
> > > >
> > > > +static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
> > > > +{...
2015 Nov 07
7
[Bug 92852] New: NV34: WARNING: ... at drivers/gpu/drm/drm_irq.c:924 drm_vblank_count_and_time+0x71/0x80 [drm]()
...f85d38b6>] nouveau_flip_complete+0x26/0x220 [nouveau]
[<f85d2470>] ? nouveau_display_vblstamp+0x70/0x80 [nouveau]
[<f8536c40>] nvif_notify+0x90/0x160 [nouveau]
[<c049af8f>] ? __wake_up+0x3f/0x50
[<c0ac2b8d>] ? _raw_spin_unlock_irqrestore+0xd/0x10
[<f7e1d170>] ? drm_handle_vblank+0x210/0x360 [drm]
[<f85c8dd8>] nvkm_client_ntfy+0x78/0x80 [nouveau]
[<f8536ed8>] nvkm_client_notify+0x28/0x30 [nouveau]
[<f8539cb5>] nvkm_notify_send+0x75/0x120 [nouveau]
[<f8537d95>] nvkm_event_send+0xb5/0xe0 [nouveau]
[<f85c58fe>] nvkm_sw_chan_mthd+0x5e/0x80 [no...
2015 Nov 09
2
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events (v2)
...;imirkin at alum.mit.edu>
v2 (mario): Integrate my own review comments into Daniels patch.
- Fix function prototypes in drmP.h
- Add missing vblank_put() for pageflip completion without
pageflip event.
- Initialize sequence number for queued pageflip event to avoid
trouble in drm_handle_vblank_events().
- Remove dead code and spelling fix.
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
drivers/gpu/drm/drm_irq.c | 54 ++++++++++++++++++++++++++++++-
drivers/gpu/drm/nouveau/nouveau_di...