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/huc: Use scope-based forcewake

Use scope-based forcewake in the HuC code for a small simplification and
consistency with other parts of the driver.

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20251118164338.3572146-46-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

+2 -5
+2 -5
drivers/gpu/drm/xe/xe_huc.c
··· 300 300 void xe_huc_print_info(struct xe_huc *huc, struct drm_printer *p) 301 301 { 302 302 struct xe_gt *gt = huc_to_gt(huc); 303 - unsigned int fw_ref; 304 303 305 304 xe_uc_fw_print(&huc->fw, p); 306 305 307 306 if (!xe_uc_fw_is_enabled(&huc->fw)) 308 307 return; 309 308 310 - fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); 311 - if (!fw_ref) 309 + CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FW_GT); 310 + if (!fw_ref.domains) 312 311 return; 313 312 314 313 drm_printf(p, "\nHuC status: 0x%08x\n", 315 314 xe_mmio_read32(&gt->mmio, HUC_KERNEL_LOAD_INFO)); 316 - 317 - xe_force_wake_put(gt_to_fw(gt), fw_ref); 318 315 }