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/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 6de2ce53..92c5a71 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -3370,7 +3370,7 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event) - drm_send_vblank_event(adev->ddev, crtc_id, works->event); + drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index e9ccc6b..2f784f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -3366,7 +3366,7 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if(works->event) - drm_send_vblank_event(adev->ddev, crtc_id, works->event); + drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index e56b55d..9155e3b 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -3379,7 +3379,7 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event) - drm_send_vblank_event(adev->ddev, crtc_id, works->event); + drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
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/armada/armada_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index 0293eb7..b8c8cb6 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c @@ -260,7 +260,7 @@ static void armada_drm_crtc_complete_frame_work(struct armada_crtc *dcrtc,
if (fwork->event) { spin_lock_irqsave(&dev->event_lock, flags); - drm_send_vblank_event(dev, dcrtc->num, fwork->event); + drm_crtc_send_vblank_event(&dcrtc->crtc, fwork->event); spin_unlock_irqrestore(&dev->event_lock, flags); }
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/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 58c4f78..a299a71 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -279,7 +279,7 @@ static void atmel_hlcdc_crtc_finish_page_flip(struct atmel_hlcdc_crtc *crtc)
spin_lock_irqsave(&dev->event_lock, flags); if (crtc->event) { - drm_send_vblank_event(dev, crtc->id, crtc->event); + drm_crtc_send_vblank_event(&crtc->base, crtc->event); drm_vblank_put(dev, crtc->id); crtc->event = NULL; }
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/i915/intel_display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 29aa64b..181ee3c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3802,9 +3802,7 @@ static void page_flip_completed(struct intel_crtc *intel_crtc) intel_crtc->unpin_work = NULL;
if (work->event) - drm_send_vblank_event(intel_crtc->base.dev, - intel_crtc->pipe, - work->event); + drm_crtc_send_vblank_event(&intel_crtc->base, work->event);
drm_crtc_vblank_put(&intel_crtc->base);
@@ -11699,7 +11697,7 @@ retry:
if (ret == 0 && event) { spin_lock_irq(&dev->event_lock); - drm_send_vblank_event(dev, pipe, event); + drm_crtc_send_vblank_event(crtc, event); spin_unlock_irq(&dev->event_lock); } }
On Thu, Apr 14, 2016 at 10:48:15AM -0700, 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
Applied to drm-intel.git, thanks. -Daniel
drivers/gpu/drm/i915/intel_display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 29aa64b..181ee3c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3802,9 +3802,7 @@ static void page_flip_completed(struct intel_crtc *intel_crtc) intel_crtc->unpin_work = NULL;
if (work->event)
drm_send_vblank_event(intel_crtc->base.dev,
intel_crtc->pipe,
work->event);
drm_crtc_send_vblank_event(&intel_crtc->base, work->event);
drm_crtc_vblank_put(&intel_crtc->base);
@@ -11699,7 +11697,7 @@ retry:
if (ret == 0 && event) { spin_lock_irq(&dev->event_lock);
drm_send_vblank_event(dev, pipe, event);
} }drm_crtc_send_vblank_event(crtc, event); spin_unlock_irq(&dev->event_lock);
-- 2.5.5
Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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/msm/mdp/mdp4/mdp4_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index e233acf..3a48889 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -121,7 +121,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp4_crtc->event = NULL; DBG("%s: send event: %p", mdp4_crtc->name, event); - drm_send_vblank_event(dev, mdp4_crtc->id, event); + drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags); diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index 9673b95..ce779d9 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -149,7 +149,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp5_crtc->event = NULL; DBG("%s: send event: %p", mdp5_crtc->name, event); - drm_send_vblank_event(dev, mdp5_crtc->id, event); + drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags);
On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan gustavo@padovan.org 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
thanks, shall I take this via msm-next for 4.7, I assume? Looks like no dependency on drm-core patches that haven't already landed?
Reviewed-by: Rob Clark robdclark@gmail.com
drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index e233acf..3a48889 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -121,7 +121,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp4_crtc->event = NULL; DBG("%s: send event: %p", mdp4_crtc->name, event);
drm_send_vblank_event(dev, mdp4_crtc->id, event);
drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags);
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index 9673b95..ce779d9 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -149,7 +149,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp5_crtc->event = NULL; DBG("%s: send event: %p", mdp5_crtc->name, event);
drm_send_vblank_event(dev, mdp5_crtc->id, event);
drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags);
-- 2.5.5
Hi Rob,
2016-04-14 Rob Clark robdclark@gmail.com:
On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan gustavo@padovan.org 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
thanks, shall I take this via msm-next for 4.7, I assume? Looks like no dependency on drm-core patches that haven't already landed?
I'd say you could take it, Otherwise we will have to wait everyone's ack to get this through drm-next I think.
Gustavo
On Tue, Apr 19, 2016 at 11:02:50AM -0300, Gustavo Padovan wrote:
Hi Rob,
2016-04-14 Rob Clark robdclark@gmail.com:
On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan gustavo@padovan.org 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
thanks, shall I take this via msm-next for 4.7, I assume? Looks like no dependency on drm-core patches that haven't already landed?
I'd say you could take it, Otherwise we will have to wait everyone's ack to get this through drm-next I think.
I'll probably mass-apply the leftovers to drm-misc in 2-3 weeks latest. Fastest way to get stuff like this in, and if driver maintainers don't pipe up by then ... their problem imo ;-) -Daniel
On Thu, Apr 14, 2016 at 04:51:06PM -0400, Rob Clark wrote:
On Thu, Apr 14, 2016 at 1:48 PM, Gustavo Padovan gustavo@padovan.org 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
thanks, shall I take this via msm-next for 4.7, I assume? Looks like no dependency on drm-core patches that haven't already landed?
Reviewed-by: Rob Clark robdclark@gmail.com
Applied to drm-misc, thanks. -Daniel
drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index e233acf..3a48889 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -121,7 +121,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp4_crtc->event = NULL; DBG("%s: send event: %p", mdp4_crtc->name, event);
drm_send_vblank_event(dev, mdp4_crtc->id, event);
drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags);
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index 9673b95..ce779d9 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -149,7 +149,7 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) if (!file || (event->base.file_priv == file)) { mdp5_crtc->event = NULL; DBG("%s: send event: %p", mdp5_crtc->name, event);
drm_send_vblank_event(dev, mdp5_crtc->id, event);
drm_crtc_send_vblank_event(crtc, event); } } spin_unlock_irqrestore(&dev->event_lock, flags);
-- 2.5.5
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/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 43e5f50..75cba59 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -256,7 +256,7 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
if (event) { spin_lock_irqsave(&dev->event_lock, flags); - drm_send_vblank_event(dev, qcrtc->index, event); + drm_crtc_send_vblank_event(crtc, event); spin_unlock_irqrestore(&dev->event_lock, flags); } drm_vblank_put(dev, qcrtc->index);
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); if (s->event) { + struct drm_crtc *crtc = drm_crtc_find(dev, s->crtc); + 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);
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);
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
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/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index fcc7483..d596c83 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -377,7 +377,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id)
/* wakeup userspace */ if (work->event) - drm_send_vblank_event(rdev->ddev, crtc_id, work->event); + drm_crtc_send_vblank_event(&radeon_crtc->base, work->event);
spin_unlock_irqrestore(&rdev->ddev->event_lock, flags);
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/rcar-du/rcar_du_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index d9f06cc..0d8bdda 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -314,7 +314,7 @@ static void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc) return;
spin_lock_irqsave(&dev->event_lock, flags); - drm_send_vblank_event(dev, rcrtc->index, event); + drm_crtc_send_vblank_event(&rcrtc->crtc, event); wake_up(&rcrtc->flip_wait); spin_unlock_irqrestore(&dev->event_lock, flags);
Hi Gustavo,
Thank you for the patch.
On Thursday 14 Apr 2016 10:48:20 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
Acked-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index d9f06cc..0d8bdda 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -314,7 +314,7 @@ static void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc) return;
spin_lock_irqsave(&dev->event_lock, flags);
- drm_send_vblank_event(dev, rcrtc->index, event);
- drm_crtc_send_vblank_event(&rcrtc->crtc, event); wake_up(&rcrtc->flip_wait); spin_unlock_irqrestore(&dev->event_lock, flags);
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/shmobile/shmob_drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 88643ab..1e154fc 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -440,7 +440,7 @@ void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) event = scrtc->event; scrtc->event = NULL; if (event) { - drm_send_vblank_event(dev, 0, event); + drm_crtc_send_vblank_event(&scrtc->crtc, event); drm_vblank_put(dev, 0); } spin_unlock_irqrestore(&dev->event_lock, flags);
Hi Gustavo,
Thank you for the patch.
On Thursday 14 Apr 2016 10:48:21 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
Acked-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 88643ab..1e154fc 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -440,7 +440,7 @@ void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) event = scrtc->event; scrtc->event = NULL; if (event) {
drm_send_vblank_event(dev, 0, event);
drm_vblank_put(dev, 0); } spin_unlock_irqrestore(&dev->event_lock, flags);drm_crtc_send_vblank_event(&scrtc->crtc, event);
On Fri, Apr 15, 2016 at 12:59:26AM +0300, Laurent Pinchart wrote:
Hi Gustavo,
Thank you for the patch.
On Thursday 14 Apr 2016 10:48:21 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
Acked-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
Both patches you acked applied to drm-misc, thanks. -Daniel
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 88643ab..1e154fc 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -440,7 +440,7 @@ void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) event = scrtc->event; scrtc->event = NULL; if (event) {
drm_send_vblank_event(dev, 0, event);
drm_vblank_put(dev, 0); } spin_unlock_irqrestore(&dev->event_lock, flags);drm_crtc_send_vblank_event(&scrtc->crtc, event);
-- Regards,
Laurent Pinchart
dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
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/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 051e5e1..79027b1 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -707,7 +707,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) event = tilcdc_crtc->event; tilcdc_crtc->event = NULL; if (event) - drm_send_vblank_event(dev, 0, event); + drm_crtc_send_vblank_event(crtc, event);
spin_unlock_irqrestore(&dev->event_lock, flags); }
On 04/14/16 20:48, 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
Reviewed-by: Jyri Sarha jsarha@ti.com Tested-by: Jyri Sarha jsarha@ti.com
Thanks! Do you prefer me to pick this one to my next pull request?
Best regards, Jyri
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 051e5e1..79027b1 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -707,7 +707,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) event = tilcdc_crtc->event; tilcdc_crtc->event = NULL; if (event)
drm_send_vblank_event(dev, 0, event);
drm_crtc_send_vblank_event(crtc, event); spin_unlock_irqrestore(&dev->event_lock, flags);
}
Hi Jyri,
2016-04-19 Jyri Sarha jsarha@ti.com:
On 04/14/16 20:48, 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
Reviewed-by: Jyri Sarha jsarha@ti.com Tested-by: Jyri Sarha jsarha@ti.com
Thanks! Do you prefer me to pick this one to my next pull request?
Yes, please pick it.
Gustavo
On Tue, Apr 19, 2016 at 11:03:26AM -0300, Gustavo Padovan wrote:
Hi Jyri,
2016-04-19 Jyri Sarha jsarha@ti.com:
On 04/14/16 20:48, 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
Reviewed-by: Jyri Sarha jsarha@ti.com Tested-by: Jyri Sarha jsarha@ti.com
Thanks! Do you prefer me to pick this one to my next pull request?
Yes, please pick it.
I didn't see a confirmation, so smashed it into drm-misc.
Thanks, Daniel
On 05/02/16 18:05, Daniel Vetter wrote:
On Tue, Apr 19, 2016 at 11:03:26AM -0300, Gustavo Padovan wrote:
Hi Jyri,
2016-04-19 Jyri Sarha jsarha@ti.com:
On 04/14/16 20:48, 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
Reviewed-by: Jyri Sarha jsarha@ti.com Tested-by: Jyri Sarha jsarha@ti.com
Thanks! Do you prefer me to pick this one to my next pull request?
Yes, please pick it.
I didn't see a confirmation, so smashed it into drm-misc.
Thanks, Daniel
Ok, thanks. My tilcdc atomic modeset patches are kind stalled and without them I do not have too anything else put in the a pull req anyway. I'll drop the patch from my branch.
BR, Jyri
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/udl/udl_modeset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index b87afee..f92ea95 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -376,7 +376,7 @@ static int udl_crtc_page_flip(struct drm_crtc *crtc,
spin_lock_irqsave(&dev->event_lock, flags); if (event) - drm_send_vblank_event(dev, 0, event); + drm_crtc_send_vblank_event(crtc, event); spin_unlock_irqrestore(&dev->event_lock, flags); crtc->primary->fb = fb;
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/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 4854dac..66be450 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -163,7 +163,7 @@ static int virtio_gpu_page_flip(struct drm_crtc *crtc,
if (event) { spin_lock_irqsave(&crtc->dev->event_lock, irqflags); - drm_send_vblank_event(crtc->dev, -1, event); + drm_crtc_send_vblank_event(crtc, event); spin_unlock_irqrestore(&crtc->dev->event_lock, irqflags); }
From: Gustavo Padovan gustavo.padovan@collabora.co.uk
We don't have any user of this function anymore, let's remove it.
Signed-off-by: Gustavo Padovan gustavo.padovan@collabora.co.uk --- drivers/gpu/drm/drm_irq.c | 31 ++++++------------------------- include/drm/drmP.h | 2 -- 2 files changed, 6 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 3c1a6f1..c0205ed 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1100,21 +1100,19 @@ void drm_crtc_arm_vblank_event(struct drm_crtc *crtc, EXPORT_SYMBOL(drm_crtc_arm_vblank_event);
/** - * drm_send_vblank_event - helper to send vblank event after pageflip - * @dev: DRM device - * @pipe: CRTC index + * drm_crtc_send_vblank_event - helper to send vblank event after pageflip + * @crtc: the source CRTC of the vblank event * @e: the event to send * * Updates sequence # and timestamp on event, and sends it to userspace. * Caller must hold event lock. - * - * This is the legacy version of drm_crtc_send_vblank_event(). */ -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) { + struct drm_device *dev = crtc->dev; + unsigned int seq, pipe = drm_crtc_index(crtc); struct timeval now; - unsigned int seq;
if (dev->num_crtcs > 0) { seq = drm_vblank_count_and_time(dev, pipe, &now); @@ -1126,23 +1124,6 @@ void drm_send_vblank_event(struct drm_device *dev, unsigned int pipe, e->pipe = pipe; send_vblank_event(dev, e, seq, &now); } -EXPORT_SYMBOL(drm_send_vblank_event); - -/** - * drm_crtc_send_vblank_event - helper to send vblank event after pageflip - * @crtc: the source CRTC of the vblank event - * @e: the event to send - * - * Updates sequence # and timestamp on event, and sends it to userspace. - * Caller must hold event lock. - * - * This is the native KMS version of drm_send_vblank_event(). - */ -void drm_crtc_send_vblank_event(struct drm_crtc *crtc, - struct drm_pending_vblank_event *e) -{ - drm_send_vblank_event(crtc->dev, drm_crtc_index(crtc), e); -} EXPORT_SYMBOL(drm_crtc_send_vblank_event);
/** diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 3c8422c..d0e1332 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -970,8 +970,6 @@ extern u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pipe, struct timeval *vblanktime); extern u32 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, struct timeval *vblanktime); -extern void drm_send_vblank_event(struct drm_device *dev, unsigned int pipe, - struct drm_pending_vblank_event *e); extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, struct drm_pending_vblank_event *e); extern void drm_arm_vblank_event(struct drm_device *dev, unsigned int pipe,
On 15.04.2016 02:48, 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/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 6de2ce53..92c5a71 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -3370,7 +3370,7 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index e9ccc6b..2f784f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -3366,7 +3366,7 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if(works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index e56b55d..9155e3b 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -3379,7 +3379,7 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
This patch and patch 8 are
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
On Fri, Apr 15, 2016 at 11:55:16AM +0900, Michel Dänzer wrote:
On 15.04.2016 02:48, 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/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 6de2ce53..92c5a71 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -3370,7 +3370,7 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index e9ccc6b..2f784f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -3366,7 +3366,7 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if(works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index e56b55d..9155e3b 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -3379,7 +3379,7 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
/* wakeup usersapce */ if (works->event)
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
This patch and patch 8 are
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
Both applied to drm-misc. -Daniel
dri-devel@lists.freedesktop.org