drm/xe/irq: Add helpers to find ISR/IIR/IMR/IER registers
authorMatt Roper <matthew.d.roper@intel.com>
Sat, 1 Apr 2023 00:21:00 +0000 (17:21 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:31:30 +0000 (18:31 -0500)
commit9293b67de6602bcf0415da0f3ae3dbf98396183c
tree51ccfeebbcaf98cd01ce8c4d112a77fe32952b58
parent06d06064f725c207a4d14b7410f5498d68c1fb86
drm/xe/irq: Add helpers to find ISR/IIR/IMR/IER registers

For cases where IRQ_INIT and IRQ_RESET are used, the relevant interrupt
registers are always consecutive and ordered ISR, IMR, IIR, IER.  Adding
helpers to look these up from a base offset will let us eliminate some
of the CPP pasting and simplify other upcoming patches.

v2:
 - s/_REGS/_OFFSET/ for consistency.  (Lucas)
 - Move IMR/IIR/IER helpers into xe_irq.c; they aren't needed anywhere
   else.  (Lucas)

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230401002106.588656-3-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/regs/xe_regs.h
drivers/gpu/drm/xe/xe_irq.c