Lines Matching refs:guc
119 intel_guc_init_early(&uc->guc); in intel_uc_init_early()
133 intel_guc_init_late(&uc->guc); in intel_uc_init_late()
150 intel_guc_init_send_regs(&uc->guc); in intel_uc_init_mmio()
155 struct intel_guc *guc = &uc->guc; in __uc_capture_load_err_log() local
157 if (guc->log.vma && !uc->load_err_log) in __uc_capture_load_err_log()
158 uc->load_err_log = i915_gem_object_get(guc->log.vma->obj); in __uc_capture_load_err_log()
182 static void guc_clear_mmio_msg(struct intel_guc *guc) in guc_clear_mmio_msg() argument
184 intel_uncore_write(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15), 0); in guc_clear_mmio_msg()
187 static void guc_get_mmio_msg(struct intel_guc *guc) in guc_get_mmio_msg() argument
191 spin_lock_irq(&guc->irq_lock); in guc_get_mmio_msg()
193 val = intel_uncore_read(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15)); in guc_get_mmio_msg()
194 guc->mmio_msg |= val & guc->msg_enabled_mask; in guc_get_mmio_msg()
201 guc_clear_mmio_msg(guc); in guc_get_mmio_msg()
203 spin_unlock_irq(&guc->irq_lock); in guc_get_mmio_msg()
206 static void guc_handle_mmio_msg(struct intel_guc *guc) in guc_handle_mmio_msg() argument
209 GEM_BUG_ON(!intel_guc_ct_enabled(&guc->ct)); in guc_handle_mmio_msg()
211 spin_lock_irq(&guc->irq_lock); in guc_handle_mmio_msg()
212 if (guc->mmio_msg) { in guc_handle_mmio_msg()
213 intel_guc_to_host_process_recv_msg(guc, &guc->mmio_msg, 1); in guc_handle_mmio_msg()
214 guc->mmio_msg = 0; in guc_handle_mmio_msg()
216 spin_unlock_irq(&guc->irq_lock); in guc_handle_mmio_msg()
219 static int guc_enable_communication(struct intel_guc *guc) in guc_enable_communication() argument
221 struct intel_gt *gt = guc_to_gt(guc); in guc_enable_communication()
225 GEM_BUG_ON(intel_guc_ct_enabled(&guc->ct)); in guc_enable_communication()
231 ret = intel_guc_ct_enable(&guc->ct); in guc_enable_communication()
236 guc_get_mmio_msg(guc); in guc_enable_communication()
237 guc_handle_mmio_msg(guc); in guc_enable_communication()
239 intel_guc_enable_interrupts(guc); in guc_enable_communication()
243 intel_guc_ct_event_handler(&guc->ct); in guc_enable_communication()
246 guc_dbg(guc, "communication enabled\n"); in guc_enable_communication()
251 static void guc_disable_communication(struct intel_guc *guc) in guc_disable_communication() argument
258 guc_clear_mmio_msg(guc); in guc_disable_communication()
260 intel_guc_disable_interrupts(guc); in guc_disable_communication()
262 intel_guc_ct_disable(&guc->ct); in guc_disable_communication()
270 guc_get_mmio_msg(guc); in guc_disable_communication()
272 guc_dbg(guc, "communication disabled\n"); in guc_disable_communication()
282 err = intel_uc_fw_fetch(&uc->guc.fw); in __uc_fetch_firmwares()
311 intel_uc_fw_cleanup_fetch(&uc->guc.fw); in __uc_cleanup_firmwares()
316 struct intel_guc *guc = &uc->guc; in __uc_init() local
328 ret = intel_guc_init(guc); in __uc_init()
345 intel_guc_fini(&uc->guc); in __uc_fini()
350 struct intel_guc *guc = &uc->guc; in __uc_sanitize() local
356 intel_guc_sanitize(guc); in __uc_sanitize()
456 struct intel_guc *guc = &uc->guc; in __uc_init_hw() local
464 print_fw_ver(gt, &guc->fw); in __uc_init_hw()
469 if (!intel_uc_fw_is_loadable(&guc->fw)) { in __uc_init_hw()
471 intel_uc_fw_is_overridden(&guc->fw) || in __uc_init_hw()
473 intel_uc_fw_status_to_error(guc->fw.status) : 0; in __uc_init_hw()
481 intel_guc_reset_interrupts(guc); in __uc_init_hw()
505 intel_guc_ads_reset(guc); in __uc_init_hw()
506 intel_guc_write_params(guc); in __uc_init_hw()
507 ret = intel_guc_fw_upload(guc); in __uc_init_hw()
519 ret = guc_enable_communication(guc); in __uc_init_hw()
535 ret = intel_guc_submission_enable(guc); in __uc_init_hw()
541 ret = intel_guc_slpc_enable(&guc->slpc); in __uc_init_hw()
551 guc_info(guc, "submission %s\n", str_enabled_disabled(intel_uc_uses_guc_submission(uc))); in __uc_init_hw()
552 guc_info(guc, "SLPC %s\n", str_enabled_disabled(intel_uc_uses_guc_slpc(uc))); in __uc_init_hw()
560 intel_guc_submission_disable(guc); in __uc_init_hw()
585 struct intel_guc *guc = &uc->guc; in __uc_fini_hw() local
587 if (!intel_guc_is_fw_running(guc)) in __uc_fini_hw()
591 intel_guc_submission_disable(guc); in __uc_fini_hw()
604 struct intel_guc *guc = &uc->guc; in intel_uc_reset_prepare() local
613 if (!intel_guc_is_ready(guc)) in intel_uc_reset_prepare()
617 intel_guc_submission_reset_prepare(guc); in intel_uc_reset_prepare()
625 struct intel_guc *guc = &uc->guc; in intel_uc_reset() local
629 intel_guc_submission_reset(guc, stalled); in intel_uc_reset()
634 struct intel_guc *guc = &uc->guc; in intel_uc_reset_finish() local
644 intel_guc_submission_reset_finish(guc); in intel_uc_reset_finish()
649 struct intel_guc *guc = &uc->guc; in intel_uc_cancel_requests() local
653 intel_guc_submission_cancel_requests(guc); in intel_uc_cancel_requests()
658 struct intel_guc *guc = &uc->guc; in intel_uc_runtime_suspend() local
660 if (!intel_guc_is_ready(guc)) { in intel_uc_runtime_suspend()
661 guc->interrupts.enabled = false; in intel_uc_runtime_suspend()
670 intel_guc_wait_for_pending_msg(guc, &guc->outstanding_submission_g2h, in intel_uc_runtime_suspend()
672 GEM_WARN_ON(atomic_read(&guc->outstanding_submission_g2h)); in intel_uc_runtime_suspend()
674 guc_disable_communication(guc); in intel_uc_runtime_suspend()
679 struct intel_guc *guc = &uc->guc; in intel_uc_suspend() local
686 wake_up_all_tlb_invalidate(guc); in intel_uc_suspend()
688 if (!intel_guc_is_ready(guc)) { in intel_uc_suspend()
689 guc->interrupts.enabled = false; in intel_uc_suspend()
693 intel_guc_submission_flush_work(guc); in intel_uc_suspend()
696 err = intel_guc_suspend(guc); in intel_uc_suspend()
698 guc_dbg(guc, "Failed to suspend, %pe", ERR_PTR(err)); in intel_uc_suspend()
704 intel_uc_fw_resume_mapping(&uc->guc.fw); in __uc_resume_mappings()
710 struct intel_guc *guc = &uc->guc; in __uc_resume() local
711 struct intel_gt *gt = guc_to_gt(guc); in __uc_resume()
714 if (!intel_guc_is_fw_running(guc)) in __uc_resume()
718 GEM_BUG_ON(enable_communication == intel_guc_ct_enabled(&guc->ct)); in __uc_resume()
721 guc_enable_communication(guc); in __uc_resume()
730 err = intel_guc_resume(guc); in __uc_resume()
732 guc_dbg(guc, "Failed to resume, %pe", ERR_PTR(err)); in __uc_resume()
738 if (intel_guc_tlb_invalidation_is_available(guc)) { in __uc_resume()
739 intel_guc_invalidate_tlb_engines(guc); in __uc_resume()
740 intel_guc_invalidate_tlb_guc(guc); in __uc_resume()