diff mbox

[DPU,05/11] drm/msm: Mark the crtc->state->event consumed

Message ID 20180228191906.185417-6-seanpaul@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Paul Feb. 28, 2018, 7:19 p.m. UTC
Don't leave the event != NULL once it's consumed, this is used a signal
to the atomic helpers that the event will be handled by the driver.

Change-Id: Ib934fb2e97bacbb4a1f9c780cc7369c2bb98ed50
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  | 2 ++
 drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 +
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 +
 3 files changed, 4 insertions(+)

Comments

Jeykumar Sankaran March 6, 2018, 1:53 a.m. UTC | #1
On 2018-02-28 11:19, Sean Paul wrote:
> Don't leave the event != NULL once it's consumed, this is used a signal
> to the atomic helpers that the event will be handled by the driver.
> 
> Change-Id: Ib934fb2e97bacbb4a1f9c780cc7369c2bb98ed50
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  | 2 ++
>  drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 +
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 94fab2dcca5b..a261021e5deb 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -2714,6 +2714,7 @@ static void dpu_crtc_atomic_begin(struct drm_crtc
> *crtc,
>  	} else {
>  		spin_lock_irqsave(&dev->event_lock, flags);
>  		dpu_crtc->event = crtc->state->event;
> +		crtc->state->event = NULL;
>  		spin_unlock_irqrestore(&dev->event_lock, flags);
>  	}
> 
> @@ -2798,6 +2799,7 @@ static void dpu_crtc_atomic_flush(struct drm_crtc
> *crtc,
>  	} else {
>  		spin_lock_irqsave(&dev->event_lock, flags);
>  		dpu_crtc->event = crtc->state->event;
> +		crtc->state->event = NULL;
>  		spin_unlock_irqrestore(&dev->event_lock, flags);
>  	}
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> index 6e5e1aa54ce1..b001699297c4 100644
> --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> @@ -351,6 +351,7 @@ static void mdp4_crtc_atomic_flush(struct drm_crtc
> *crtc,
> 
>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	mdp4_crtc->event = crtc->state->event;
> +	crtc->state->event = NULL;
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
> 
>  	blend_setup(crtc);
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> index 8c5ed0b59e46..5cb490a58f20 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> @@ -704,6 +704,7 @@ static void mdp5_crtc_atomic_flush(struct drm_crtc
> *crtc,
> 
>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	mdp5_crtc->event = crtc->state->event;
> +	crtc->state->event = NULL;
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
> 
>  	/*
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 94fab2dcca5b..a261021e5deb 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -2714,6 +2714,7 @@  static void dpu_crtc_atomic_begin(struct drm_crtc *crtc,
 	} else {
 		spin_lock_irqsave(&dev->event_lock, flags);
 		dpu_crtc->event = crtc->state->event;
+		crtc->state->event = NULL;
 		spin_unlock_irqrestore(&dev->event_lock, flags);
 	}
 
@@ -2798,6 +2799,7 @@  static void dpu_crtc_atomic_flush(struct drm_crtc *crtc,
 	} else {
 		spin_lock_irqsave(&dev->event_lock, flags);
 		dpu_crtc->event = crtc->state->event;
+		crtc->state->event = NULL;
 		spin_unlock_irqrestore(&dev->event_lock, flags);
 	}
 
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
index 6e5e1aa54ce1..b001699297c4 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
@@ -351,6 +351,7 @@  static void mdp4_crtc_atomic_flush(struct drm_crtc *crtc,
 
 	spin_lock_irqsave(&dev->event_lock, flags);
 	mdp4_crtc->event = crtc->state->event;
+	crtc->state->event = NULL;
 	spin_unlock_irqrestore(&dev->event_lock, flags);
 
 	blend_setup(crtc);
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
index 8c5ed0b59e46..5cb490a58f20 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
@@ -704,6 +704,7 @@  static void mdp5_crtc_atomic_flush(struct drm_crtc *crtc,
 
 	spin_lock_irqsave(&dev->event_lock, flags);
 	mdp5_crtc->event = crtc->state->event;
+	crtc->state->event = NULL;
 	spin_unlock_irqrestore(&dev->event_lock, flags);
 
 	/*