diff mbox series

[v2,2/3] drm/msm/mdp5: convert to drm_crtc_handle_vblank()

Message ID 20220507170922.1723712-2-dmitry.baryshkov@linaro.org
State Superseded
Headers show
Series [v2,1/3] drm/msm/mdp4: convert to drm_crtc_handle_vblank() | expand

Commit Message

Dmitry Baryshkov May 7, 2022, 5:09 p.m. UTC
Stop using deprecated drm_handle_vblank(), use drm_crtc_handle_vblank()
instead.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Abhinav Kumar June 16, 2022, 8:21 p.m. UTC | #1
On 5/7/2022 10:09 AM, Dmitry Baryshkov wrote:
> Stop using deprecated drm_handle_vblank(), use drm_crtc_handle_vblank()
> instead.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
> index 9b4c8d92ff32..43443a435d59 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
> @@ -82,8 +82,7 @@ irqreturn_t mdp5_irq(struct msm_kms *kms)
>   	struct mdp_kms *mdp_kms = to_mdp_kms(kms);
>   	struct mdp5_kms *mdp5_kms = to_mdp5_kms(mdp_kms);
>   	struct drm_device *dev = mdp5_kms->dev;
> -	struct msm_drm_private *priv = dev->dev_private;
> -	unsigned int id;
> +	struct drm_crtc *crtc;
>   	uint32_t status, enable;
>   
>   	enable = mdp5_read(mdp5_kms, REG_MDP5_INTR_EN);
> @@ -94,9 +93,9 @@ irqreturn_t mdp5_irq(struct msm_kms *kms)
>   
>   	mdp_dispatch_irqs(mdp_kms, status);
>   
> -	for (id = 0; id < priv->num_crtcs; id++)
> -		if (status & mdp5_crtc_vblank(priv->crtcs[id]))
> -			drm_handle_vblank(dev, id);
> +	drm_for_each_crtc(crtc, dev)
> +		if (status & mdp5_crtc_vblank(crtc))
> +			drm_crtc_handle_vblank(crtc);
>   
>   	return IRQ_HANDLED;
>   }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
index 9b4c8d92ff32..43443a435d59 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
@@ -82,8 +82,7 @@  irqreturn_t mdp5_irq(struct msm_kms *kms)
 	struct mdp_kms *mdp_kms = to_mdp_kms(kms);
 	struct mdp5_kms *mdp5_kms = to_mdp5_kms(mdp_kms);
 	struct drm_device *dev = mdp5_kms->dev;
-	struct msm_drm_private *priv = dev->dev_private;
-	unsigned int id;
+	struct drm_crtc *crtc;
 	uint32_t status, enable;
 
 	enable = mdp5_read(mdp5_kms, REG_MDP5_INTR_EN);
@@ -94,9 +93,9 @@  irqreturn_t mdp5_irq(struct msm_kms *kms)
 
 	mdp_dispatch_irqs(mdp_kms, status);
 
-	for (id = 0; id < priv->num_crtcs; id++)
-		if (status & mdp5_crtc_vblank(priv->crtcs[id]))
-			drm_handle_vblank(dev, id);
+	drm_for_each_crtc(crtc, dev)
+		if (status & mdp5_crtc_vblank(crtc))
+			drm_crtc_handle_vblank(crtc);
 
 	return IRQ_HANDLED;
 }