Re: [PATCH v2 3/4] drm/msm/dpu: add helper to get IRQ-related data

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

 



On 2023-07-27 22:51:32, Dmitry Baryshkov wrote:
> On 27/07/2023 22:41, Marijn Suijten wrote:
> > On 2023-07-27 22:34:59, Dmitry Baryshkov wrote:
> >> On 27/07/2023 22:29, Marijn Suijten wrote:
> >>> On 2023-07-27 18:04:54, Dmitry Baryshkov wrote:
> >>>> In preparation to reworking the IRQ indices, move irq_tbl access to
> >>>> separate helper.
> >>>
> >>> I am not seeing the advantage of the helper, but making every function
> >>> look up dpu_kms->hw_intr->irq_tbl[irq_idx] only once and storing that in
> >>> a local dpu_hw_intr_entry pointer is much tidier.
> >>
> >> There was a bonus point when I tried to do a irq_idx-1 in the next
> >> patch. But since that code has gone, maybe I can drop this patch too.
> > 
> > Don't drop the whole patch though.  While maybe not necessary, having
> > the lookup only once is much easier to follow.
> 
> Then it's easier to keep it as is.

While reviewing patch 4/4 though, the -1 might be missing after all.
You still allocate "nirq = total_irqs" spots in the table, but then
allow any number 0 < irq_idx <= total_irqs.  Indexing irq_idx ==
total_irqs would be out of bounds?

- Marijn

<snip>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux