Displaying 20 results from an estimated 35 matches for "drm_vblank_put".
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...->crtc, s->event);
+ drm_arm_vblank_event(dev, drm_crtc_index(s->crtc),
+ s->event);
} else {
- drm_send_vblank_event(dev, s->crtc, s->event);
+ drm_crtc_send_vblank_event(s->crtc, s->event);
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(s->crtc));
}
}
else {
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(state->crtc));
}
list_del(&s->head);
@@ -873,9 +873,10 @@ nou...
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...->crtc, s->event);
+ drm_arm_vblank_event(dev, drm_crtc_index(s->crtc),
+ s->event);
} else {
- drm_send_vblank_event(dev, s->crtc, s->event);
+ drm_crtc_send_vblank_event(s->crtc, s->event);
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(s->crtc));
}
}
else {
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(state->crtc));
}
list_del(&s->head);
@@ -873,9 +873,10 @@ nou...
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...->crtc, s->event);
+ drm_arm_vblank_event(dev, drm_crtc_index(s->crtc),
+ s->event);
} else {
- drm_send_vblank_event(dev, s->crtc, s->event);
+ drm_crtc_send_vblank_event(s->crtc, s->event);
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(s->crtc));
}
}
else {
/* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
+ drm_vblank_put(dev, drm_crtc_index(state->crtc));
}
list_del(&s->head);
@@ -873,9 +873,10 @@ nou...
2016 Jun 06
0
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...m_vblank_event(dev, drm_crtc_index(s->crtc),
> + s->event);
> } else {
> - drm_send_vblank_event(dev, s->crtc, s->event);
> + drm_crtc_send_vblank_event(s->crtc, s->event);
>
> /* Give up ownership of vblank for page-flipped crtc */
> - drm_vblank_put(dev, s->crtc);
> + drm_vblank_put(dev, drm_crtc_index(s->crtc));
> }
> }
> else {
> /* Give up ownership of vblank for page-flipped crtc */
> - drm_vblank_put(dev, s->crtc);
> + drm_vblank_put(dev, drm_crtc_index(state->crtc));
> }
>
> l...
2016 Jun 07
0
[PATCH 01/10] drm/nouveau: replace legacy vblank helpers
...drm_vblank_get(dev, nouveau_crtc(crtc)->index);
+ drm_crtc_vblank_get(crtc);
/* Emit a page flip */
if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
@@ -810,7 +809,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
return 0;
fail_unreserve:
- drm_vblank_put(dev, nouveau_crtc(crtc)->index);
+ drm_crtc_vblank_put(crtc);
ttm_bo_unreserve(&old_bo->bo);
fail_unpin:
mutex_unlock(&cli->mutex);
@@ -842,17 +841,17 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_...
2020 Jun 24
0
[RFC v7 03/11] drm/vblank: Add vblank works
...v, unsigned int pipe)
+int drm_vblank_get(struct drm_device *dev, unsigned int pipe)
{
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
unsigned long irqflags;
@@ -1178,7 +1186,7 @@ int drm_crtc_vblank_get(struct drm_crtc *crtc)
}
EXPORT_SYMBOL(drm_crtc_vblank_get);
-static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
+void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
{
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
@@ -1281,13 +1289,16 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc)
unsigned int pipe = drm_crtc_index(crtc);
struct...
2020 Jan 15
1
[PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...drm_crtc *crtc)
}
EXPORT_SYMBOL(drm_crtc_vblank_get);
+static bool __vblank_disable_immediate(struct drm_device *dev, unsigned int pipe)
+{
+ if (!dev->vblank_disable_immediate)
+ return false;
+ if (!dev->driver->get_vblank_timestamp)
+ return false;
+ return true;
+}
+
static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
{
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
@@ -1086,7 +1082,7 @@ static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
return;
else if (drm_vblank_offdelay < 0)
vblank_disable_fn(&vblank->disable_t...
2020 Jun 22
0
[RFC v5 02/10] drm/vblank: Add vblank works
...#include <drm/drm_crtc.h>
#include <drm/drm_drv.h>
@@ -155,6 +157,8 @@
static bool
drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe,
ktime_t *tvblank, bool in_vblank_irq);
+static int drm_vblank_get(struct drm_device *dev, unsigned int pipe);
+static void drm_vblank_put(struct drm_device *dev, unsigned int pipe);
static unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
@@ -490,6 +494,35 @@ static void vblank_disable_fn(struct timer_list *t)
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
}
+static void drm_vblank_work_releas...
2020 May 08
0
[RFC v4 04/12] drm/vblank: Add vblank works
..._work *work, *next;
+ u64 count = atomic64_read(&vblank->count);
+
+ spin_lock(&vblank->work_lock);
+ list_for_each_entry_safe(work, next, &vblank->pending_work, pending) {
+ if (!vblank_passed(count, work->count))
+ continue;
+
+ list_del_init(&work->pending);
+ drm_vblank_put(vblank->dev, vblank->pipe);
+ queue_vbl_work(work);
+ }
+ spin_unlock(&vblank->work_lock);
+}
+
/**
* drm_handle_vblank - handle a vblank event
* @dev: DRM device
@@ -1919,6 +2002,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
spin_unlock(&dev->...
2015 Oct 30
5
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...send_vblank_event(dev, crtcid, s->event);
+ if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+ drm_arm_vblank_event(dev, s->crtc, s->event);
+ } else {
+ drm_send_vblank_event(dev, s->crtc, s->event);
+ /* Give up ownership of vblank for page-flipped crtc */
+ drm_vblank_put(dev, s->crtc);
+ }
}
- /* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
-
list_del(&s->head);
if (ps)
*ps = *s;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index eb513341b6ee..4c91ac419d5d 100644
--- a/include/drm/drmP.h
+++ b...
2020 Jan 15
0
[Intel-gfx] [PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...>
> +static bool __vblank_disable_immediate(struct drm_device *dev, unsigned int pipe)
> +{
> + if (!dev->vblank_disable_immediate)
> + return false;
> + if (!dev->driver->get_vblank_timestamp)
> + return false;
> + return true;
> +}
> +
> static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
> {
> struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
> @@ -1086,7 +1082,7 @@ static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
> return;
> else if (drm_vblank_offdelay < 0)
> vblank_disabl...
2020 Mar 18
4
[PATCH 1/9] drm/vblank: Add vblank works
...t; +{
> + struct drm_vblank_work *work, *next;
> + u64 count = atomic64_read(&vblank->count);
> +
> + list_for_each_entry_safe(work, next, &vblank->vblank_work.irq_list,
> + list) {
> + if (!vblank_passed(count, work->count))
> + continue;
> +
> + drm_vblank_put(vblank->dev, vblank->pipe);
> + list_move_tail(&work->list, &vblank->vblank_work.work_list);
> + work->state = DRM_VBL_WORK_SCHEDULED;
> + }
> +}
> +
> /**
> * drm_handle_vblank - handle a vblank event
> * @dev: DRM device
> @@ -1866,6 +1992,...
2013 Mar 28
1
mesa vdpau regression with "dri2: Fix potential race and crash for swap at next vblank."
...goto fail_put;
+
/* Choose the channel the flip will be handled in */
fence = new_bo->bo.sync_obj;
if (fence)
@@ -614,6 +618,8 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
fail_unreserve:
nouveau_page_flip_unreserve(old_bo, new_bo, NULL);
+fail_put:
+ drm_vblank_put(dev, s->crtc);
fail_free:
kfree(s);
return ret;
@@ -638,24 +644,16 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
}
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
- if (s->event) {
- struct drm_pending_vblank_event *e = s->event;
- s...
2020 Mar 18
0
[PATCH 1/9] drm/vblank: Add vblank works
...le_vblank_works(struct drm_vblank_crtc *vblank)
+{
+ struct drm_vblank_work *work, *next;
+ u64 count = atomic64_read(&vblank->count);
+
+ list_for_each_entry_safe(work, next, &vblank->vblank_work.irq_list,
+ list) {
+ if (!vblank_passed(count, work->count))
+ continue;
+
+ drm_vblank_put(vblank->dev, vblank->pipe);
+ list_move_tail(&work->list, &vblank->vblank_work.work_list);
+ work->state = DRM_VBL_WORK_SCHEDULED;
+ }
+}
+
/**
* drm_handle_vblank - handle a vblank event
* @dev: DRM device
@@ -1866,6 +1992,7 @@ bool drm_handle_vblank(struct drm_device...
2015 Nov 09
2
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events (v2)
...m->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+ drm_arm_vblank_event(dev, s->crtc, s->event);
+ } else {
+ drm_send_vblank_event(dev, s->crtc, s->event);
- drm_send_vblank_event(dev, crtcid, s->event);
+ /* Give up ownership of vblank for page-flipped crtc */
+ drm_vblank_put(dev, s->crtc);
+ }
+ }
+ else {
+ /* Give up ownership of vblank for page-flipped crtc */
+ drm_vblank_put(dev, s->crtc);
}
-
- /* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
list_del(&s->head);
if (ps)
diff --git a/include/drm/drm...
2020 Mar 27
2
[PATCH 1/9] drm/vblank: Add vblank works
...tomic64_read(&vblank->count);
> > > +
> > > + list_for_each_entry_safe(work, next, &vblank->vblank_work.irq_list,
> > > + list) {
> > > + if (!vblank_passed(count, work->count))
> > > + continue;
> > > +
> > > + drm_vblank_put(vblank->dev, vblank->pipe);
> > > + list_move_tail(&work->list, &vblank->vblank_work.work_list);
> > > + work->state = DRM_VBL_WORK_SCHEDULED;
> > > + }
> > > +}
> > > +
> > > /**
> > > * drm_handle_vblank -...
2015 Nov 10
2
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events (v3)
...m->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+ drm_arm_vblank_event(dev, s->crtc, s->event);
+ } else {
+ drm_send_vblank_event(dev, s->crtc, s->event);
- drm_send_vblank_event(dev, crtcid, s->event);
+ /* Give up ownership of vblank for page-flipped crtc */
+ drm_vblank_put(dev, s->crtc);
+ }
+ }
+ else {
+ /* Give up ownership of vblank for page-flipped crtc */
+ drm_vblank_put(dev, s->crtc);
}
-
- /* Give up ownership of vblank for page-flipped crtc */
- drm_vblank_put(dev, s->crtc);
list_del(&s->head);
if (ps)
diff --git a/include/drm/drm...
2020 Jun 24
13
[RFC v7 00/11] drm/nouveau: Introduce CRC support for gf119+
Nvidia released some documentation on how CRC support works on their
GPUs, hooray!
So: this patch series implements said CRC support in nouveau, along with
adding some special debugfs interfaces for some relevant igt-gpu-tools
tests (already on the ML).
First - we add some new functionality to kthread_work in the kernel, and
then use this to add a new feature to DRM that Ville Syrj?l? came up
2015 Nov 06
0
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...s->event);
> + if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
> + drm_arm_vblank_event(dev, s->crtc, s->event);
> + } else {
> + drm_send_vblank_event(dev, s->crtc, s->event);
> + /* Give up ownership of vblank for page-flipped crtc */
> + drm_vblank_put(dev, s->crtc);
> + }
> }
>
> - /* Give up ownership of vblank for page-flipped crtc */
> - drm_vblank_put(dev, s->crtc);
> -
> list_del(&s->head);
> if (ps)
> *ps = *s;
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index eb513341b...
2020 Mar 27
0
[PATCH 1/9] drm/vblank: Add vblank works
...k, *next;
> > + u64 count = atomic64_read(&vblank->count);
> > +
> > + list_for_each_entry_safe(work, next, &vblank->vblank_work.irq_list,
> > + list) {
> > + if (!vblank_passed(count, work->count))
> > + continue;
> > +
> > + drm_vblank_put(vblank->dev, vblank->pipe);
> > + list_move_tail(&work->list, &vblank->vblank_work.work_list);
> > + work->state = DRM_VBL_WORK_SCHEDULED;
> > + }
> > +}
> > +
> > /**
> > * drm_handle_vblank - handle a vblank event
> > *...