summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_reg_sr_types.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-04-28 01:32:55 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:32:21 +0300
commit07fbd1f85df18a9a33556de76499fd3693639a7d (patch)
tree9481afea77781172c6c7c4050f0c7c7c53602512 /drivers/gpu/drm/xe/xe_reg_sr_types.h
parentca2acce76d81fda9520b8b797119deddbe660968 (diff)
downloadlinux-07fbd1f85df18a9a33556de76499fd3693639a7d.tar.xz
drm/xe: Plumb xe_reg into WAs, rtp, etc
Now that struct xe_reg and struct xe_reg_mcr are types that can be used by xe, convert more of the driver to use them. Some notes about the conversions: - The RTP tables don't need the MASKED flags anymore in the actions as that information now comes from the register definition - There is no need for the _XE_RTP_REG/_XE_RTP_REG_MCR macros and the register types on RTP infra: that comes from the register definitions. - When declaring the RTP entries, there is no need anymore to undef XE_REG and friends: the RTP macros deal with removing the cast where needed due to not being able to use a compound statement for initialization in the tables - The index in the reg-sr xarray is the register offset only. Otherwise we wouldn't catch mistakes about adding both a MCR-style and normal-style registers. For that, the register is now also part of the entry, so the options can be compared to check for compatible entries. In order to be able to accomplish this, some improvements are needed on the RTP macros. Change its implementation to concentrate on "pasting a prefix to each argument" rather than the more general "call any macro for each argument". Hopefully this will avoid trying to extend this infra and making it more complex. With the use of tuples for building the arguments, it's not possible to pass additional register fields and using xe_reg in the RTP tables. xe_mmio_* still need to be converted, from u32 to xe_reg, but that is left for another change. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230427223256.1432787-10-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20230427223256.1432787-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_reg_sr_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_reg_sr_types.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_reg_sr_types.h b/drivers/gpu/drm/xe/xe_reg_sr_types.h
index 91469784fd90..ad48a52b824a 100644
--- a/drivers/gpu/drm/xe/xe_reg_sr_types.h
+++ b/drivers/gpu/drm/xe/xe_reg_sr_types.h
@@ -9,18 +9,14 @@
#include <linux/types.h>
#include <linux/xarray.h>
+#include "regs/xe_reg_defs.h"
+
struct xe_reg_sr_entry {
+ struct xe_reg reg;
u32 clr_bits;
u32 set_bits;
/* Mask for bits to consider when reading value back */
u32 read_mask;
- /*
- * "Masked registers" are marked in spec as register with the upper 16
- * bits as a mask for the bits that is being updated on the lower 16
- * bits when writing to it.
- */
- u8 masked_reg;
- u8 reg_type;
};
struct xe_reg_sr {