Displaying 20 results from an estimated 40 matches for "drm_crtc_index".
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...nish_page_flip(struct nouveau_channel *chan,
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
if (s->event) {
if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
- drm_arm_vblank_event(dev, s->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_ind...
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...nish_page_flip(struct nouveau_channel *chan,
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
if (s->event) {
if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
- drm_arm_vblank_event(dev, s->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_ind...
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...nish_page_flip(struct nouveau_channel *chan,
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
if (s->event) {
if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
- drm_arm_vblank_event(dev, s->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_ind...
2016 Jun 06
0
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...veau_channel *chan,
> s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
> if (s->event) {
> if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
> - drm_arm_vblank_event(dev, s->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);
&...
2017 Jul 12
1
[PATCH] drm/nouveau: honor return type of nvif_mthd, trivial
...index 8d1df5678eaa..f8f555e2e912 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -113,10 +113,11 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
int retry = 20;
bool ret = false;
+ int method_ret;
do {
- ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
- if (ret != 0)
+ int method_ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
+ if (method_ret != 0)
return false;
if (args.scan.v...
2020 Jan 15
1
[PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...lank_disable_immediate &&
+ disable_irq = (__vblank_disable_immediate(dev, pipe) &&
drm_vblank_offdelay > 0 &&
!atomic_read(&vblank->refcount));
@@ -1893,7 +1889,8 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,
pipe = drm_crtc_index(crtc);
vblank = &dev->vblank[pipe];
- vblank_enabled = dev->vblank_disable_immediate && READ_ONCE(vblank->enabled);
+ vblank_enabled = __vblank_disable_immediate(dev, pipe) &&
+ READ_ONCE(vblank->enabled);
if (!vblank_enabled) {
ret = drm_crtc_vblank_ge...
2018 Dec 10
2
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...e_config_cleanup(rdev->ddev);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index b45bec0b7a9c..85abd3fe9e83 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1149,8 +1149,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
return 1 << drm_crtc_index(crtc);
}
-int drm_crtc_force_disable_all(struct drm_device *dev);
-
int drm_mode_set_config_internal(struct drm_mode_set *set);
struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index d65f034843ce...
2018 Dec 11
1
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...m/drm_crtc.h b/include/drm/drm_crtc.h
> > index b45bec0b7a9c..85abd3fe9e83 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -1149,8 +1149,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
> > return 1 << drm_crtc_index(crtc);
> > }
> >
> > -int drm_crtc_force_disable_all(struct drm_device *dev);
> > -
> > int drm_mode_set_config_internal(struct drm_mode_set *set);
> > struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
> >
> > diff --git a/incl...
2017 Apr 23
0
[PATCH] drm/nouveau/kms: Increase max retries in scanout position queries.
...eau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -111,7 +111,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
};
struct nouveau_display *disp = nouveau_display(crtc->dev);
struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
- int ret, retry = 1;
+ int ret, retry = 20;
do {
ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
--
2.7.4
2016 Jun 07
0
[PATCH 01/10] drm/nouveau: replace legacy vblank helpers
...vif_notify *notify)
if (!nouveau_finish_page_flip(chan, &state)) {
if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
- nv_set_crtc_base(drm->dev, state.crtc, state.offset +
- state.y * state.pitch +
- state.x * state.bpp / 8);
+ nv_set_crtc_base(drm->dev, drm_crtc_index(state.crtc),
+ state.offset + state.crtc->y *
+ state.pitch + state.crtc->x *
+ state.bpp / 8);
}
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 24273ba..0420ee8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_disp...
2020 Jan 15
0
[Intel-gfx] [PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...mp;
> + disable_irq = (__vblank_disable_immediate(dev, pipe) &&
> drm_vblank_offdelay > 0 &&
> !atomic_read(&vblank->refcount));
>
> @@ -1893,7 +1889,8 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,
> pipe = drm_crtc_index(crtc);
>
> vblank = &dev->vblank[pipe];
> - vblank_enabled = dev->vblank_disable_immediate && READ_ONCE(vblank->enabled);
> + vblank_enabled = __vblank_disable_immediate(dev, pipe) &&
> + READ_ONCE(vblank->enabled);
>
> if (!vblank_ena...
2015 Oct 30
5
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...k reference for the
+ * event @e, which will be dropped when the next vblank arrives.
+ *
+ * This is the native KMS version of drm_send_vblank_event().
+ */
+void drm_crtc_arm_vblank_event(struct drm_crtc *crtc,
+ struct drm_pending_vblank_event *e)
+{
+ drm_arm_vblank_event(crtc->dev, drm_crtc_index(crtc), e);
+}
+EXPORT_SYMBOL(drm_crtc_arm_vblank_event);
+
+/**
* drm_send_vblank_event - helper to send vblank event after pageflip
* @dev: DRM device
* @pipe: CRTC index
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 184445d4abbf..04...
2018 Dec 10
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index b45bec0b7a9c..85abd3fe9e83 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -1149,8 +1149,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
> return 1 << drm_crtc_index(crtc);
> }
>
> -int drm_crtc_force_disable_all(struct drm_device *dev);
> -
> int drm_mode_set_config_internal(struct drm_mode_set *set);
> struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
>
> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/...
2018 Dec 17
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...e_config_cleanup(rdev->ddev);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index b45bec0b7a9c..85abd3fe9e83 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1149,8 +1149,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
return 1 << drm_crtc_index(crtc);
}
-int drm_crtc_force_disable_all(struct drm_device *dev);
-
int drm_mode_set_config_internal(struct drm_mode_set *set);
struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index d65f034843ce...
2020 Jun 24
0
[RFC v7 03/11] drm/vblank: Add vblank works
...;
-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 drm_vblank_crtc *vblank = &dev->vblank[pipe];
struct drm_pending_vblank_event *e, *t;
-
ktime_t now;
u64 seq;
if (drm_WARN_ON(dev, pipe >= dev->num_crtcs))
return;
+ /*
+ * Grab event_lock early to prevent vblank work from being scheduled
+ * while we...
2015 Nov 06
0
[PATCH] drm/nouveau: Fix pre-nv50 pageflip events
...hich will be dropped when the next vblank arrives.
> + *
> + * This is the native KMS version of drm_send_vblank_event().
> + */
> +void drm_crtc_arm_vblank_event(struct drm_crtc *crtc,
> + struct drm_pending_vblank_event *e)
> +{
> + drm_arm_vblank_event(crtc->dev, drm_crtc_index(crtc), e);
> +}
> +EXPORT_SYMBOL(drm_crtc_arm_vblank_event);
> +
> +/**
> * drm_send_vblank_event - helper to send vblank event after pageflip
> * @dev: DRM device
> * @pipe: CRTC index
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/...
2020 Mar 18
4
[PATCH 1/9] drm/vblank: Add vblank works
...tem for a specific crtc.
> + */
> +void drm_vblank_work_init(struct drm_vblank_work *work, struct drm_crtc *crtc,
> + void (*func)(struct drm_vblank_work *work, u64 count))
> +{
> + struct drm_device *dev = crtc->dev;
> + struct drm_vblank_crtc *vblank = &dev->vblank[drm_crtc_index(crtc)];
> +
> + work->vblank = vblank;
> + work->state = DRM_VBL_WORK_IDLE;
> + work->func = func;
> + INIT_LIST_HEAD(&work->list);
> +}
> +EXPORT_SYMBOL(drm_vblank_work_init);
> +
> /**
> * drm_vblank_init - initialize vblank support
> * @dev:...
2020 May 08
0
[RFC v4 04/12] drm/vblank: Add vblank works
...blank_work_init(struct drm_vblank_work *work, struct drm_crtc *crtc,
+ void (*func)(struct kthread_work *work))
+{
+ kthread_init_work(&work->base, func);
+ INIT_LIST_HEAD(&work->flush_work);
+ INIT_LIST_HEAD(&work->pending);
+ work->vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
+}
+EXPORT_SYMBOL(drm_vblank_work_init);
+
+static int vblank_worker_init(struct drm_vblank_crtc *vblank)
+{
+ struct sched_param param = {
+ .sched_priority = MAX_RT_PRIO - 1,
+ };
+
+ INIT_LIST_HEAD(&vblank->pending_work);
+ spin_lock_init(&vblank->work_lock);
+ vblank->...
2020 Mar 18
0
[PATCH 1/9] drm/vblank: Add vblank works
...+ * Initialize a vblank work item for a specific crtc.
+ */
+void drm_vblank_work_init(struct drm_vblank_work *work, struct drm_crtc *crtc,
+ void (*func)(struct drm_vblank_work *work, u64 count))
+{
+ struct drm_device *dev = crtc->dev;
+ struct drm_vblank_crtc *vblank = &dev->vblank[drm_crtc_index(crtc)];
+
+ work->vblank = vblank;
+ work->state = DRM_VBL_WORK_IDLE;
+ work->func = func;
+ INIT_LIST_HEAD(&work->list);
+}
+EXPORT_SYMBOL(drm_vblank_work_init);
+
/**
* drm_vblank_init - initialize vblank support
* @dev: DRM device
@@ -481,6 +589,8 @@ int drm_vblank_init(stru...
2020 Jun 22
0
[RFC v5 02/10] drm/vblank: Add vblank works
...nk_work *work, struct drm_crtc *crtc,
+ void (*func)(struct drm_vblank_work *work))
+{
+ kthread_init_work(&work->base, vblank_work_fn);
+ work->func = func;
+ INIT_LIST_HEAD(&work->node);
+ seqcount_init(&work->seqcount);
+ work->vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
+}
+EXPORT_SYMBOL(drm_vblank_work_init);
+
+static int vblank_worker_init(struct drm_vblank_crtc *vblank)
+{
+ struct sched_param param = {
+ .sched_priority = MAX_RT_PRIO - 1,
+ };
+ struct kthread_worker *worker;
+
+ INIT_LIST_HEAD(&vblank->pending_work);
+ spin_lock_init(&vbl...