Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386053 > unrolled thread
| Started by | Mario Kleiner <mario.kleiner.de@gmail.com> |
|---|---|
| First post | 2016-04-25 09:10 +0200 |
| Last post | 2016-04-25 22:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 07/14] drm/nouveau: use drm_crtc_send_vblank_event() Mario Kleiner <mario.kleiner.de@gmail.com> - 2016-04-25 09:10 +0200
Re: [PATCH 07/14] drm/nouveau: use drm_crtc_send_vblank_event() Gustavo Padovan <gustavo.padovan@collabora.co.uk> - 2016-04-25 22:10 +0200
| From | Mario Kleiner <mario.kleiner.de@gmail.com> |
|---|---|
| Date | 2016-04-25 09:10 +0200 |
| Subject | Re: [PATCH 07/14] drm/nouveau: use drm_crtc_send_vblank_event() |
| Message-ID | <rrIOB-1Du-1@gated-at.bofh.it> |
On 04/14/2016 07:48 PM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> Replace the legacy drm_send_vblank_event() with the new helper function.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index 7ce7fa5..973c2d9 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -841,10 +841,12 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
>
> s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
Hi Gustavo
> if (s->event) {
> + struct drm_crtc *crtc = drm_crtc_find(dev, s->crtc);
> +
I don't think this would work. s->crtc is a nouveau internal display
pipe index, not a drm mode object id, so i don't think drm_crtc_find()
will do what you need. Also it takes a mutex, which might_sleep() and i
think nouveau_finish_page_flip gets called from irq context and holds a
spin_lock_irqsave, so would end badly.
You'd probably have to extend struct nouveau_page_flip_state to carry
around a reference to the required drm_crtc, set up in
nouveau_crtc_page_flip().
-mario
> 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);
> + drm_crtc_send_vblank_event(crtc, s->event);
>
> /* Give up ownership of vblank for page-flipped crtc */
> drm_vblank_put(dev, s->crtc);
>
[toc] | [next] | [standalone]
| From | Gustavo Padovan <gustavo.padovan@collabora.co.uk> |
|---|---|
| Date | 2016-04-25 22:10 +0200 |
| Message-ID | <rrUZu-3iQ-69@gated-at.bofh.it> |
| In reply to | #1386053 |
Hi Mario,
2016-04-25 Mario Kleiner <mario.kleiner.de@gmail.com>:
> On 04/14/2016 07:48 PM, Gustavo Padovan wrote:
> >From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >
> >Replace the legacy drm_send_vblank_event() with the new helper function.
> >
> >Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >---
> > drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> >index 7ce7fa5..973c2d9 100644
> >--- a/drivers/gpu/drm/nouveau/nouveau_display.c
> >+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> >@@ -841,10 +841,12 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
> >
> > s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
>
> Hi Gustavo
>
> > if (s->event) {
> >+ struct drm_crtc *crtc = drm_crtc_find(dev, s->crtc);
> >+
>
> I don't think this would work. s->crtc is a nouveau internal display pipe
> index, not a drm mode object id, so i don't think drm_crtc_find() will do
> what you need. Also it takes a mutex, which might_sleep() and i think
> nouveau_finish_page_flip gets called from irq context and holds a
> spin_lock_irqsave, so would end badly.
You are right. I didn't pay attention that the id wasn't a object id.
>
> You'd probably have to extend struct nouveau_page_flip_state to carry around
> a reference to the required drm_crtc, set up in nouveau_crtc_page_flip().
Yeah, that may be a good solution.
Gustavo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web