drm/xe/guc: Handle RCU_MODE as masked from definition
authorLucas De Marchi <lucas.demarchi@intel.com>
Sat, 29 Apr 2023 06:23:27 +0000 (23:23 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:33:14 +0000 (18:33 -0500)
commit98ce59e9ba5cd513bd57e0f4558a33833e07f7e8
treee3bfef42fda19ecf51b46d0cba6fc191dd3355c7
parenta31153fcb1dc2baaf13e520f71f332d4eae28b52
drm/xe/guc: Handle RCU_MODE as masked from definition

guc_mmio_regset_write() had a flags for the registers to be added to the
GuC's regset list. The only register actually using that was RCU_MODE,
but it was setting the flags to a bogus value. From
struct xe_guc_fwif.h,

#define GUC_REGSET_MASKED               BIT(0)
#define GUC_REGSET_MASKED_WITH_VALUE    BIT(2)
#define GUC_REGSET_RESTORE_ONLY         BIT(3)

Cross checking with i915, the only flag to set in RCU_MODE is
GUC_REGSET_MASKED. That can be done automatically from the register, as
long as the definition is correct.

Add the XE_REG_OPTION_MASKED annotation to RCU_MODE and kill the "flags"
field in guc_mmio_regset_write(): guc_mmio_regset_write_one() can decide
that based on the register being passed.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20230429062332.354139-3-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/regs/xe_gt_regs.h
drivers/gpu/drm/xe/xe_guc_ads.c