Lines Matching refs:guc

120 	intel_guc_init_early(&uc->guc);  in intel_uc_init_early()
133 intel_guc_init_late(&uc->guc); in intel_uc_init_late()
149 intel_guc_init_send_regs(&uc->guc); in intel_uc_init_mmio()
154 struct intel_guc *guc = &uc->guc; in __uc_capture_load_err_log() local
156 if (guc->log.vma && !uc->load_err_log) in __uc_capture_load_err_log()
157 uc->load_err_log = i915_gem_object_get(guc->log.vma->obj); in __uc_capture_load_err_log()
181 static void guc_clear_mmio_msg(struct intel_guc *guc) in guc_clear_mmio_msg() argument
183 intel_uncore_write(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15), 0); in guc_clear_mmio_msg()
186 static void guc_get_mmio_msg(struct intel_guc *guc) in guc_get_mmio_msg() argument
190 spin_lock_irq(&guc->irq_lock); in guc_get_mmio_msg()
192 val = intel_uncore_read(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15)); in guc_get_mmio_msg()
193 guc->mmio_msg |= val & guc->msg_enabled_mask; in guc_get_mmio_msg()
200 guc_clear_mmio_msg(guc); in guc_get_mmio_msg()
202 spin_unlock_irq(&guc->irq_lock); in guc_get_mmio_msg()
205 static void guc_handle_mmio_msg(struct intel_guc *guc) in guc_handle_mmio_msg() argument
208 GEM_BUG_ON(!intel_guc_ct_enabled(&guc->ct)); in guc_handle_mmio_msg()
210 spin_lock_irq(&guc->irq_lock); in guc_handle_mmio_msg()
211 if (guc->mmio_msg) { in guc_handle_mmio_msg()
212 intel_guc_to_host_process_recv_msg(guc, &guc->mmio_msg, 1); in guc_handle_mmio_msg()
213 guc->mmio_msg = 0; in guc_handle_mmio_msg()
215 spin_unlock_irq(&guc->irq_lock); in guc_handle_mmio_msg()
218 static int guc_enable_communication(struct intel_guc *guc) in guc_enable_communication() argument
220 struct intel_gt *gt = guc_to_gt(guc); in guc_enable_communication()
224 GEM_BUG_ON(intel_guc_ct_enabled(&guc->ct)); in guc_enable_communication()
230 ret = intel_guc_ct_enable(&guc->ct); in guc_enable_communication()
235 guc_get_mmio_msg(guc); in guc_enable_communication()
236 guc_handle_mmio_msg(guc); in guc_enable_communication()
238 intel_guc_enable_interrupts(guc); in guc_enable_communication()
242 intel_guc_ct_event_handler(&guc->ct); in guc_enable_communication()
250 static void guc_disable_communication(struct intel_guc *guc) in guc_disable_communication() argument
252 struct drm_i915_private *i915 = guc_to_gt(guc)->i915; in guc_disable_communication()
259 guc_clear_mmio_msg(guc); in guc_disable_communication()
261 intel_guc_disable_interrupts(guc); in guc_disable_communication()
263 intel_guc_ct_disable(&guc->ct); in guc_disable_communication()
271 guc_get_mmio_msg(guc); in guc_disable_communication()
282 err = intel_uc_fw_fetch(&uc->guc.fw); in __uc_fetch_firmwares()
302 intel_uc_fw_cleanup_fetch(&uc->guc.fw); in __uc_cleanup_firmwares()
307 struct intel_guc *guc = &uc->guc; in __uc_init() local
319 ret = intel_guc_init(guc); in __uc_init()
332 intel_guc_fini(guc); in __uc_init()
339 intel_guc_fini(&uc->guc); in __uc_fini()
344 struct intel_guc *guc = &uc->guc; in __uc_sanitize() local
350 intel_guc_sanitize(guc); in __uc_sanitize()
437 struct intel_guc *guc = &uc->guc; in __uc_init_hw() local
444 if (!intel_uc_fw_is_loadable(&guc->fw)) { in __uc_init_hw()
446 intel_uc_fw_is_overridden(&guc->fw) || in __uc_init_hw()
448 intel_uc_fw_status_to_error(guc->fw.status) : 0; in __uc_init_hw()
456 intel_guc_reset_interrupts(guc); in __uc_init_hw()
475 intel_guc_ads_reset(guc); in __uc_init_hw()
476 intel_guc_write_params(guc); in __uc_init_hw()
477 ret = intel_guc_fw_upload(guc); in __uc_init_hw()
489 ret = guc_enable_communication(guc); in __uc_init_hw()
496 intel_guc_submission_enable(guc); in __uc_init_hw()
499 ret = intel_guc_slpc_enable(&guc->slpc); in __uc_init_hw()
505 intel_uc_fw_type_repr(INTEL_UC_FW_TYPE_GUC), guc->fw.path, in __uc_init_hw()
506 guc->fw.major_ver_found, guc->fw.minor_ver_found, in __uc_init_hw()
528 intel_guc_submission_disable(guc); in __uc_init_hw()
548 struct intel_guc *guc = &uc->guc; in __uc_fini_hw() local
550 if (!intel_guc_is_fw_running(guc)) in __uc_fini_hw()
554 intel_guc_submission_disable(guc); in __uc_fini_hw()
567 struct intel_guc *guc = &uc->guc; in intel_uc_reset_prepare() local
576 if (!intel_guc_is_ready(guc)) in intel_uc_reset_prepare()
580 intel_guc_submission_reset_prepare(guc); in intel_uc_reset_prepare()
588 struct intel_guc *guc = &uc->guc; in intel_uc_reset() local
592 intel_guc_submission_reset(guc, stalled); in intel_uc_reset()
597 struct intel_guc *guc = &uc->guc; in intel_uc_reset_finish() local
602 if (intel_guc_is_fw_running(guc) && intel_uc_uses_guc_submission(uc)) in intel_uc_reset_finish()
603 intel_guc_submission_reset_finish(guc); in intel_uc_reset_finish()
608 struct intel_guc *guc = &uc->guc; in intel_uc_cancel_requests() local
612 intel_guc_submission_cancel_requests(guc); in intel_uc_cancel_requests()
617 struct intel_guc *guc = &uc->guc; in intel_uc_runtime_suspend() local
619 if (!intel_guc_is_ready(guc)) in intel_uc_runtime_suspend()
627 intel_guc_wait_for_pending_msg(guc, &guc->outstanding_submission_g2h, in intel_uc_runtime_suspend()
629 GEM_WARN_ON(atomic_read(&guc->outstanding_submission_g2h)); in intel_uc_runtime_suspend()
631 guc_disable_communication(guc); in intel_uc_runtime_suspend()
636 struct intel_guc *guc = &uc->guc; in intel_uc_suspend() local
640 if (!intel_guc_is_ready(guc)) in intel_uc_suspend()
644 err = intel_guc_suspend(guc); in intel_uc_suspend()
652 struct intel_guc *guc = &uc->guc; in __uc_resume() local
653 struct intel_gt *gt = guc_to_gt(guc); in __uc_resume()
656 if (!intel_guc_is_fw_running(guc)) in __uc_resume()
660 GEM_BUG_ON(enable_communication == intel_guc_ct_enabled(&guc->ct)); in __uc_resume()
663 guc_enable_communication(guc); in __uc_resume()
672 err = intel_guc_resume(guc); in __uc_resume()