Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe/guc: Move H2G SETUP_PC_GUCRC definition to SLPC ABI

We already have a dedicated file for GuC SLPC ABI definitions.
Move definition of the SETUP_PC_GUCRC action and related enum
to that file, rename them to match format of other new ABI
definitions and add simple kernel-doc.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240609181931.1724-2-michal.wajdeczko@intel.com

+25 -10
-6
drivers/gpu/drm/xe/abi/guc_actions_abi.h
··· 128 128 XE_GUC_ACTION_CONTEXT_RESET_NOTIFICATION = 0x1008, 129 129 XE_GUC_ACTION_ENGINE_FAILURE_NOTIFICATION = 0x1009, 130 130 XE_GUC_ACTION_HOST2GUC_UPDATE_CONTEXT_POLICIES = 0x100B, 131 - XE_GUC_ACTION_SETUP_PC_GUCRC = 0x3004, 132 131 XE_GUC_ACTION_AUTHENTICATE_HUC = 0x4000, 133 132 XE_GUC_ACTION_GET_HWCONFIG = 0x4100, 134 133 XE_GUC_ACTION_REGISTER_CONTEXT = 0x4502, ··· 150 151 XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004, 151 152 XE_GUC_ACTION_NOTIFY_EXCEPTION = 0x8005, 152 153 XE_GUC_ACTION_LIMIT 153 - }; 154 - 155 - enum xe_guc_rc_options { 156 - XE_GUCRC_HOST_CONTROL, 157 - XE_GUCRC_FIRMWARE_CONTROL, 158 154 }; 159 155 160 156 enum xe_guc_preempt_options {
+22
drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h
··· 246 246 #define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ARGC (0xffu << 0) 247 247 #define HOST2GUC_PC_SLPC_REQUEST_MSG_N_EVENT_DATA_N GUC_HXG_REQUEST_MSG_n_DATAn 248 248 249 + /** 250 + * DOC: SETUP_PC_GUCRC 251 + * 252 + * +---+-------+--------------------------------------------------------------+ 253 + * | | Bits | Description | 254 + * +===+=======+==============================================================+ 255 + * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ | 256 + * | +-------+--------------------------------------------------------------+ 257 + * | | 30:28 | TYPE = GUC_HXG_TYPE_FAST_REQUEST_ | 258 + * | +-------+--------------------------------------------------------------+ 259 + * | | 27:16 | DATA0 = MBZ | 260 + * | +-------+--------------------------------------------------------------+ 261 + * | | 15:0 | ACTION = _`GUC_ACTION_HOST2GUC_SETUP_PC_GUCRC` = 0x3004 | 262 + * +---+-------+--------------------------------------------------------------+ 263 + * | 1 | 31:0 | **MODE** = GUCRC_HOST_CONTROL(0), GUCRC_FIRMWARE_CONTROL(1) | 264 + * +---+-------+--------------------------------------------------------------+ 265 + */ 266 + 267 + #define GUC_ACTION_HOST2GUC_SETUP_PC_GUCRC 0x3004u 268 + #define GUCRC_HOST_CONTROL 0u 269 + #define GUCRC_FIRMWARE_CONTROL 1u 270 + 249 271 #endif
+3 -4
drivers/gpu/drm/xe/xe_guc_pc.c
··· 9 9 10 10 #include <drm/drm_managed.h> 11 11 12 - #include "abi/guc_actions_abi.h" 13 12 #include "abi/guc_actions_slpc_abi.h" 14 13 #include "regs/xe_gt_regs.h" 15 14 #include "regs/xe_regs.h" ··· 194 195 { 195 196 struct xe_guc_ct *ct = &pc_to_guc(pc)->ct; 196 197 u32 action[] = { 197 - XE_GUC_ACTION_SETUP_PC_GUCRC, 198 + GUC_ACTION_HOST2GUC_SETUP_PC_GUCRC, 198 199 mode, 199 200 }; 200 201 int ret; ··· 757 758 if (xe->info.skip_guc_pc) 758 759 return 0; 759 760 760 - ret = pc_action_setup_gucrc(pc, XE_GUCRC_HOST_CONTROL); 761 + ret = pc_action_setup_gucrc(pc, GUCRC_HOST_CONTROL); 761 762 if (ret) 762 763 return ret; 763 764 ··· 860 861 goto out; 861 862 } 862 863 863 - ret = pc_action_setup_gucrc(pc, XE_GUCRC_FIRMWARE_CONTROL); 864 + ret = pc_action_setup_gucrc(pc, GUCRC_FIRMWARE_CONTROL); 864 865 865 866 out: 866 867 XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));