summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_reg_whitelist.c
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_whitelist.c
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_whitelist.c')
-rw-r--r--drivers/gpu/drm/xe/xe_reg_whitelist.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c
index 310d5dfe30d5..7a2bb60ebd85 100644
--- a/drivers/gpu/drm/xe/xe_reg_whitelist.c
+++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c
@@ -11,10 +11,8 @@
#include "xe_platform_types.h"
#include "xe_rtp.h"
-#undef XE_REG
#undef XE_REG_MCR
-#define XE_REG(x, ...) _XE_RTP_REG(x)
-#define XE_REG_MCR(x, ...) _XE_RTP_MCR_REG(x)
+#define XE_REG_MCR(...) XE_REG(__VA_ARGS__, .mcr = 1)
static bool match_not_render(const struct xe_gt *gt,
const struct xe_hw_engine *hwe)