Re: [PATCH 5/6] drm/msm/dpu: remove struct dpu_encoder_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Dmitry Baryshkov (2022-02-01 07:10:55)
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> index ff2218155b44..803fd6f25da1 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> @@ -231,7 +216,7 @@ struct dpu_encoder_phys {
>         atomic_t pending_ctlstart_cnt;
>         atomic_t pending_kickoff_cnt;
>         wait_queue_head_t pending_kickoff_wq;
> -       struct dpu_encoder_irq irq[INTR_IDX_MAX];
> +       int irq[INTR_IDX_MAX];
>  };
>
>  static inline int dpu_encoder_phys_inc_pending(struct dpu_encoder_phys *phys)
> @@ -729,20 +727,8 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
>         phys_enc->split_role = p->split_role;
>         phys_enc->intf_mode = INTF_MODE_VIDEO;
>         phys_enc->enc_spinlock = p->enc_spinlock;
> -       for (i = 0; i < INTR_IDX_MAX; i++) {
> -               irq = &phys_enc->irq[i];
> -               irq->irq_idx = -EINVAL;
> -       }
> -
> -       irq = &phys_enc->irq[INTR_IDX_VSYNC];
> -       irq->name = "vsync_irq";
> -       irq->intr_idx = INTR_IDX_VSYNC;
> -       irq->func = dpu_encoder_phys_vid_vblank_irq;
> -
> -       irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
> -       irq->name = "underrun";
> -       irq->intr_idx = INTR_IDX_UNDERRUN;
> -       irq->func = dpu_encoder_phys_vid_underrun_irq;
> +       for (i = 0; i < INTR_IDX_MAX; i++)

Can this use ARRAY_SIZE(phys_enc->irq)? Safer that way.

> +               phys_enc->irq[i] = -EINVAL;
>
>         atomic_set(&phys_enc->vblank_refcount, 0);
>         atomic_set(&phys_enc->pending_kickoff_cnt, 0);



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux