On 2023-07-29 02:31:59, Dmitry Baryshkov wrote: > In preparation to reworking IRQ indcies, stop using raw indices in > kernel output (both printk and debugfs). Instead use a pair of register > index and bit. This corresponds closer to the values in HW catalog. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> > --- > .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 49 ++++++++++++------- > 1 file changed, 31 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > index 308b122059cd..6071d3f05b0c 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > @@ -199,6 +199,7 @@ static const struct dpu_intr_reg dpu_intr_set_7xxx[] = { > > #define DPU_IRQ_REG(irq_idx) (irq_idx / 32) > #define DPU_IRQ_MASK(irq_idx) (BIT(irq_idx % 32)) > +#define DPU_IRQ_BIT(irq_idx) (ffs(DPU_IRQ_MASK(irq_idx)) - 1) Another nit: I'd find it clearer to define DPU_IRQ_MASK in terms of DPU_IRQ_BIT[_INDEX...] than the other way around, because this is just irq_idx%32. - Marijn