Lines Matching refs:gt
47 struct xe_gt *gt = gsc_to_gt(gsc); in memcpy_fw() local
48 struct xe_device *xe = gt_to_xe(gt); in memcpy_fw()
71 struct xe_gt *gt = gsc_to_gt(gsc); in emit_gsc_upload() local
78 bb = xe_bb_new(gt, 4, false); in emit_gsc_upload()
128 struct xe_gt *gt = gsc_to_gt(gsc); in query_compatibility_version() local
129 struct xe_tile *tile = gt_to_tile(gt); in query_compatibility_version()
130 struct xe_device *xe = gt_to_xe(gt); in query_compatibility_version()
142 xe_gt_err(gt, "failed to allocate bo for GSC version query\n"); in query_compatibility_version()
156 xe_gt_err(gt, in query_compatibility_version()
166 xe_gt_err(gt, "HuC: invalid GSC reply for version query (err=%d)\n", err); in query_compatibility_version()
174 xe_gt_info(gt, "found GSC cv%u.%u.%u\n", compat->major, compat->minor, compat->patch); in query_compatibility_version()
181 static int gsc_fw_is_loaded(struct xe_gt *gt) in gsc_fw_is_loaded() argument
183 return xe_mmio_read32(>->mmio, HECI_FWSTS1(MTL_GSC_HECI1_BASE)) & in gsc_fw_is_loaded()
187 static int gsc_fw_wait(struct xe_gt *gt) in gsc_fw_wait() argument
194 return xe_mmio_wait32(>->mmio, HECI_FWSTS1(MTL_GSC_HECI1_BASE), in gsc_fw_wait()
202 struct xe_gt *gt = gsc_to_gt(gsc); in gsc_upload() local
203 struct xe_device *xe = gt_to_xe(gt); in gsc_upload()
209 if (gsc_fw_is_loaded(gt)) { in gsc_upload()
210 xe_gt_err(gt, "GSC already loaded at upload time\n"); in gsc_upload()
216 xe_gt_err(gt, "Failed to memcpy GSC FW\n"); in gsc_upload()
239 xe_gt_err(gt, "Failed to emit GSC FW upload (%pe)\n", ERR_PTR(err)); in gsc_upload()
243 err = gsc_fw_wait(gt); in gsc_upload()
245 xe_gt_err(gt, "Failed to wait for GSC load (%pe)\n", ERR_PTR(err)); in gsc_upload()
262 struct xe_gt *gt = gsc_to_gt(gsc); in gsc_upload_and_init() local
263 struct xe_tile *tile = gt_to_tile(gt); in gsc_upload_and_init()
291 xe_gt_sanitize_freq(gt); in gsc_upload_and_init()
293 xe_gt_dbg(gt, "GSC FW async load completed\n"); in gsc_upload_and_init()
296 if (xe_huc_is_authenticated(>->uc.huc, XE_HUC_AUTH_VIA_GUC)) in gsc_upload_and_init()
297 xe_huc_auth(>->uc.huc, XE_HUC_AUTH_VIA_GSC); in gsc_upload_and_init()
303 xe_gt_dbg(gt, "GSC proxy init completed\n"); in gsc_upload_and_init()
308 static int gsc_er_complete(struct xe_gt *gt) in gsc_er_complete() argument
312 if (!gsc_fw_is_loaded(gt)) in gsc_er_complete()
332 er_status = xe_mmio_read32(>->mmio, GSCI_TIMER_STATUS) & GSCI_TIMER_STATUS_VALUE; in gsc_er_complete()
340 xe_gt_err(gt, "GSC ER timed out!\n"); in gsc_er_complete()
341 xe_device_declare_wedged(gt_to_xe(gt)); in gsc_er_complete()
351 struct xe_gt *gt = gsc_to_gt(gsc); in gsc_work() local
352 struct xe_device *xe = gt_to_xe(gt); in gsc_work()
363 fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC); in gsc_work()
366 ret = gsc_er_complete(gt); in gsc_work()
383 xe_force_wake_put(gt_to_fw(gt), fw_ref); in gsc_work()
389 struct xe_gt *gt = hwe->gt; in xe_gsc_hwe_irq_handler() local
390 struct xe_gsc *gsc = >->uc.gsc; in xe_gsc_hwe_irq_handler()
406 struct xe_gt *gt = gsc_to_gt(gsc); in xe_gsc_init() local
407 struct xe_tile *tile = gt_to_tile(gt); in xe_gsc_init()
415 if (tile->media_gt && (gt != tile->media_gt)) { in xe_gsc_init()
440 xe_gt_err(gt, "GSC init failed with %d", ret); in xe_gsc_init()
461 struct xe_gt *gt = gsc_to_gt(gsc); in xe_gsc_init_post_hwconfig() local
462 struct xe_tile *tile = gt_to_tile(gt); in xe_gsc_init_post_hwconfig()
463 struct xe_device *xe = gt_to_xe(gt); in xe_gsc_init_post_hwconfig()
464 struct xe_hw_engine *hwe = xe_gt_hw_engine(gt, XE_ENGINE_CLASS_OTHER, 0, true); in xe_gsc_init_post_hwconfig()
487 xe_gt_err(gt, "Failed to create queue for GSC submission\n"); in xe_gsc_init_post_hwconfig()
519 struct xe_gt *gt = gsc_to_gt(gsc); in xe_gsc_load_start() local
520 struct xe_device *xe = gt_to_xe(gt); in xe_gsc_load_start()
537 if (gsc_fw_is_loaded(gt)) { in xe_gsc_load_start()
575 void xe_gsc_wa_14015076503(struct xe_gt *gt, bool prep) in xe_gsc_wa_14015076503() argument
581 if (!XE_WA(gt, 14015076503) || !gsc_fw_is_loaded(gt)) in xe_gsc_wa_14015076503()
584 xe_mmio_rmw32(>->mmio, HECI_H_GS1(MTL_GSC_HECI2_BASE), gs1_clr, gs1_set); in xe_gsc_wa_14015076503()
588 xe_mmio_rmw32(>->mmio, HECI_H_CSR(MTL_GSC_HECI2_BASE), in xe_gsc_wa_14015076503()
601 struct xe_gt *gt = gsc_to_gt(gsc); in xe_gsc_print_info() local
602 struct xe_mmio *mmio = >->mmio; in xe_gsc_print_info()
612 fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC); in xe_gsc_print_info()
624 xe_force_wake_put(gt_to_fw(gt), fw_ref); in xe_gsc_print_info()