Displaying 20 results from an estimated 23 matches for "drm_vblank_work".
2020 Jun 24
0
[RFC v7 03/11] drm/vblank: Add vblank works
...mes during the
first few scanlines of the vblank). As such we use a high-priority
per-CRTC thread to accomplish this.
Changes since v6:
* Get rid of ->pending and seqcounts, and implement flushing through
simpler means - danvet
* Get rid of work_lock, just use drm_device->event_lock
* Move drm_vblank_work item cleanup into drm_crtc_vblank_off() so that
we ensure that all vblank work has finished before disabling vblanks
* Add checks into drm_crtc_vblank_reset() so we yell if it gets called
while there's vblank workers active
* Grab event_lock in both drm_crtc_vblank_on()/drm_crtc_vblank_off(...
2020 Mar 18
4
[PATCH 1/9] drm/vblank: Add vblank works
...ev->vblank);
> @@ -447,6 +453,108 @@ void drm_vblank_cleanup(struct drm_device *dev)
> dev->num_crtcs = 0;
> }
>
> +static int vblank_work_thread(void *data)
> +{
> + struct drm_vblank_crtc *vblank = data;
> +
> + while (!kthread_should_stop()) {
> + struct drm_vblank_work *work, *next;
> + LIST_HEAD(list);
> + u64 count;
> + int ret;
> +
> + spin_lock_irq(&vblank->dev->event_lock);
> +
> + ret = wait_event_interruptible_lock_irq(vblank->queue,
> + kthread_should_stop() ||
> + !list_empty(&vblank->vblank...
2020 Jun 22
0
[RFC v5 02/10] drm/vblank: Add vblank works
...se a high-priority
per-CRTC thread to accomplish this.
[based off patches from Ville Syrj?l? <ville.syrjala at linux.intel.com>,
change below to signoff later]
Changes since v4:
* Get rid of kthread interfaces we tried adding and move all of the
locking into drm_vblank.c. For implementing drm_vblank_work_flush(),
we now use a wait_queue and sequence counters in order to
differentiate between multiple work item executions.
* Get rid of drm_vblank_work_cancel() - this would have been pretty
difficult to actually reimplement and it occurred to me that neither
nouveau or i915 are even planning...
2020 Mar 18
0
[PATCH 1/9] drm/vblank: Add vblank works
...op(vblank->vblank_work.thread);
}
kfree(dev->vblank);
@@ -447,6 +453,108 @@ void drm_vblank_cleanup(struct drm_device *dev)
dev->num_crtcs = 0;
}
+static int vblank_work_thread(void *data)
+{
+ struct drm_vblank_crtc *vblank = data;
+
+ while (!kthread_should_stop()) {
+ struct drm_vblank_work *work, *next;
+ LIST_HEAD(list);
+ u64 count;
+ int ret;
+
+ spin_lock_irq(&vblank->dev->event_lock);
+
+ ret = wait_event_interruptible_lock_irq(vblank->queue,
+ kthread_should_stop() ||
+ !list_empty(&vblank->vblank_work.work_list),
+ vblank->dev->...
2020 May 08
0
[RFC v4 04/12] drm/vblank: Add vblank works
...m_device *dev, void *ptr)
WARN_ON(READ_ONCE(vblank->enabled) &&
drm_core_check_feature(dev, DRIVER_MODESET));
+ if (vblank->worker && !IS_ERR(vblank->worker))
+ kthread_destroy_worker(vblank->worker);
del_timer_sync(&vblank->disable_timer);
}
+/**
+ * drm_vblank_work_init - initialize a vblank work item
+ * @work: vblank work item
+ * @crtc: CRTC whose vblank will trigger the work execution
+ * @func: work function to be executed
+ *
+ * Initialize a vblank work item for a specific crtc.
+ */
+void drm_vblank_work_init(struct drm_vblank_work *work, struct drm_c...
2020 Mar 27
2
[PATCH 1/9] drm/vblank: Add vblank works
...> > > dev->num_crtcs = 0;
> > > }
> > >
> > > +static int vblank_work_thread(void *data)
> > > +{
> > > + struct drm_vblank_crtc *vblank = data;
> > > +
> > > + while (!kthread_should_stop()) {
> > > + struct drm_vblank_work *work, *next;
> > > + LIST_HEAD(list);
> > > + u64 count;
> > > + int ret;
> > > +
> > > + spin_lock_irq(&vblank->dev->event_lock);
> > > +
> > > + ret = wait_event_interruptible_lock_irq(vblank->queue,
> > >...
2020 Mar 27
0
[PATCH 1/9] drm/vblank: Add vblank works
...id drm_vblank_cleanup(struct drm_device *dev)
> > dev->num_crtcs = 0;
> > }
> >
> > +static int vblank_work_thread(void *data)
> > +{
> > + struct drm_vblank_crtc *vblank = data;
> > +
> > + while (!kthread_should_stop()) {
> > + struct drm_vblank_work *work, *next;
> > + LIST_HEAD(list);
> > + u64 count;
> > + int ret;
> > +
> > + spin_lock_irq(&vblank->dev->event_lock);
> > +
> > + ret = wait_event_interruptible_lock_irq(vblank->queue,
> > + kthread_should_stop()
> >...
2020 Apr 13
0
[PATCH 1/9] drm/vblank: Add vblank works
...> > > > }
> > > >
> > > > +static int vblank_work_thread(void *data)
> > > > +{
> > > > + struct drm_vblank_crtc *vblank = data;
> > > > +
> > > > + while (!kthread_should_stop()) {
> > > > + struct drm_vblank_work *work, *next;
> > > > + LIST_HEAD(list);
> > > > + u64 count;
> > > > + int ret;
> > > > +
> > > > + spin_lock_irq(&vblank->dev->event_lock);
> > > > +
> > > > + ret = wait_event_interruptible_lock_ir...
2020 Jun 24
13
[RFC v7 00/11] drm/nouveau: Introduce CRC support for gf119+
...bject handles into header
drm/nouveau/kms/nvd9-: Add CRC support
Documentation/gpu/drm-kms.rst | 15 +
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/drm_vblank.c | 83 ++-
drivers/gpu/drm/drm_vblank_internal.h | 19 +
drivers/gpu/drm/drm_vblank_work.c | 259 +++++++
drivers/gpu/drm/drm_vblank_work_internal.h | 24 +
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +-
drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 +
drivers/gpu/drm/nouveau/dispnv50/atom.h | 21 +
drivers/gpu/drm/nouveau/dispnv50/core.h | 4 +
driver...
2020 Jun 27
9
[RFC v8 0/9] drm/nouveau: Introduce CRC support for gf119+
...object handles into header
drm/nouveau/kms/nvd9-: Add CRC support
Documentation/gpu/drm-kms.rst | 15 +
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/drm_internal.h | 27 +
drivers/gpu/drm/drm_vblank.c | 72 +-
drivers/gpu/drm/drm_vblank_work.c | 267 ++++++++
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +-
drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 +
drivers/gpu/drm/nouveau/dispnv50/atom.h | 21 +
drivers/gpu/drm/nouveau/dispnv50/core.h | 4 +
drivers/gpu/drm/nouveau/dispnv50/core907d.c | 3 +
drive...
2020 Jun 22
13
[RFC v5 00/10] 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
2020 Mar 18
12
[PATCH 0/9] 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 that we'll be sending in just a short bit.
This additionally adds a feature that Ville Syrj?l? came up with: vblank
works. Basically, this is just a generic DRM
2020 May 08
16
[RFC v4 00/12] 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
2020 Jun 22
0
[RFC v5 10/10] drm/nouveau/kms/nvd9-: Add CRC support
...ct nv50_disp *disp = nv50_disp(head->base.base.dev);
+ struct nv50_core *core = disp->core;
+ u32 interlock[NV50_DISP_INTERLOCK__SIZE] = { 0 };
+
+ core->func->crc->set_ctx(head, ctx);
+ core->func->update(core, interlock, false);
+}
+
+static void nv50_crc_ctx_flip_work(struct drm_vblank_work *work)
+{
+ struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work);
+ struct nv50_head *head = container_of(crc, struct nv50_head, crc);
+ struct drm_crtc *crtc = &head->base.base;
+ struct nv50_disp *disp = nv50_disp(crtc->dev);
+ u8 new_idx = crc->ctx_idx ^ 1;
+
+ /*
+...
2020 Mar 18
0
[PATCH 9/9] drm/nouveau/kms/nvd9-: Add CRC support
...ct nv50_disp *disp = nv50_disp(head->base.base.dev);
+ struct nv50_core *core = disp->core;
+ u32 interlock[NV50_DISP_INTERLOCK__SIZE] = { 0 };
+
+ core->func->crc->set_ctx(head, ctx);
+ core->func->update(core, interlock, false);
+}
+
+static void nv50_crc_ctx_flip_work(struct drm_vblank_work *work, u64 count)
+{
+ struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work);
+ struct nv50_head *head = container_of(crc, struct nv50_head, crc);
+ struct drm_crtc *crtc = &head->base.base;
+ struct nv50_disp *disp = nv50_disp(crtc->dev);
+ u8 new_idx = crc->ctx_idx ^...
2020 Apr 17
0
[RFC v3 11/11] drm/nouveau/kms/nvd9-: Add CRC support
...ad->base.base.dev);
+ struct nv50_core *core = disp->core;
+ u32 interlock[NV50_DISP_INTERLOCK__SIZE] = { 0 };
+
+ core->func->crc->set_ctx(head, ctx);
+ core->func->update(core, interlock, false);
+}
+
+static void nv50_crc_ctx_flip_work(struct kthread_work *kwork)
+{
+ struct drm_vblank_work *work = to_drm_vblank_work(kwork);
+ struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work);
+ struct nv50_head *head = container_of(crc, struct nv50_head, crc);
+ struct drm_crtc *crtc = &head->base.base;
+ struct nv50_disp *disp = nv50_disp(crtc->dev);
+ u8 new_idx = crc-...
2020 May 08
0
[RFC v4 12/12] drm/nouveau/kms/nvd9-: Add CRC support
...ad->base.base.dev);
+ struct nv50_core *core = disp->core;
+ u32 interlock[NV50_DISP_INTERLOCK__SIZE] = { 0 };
+
+ core->func->crc->set_ctx(head, ctx);
+ core->func->update(core, interlock, false);
+}
+
+static void nv50_crc_ctx_flip_work(struct kthread_work *kwork)
+{
+ struct drm_vblank_work *work = to_drm_vblank_work(kwork);
+ struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work);
+ struct nv50_head *head = container_of(crc, struct nv50_head, crc);
+ struct drm_crtc *crtc = &head->base.base;
+ struct nv50_disp *disp = nv50_disp(crtc->dev);
+ u8 new_idx = crc-...
2023 Jul 12
8
[PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev
...drivers/gpu/drm/drm_mipi_dbi.c | 4 +-
drivers/gpu/drm/drm_plane.c | 2 +-
drivers/gpu/drm/drm_plane_helper.c | 2 +-
drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
drivers/gpu/drm/drm_vblank.c | 40 ++---
drivers/gpu/drm/drm_vblank_work.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 +-
drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 16 +-
drivers/gpu/drm/gma500/cdv_intel_display.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2...
2023 Jul 12
8
[PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev
...drivers/gpu/drm/drm_mipi_dbi.c | 4 +-
drivers/gpu/drm/drm_plane.c | 2 +-
drivers/gpu/drm/drm_plane_helper.c | 2 +-
drivers/gpu/drm/drm_self_refresh_helper.c | 2 +-
drivers/gpu/drm/drm_vblank.c | 40 ++---
drivers/gpu/drm/drm_vblank_work.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 +-
drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 16 +-
drivers/gpu/drm/gma500/cdv_intel_display.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2...
2020 Apr 17
9
[RFC v3 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 that we'll be sending in just a short bit.
This additionally adds a feature that Ville Syrj?l? came up with: vblank
works. Basically, this is just a generic DRM