Lines Matching refs:guc

88 	intel_guc_init_early(&uc->guc);  in intel_uc_init_early()
107 intel_guc_init_send_regs(&uc->guc); in intel_uc_init_mmio()
112 struct intel_guc *guc = &uc->guc; in __uc_capture_load_err_log() local
114 if (guc->log.vma && !uc->load_err_log) in __uc_capture_load_err_log()
115 uc->load_err_log = i915_gem_object_get(guc->log.vma->obj); in __uc_capture_load_err_log()
132 static void guc_clear_mmio_msg(struct intel_guc *guc) in guc_clear_mmio_msg() argument
134 intel_uncore_write(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15), 0); in guc_clear_mmio_msg()
137 static void guc_get_mmio_msg(struct intel_guc *guc) in guc_get_mmio_msg() argument
141 spin_lock_irq(&guc->irq_lock); in guc_get_mmio_msg()
143 val = intel_uncore_read(guc_to_gt(guc)->uncore, SOFT_SCRATCH(15)); in guc_get_mmio_msg()
144 guc->mmio_msg |= val & guc->msg_enabled_mask; in guc_get_mmio_msg()
151 guc_clear_mmio_msg(guc); in guc_get_mmio_msg()
153 spin_unlock_irq(&guc->irq_lock); in guc_get_mmio_msg()
156 static void guc_handle_mmio_msg(struct intel_guc *guc) in guc_handle_mmio_msg() argument
158 struct drm_i915_private *i915 = guc_to_gt(guc)->i915; in guc_handle_mmio_msg()
161 GEM_BUG_ON(guc->handler == intel_guc_to_host_event_handler_nop); in guc_handle_mmio_msg()
163 if (!guc->mmio_msg) in guc_handle_mmio_msg()
167 intel_guc_to_host_process_recv_msg(guc, &guc->mmio_msg, 1); in guc_handle_mmio_msg()
170 guc->mmio_msg = 0; in guc_handle_mmio_msg()
173 static void guc_reset_interrupts(struct intel_guc *guc) in guc_reset_interrupts() argument
175 guc->interrupts.reset(guc); in guc_reset_interrupts()
178 static void guc_enable_interrupts(struct intel_guc *guc) in guc_enable_interrupts() argument
180 guc->interrupts.enable(guc); in guc_enable_interrupts()
183 static void guc_disable_interrupts(struct intel_guc *guc) in guc_disable_interrupts() argument
185 guc->interrupts.disable(guc); in guc_disable_interrupts()
188 static inline bool guc_communication_enabled(struct intel_guc *guc) in guc_communication_enabled() argument
190 return guc->send != intel_guc_send_nop; in guc_communication_enabled()
193 static int guc_enable_communication(struct intel_guc *guc) in guc_enable_communication() argument
195 struct drm_i915_private *i915 = guc_to_gt(guc)->i915; in guc_enable_communication()
198 GEM_BUG_ON(guc_communication_enabled(guc)); in guc_enable_communication()
204 ret = intel_guc_ct_enable(&guc->ct); in guc_enable_communication()
208 guc->send = intel_guc_send_ct; in guc_enable_communication()
209 guc->handler = intel_guc_to_host_event_handler_ct; in guc_enable_communication()
212 guc_get_mmio_msg(guc); in guc_enable_communication()
213 guc_handle_mmio_msg(guc); in guc_enable_communication()
215 guc_enable_interrupts(guc); in guc_enable_communication()
219 intel_guc_to_host_event_handler_ct(guc); in guc_enable_communication()
227 static void guc_stop_communication(struct intel_guc *guc) in guc_stop_communication() argument
229 intel_guc_ct_stop(&guc->ct); in guc_stop_communication()
231 guc->send = intel_guc_send_nop; in guc_stop_communication()
232 guc->handler = intel_guc_to_host_event_handler_nop; in guc_stop_communication()
234 guc_clear_mmio_msg(guc); in guc_stop_communication()
237 static void guc_disable_communication(struct intel_guc *guc) in guc_disable_communication() argument
244 guc_clear_mmio_msg(guc); in guc_disable_communication()
246 guc_disable_interrupts(guc); in guc_disable_communication()
248 guc->send = intel_guc_send_nop; in guc_disable_communication()
249 guc->handler = intel_guc_to_host_event_handler_nop; in guc_disable_communication()
251 intel_guc_ct_disable(&guc->ct); in guc_disable_communication()
259 guc_get_mmio_msg(guc); in guc_disable_communication()
272 err = intel_uc_fw_fetch(&uc->guc.fw, i915); in intel_uc_fetch_firmwares()
288 intel_uc_fw_cleanup_fetch(&uc->guc.fw); in intel_uc_cleanup_firmwares()
293 struct intel_guc *guc = &uc->guc; in intel_uc_init() local
303 ret = intel_guc_init(guc); in intel_uc_init()
315 struct intel_guc *guc = &uc->guc; in intel_uc_fini() local
323 intel_guc_fini(guc); in intel_uc_fini()
330 struct intel_guc *guc = &uc->guc; in __uc_sanitize() local
336 intel_guc_sanitize(guc); in __uc_sanitize()
415 struct intel_guc *guc = &uc->guc; in intel_uc_init_hw() local
430 if (!intel_uc_fw_is_available(&guc->fw)) { in intel_uc_init_hw()
432 intel_uc_fw_is_overridden(&guc->fw) || in intel_uc_init_hw()
434 intel_uc_fw_status_to_error(guc->fw.status) : 0; in intel_uc_init_hw()
442 guc_reset_interrupts(guc); in intel_uc_init_hw()
461 intel_guc_ads_reset(guc); in intel_uc_init_hw()
462 intel_guc_write_params(guc); in intel_uc_init_hw()
463 ret = intel_guc_fw_upload(guc); in intel_uc_init_hw()
475 ret = guc_enable_communication(guc); in intel_uc_init_hw()
481 ret = intel_guc_sample_forcewake(guc); in intel_uc_init_hw()
486 ret = intel_guc_submission_enable(guc); in intel_uc_init_hw()
492 intel_uc_fw_type_repr(INTEL_UC_FW_TYPE_GUC), guc->fw.path, in intel_uc_init_hw()
493 guc->fw.major_ver_found, guc->fw.minor_ver_found, in intel_uc_init_hw()
512 guc_disable_communication(guc); in intel_uc_init_hw()
532 struct intel_guc *guc = &uc->guc; in intel_uc_fini_hw() local
534 if (!intel_guc_is_running(guc)) in intel_uc_fini_hw()
538 intel_guc_submission_disable(guc); in intel_uc_fini_hw()
540 guc_disable_communication(guc); in intel_uc_fini_hw()
552 struct intel_guc *guc = &uc->guc; in intel_uc_reset_prepare() local
554 if (!intel_guc_is_running(guc)) in intel_uc_reset_prepare()
557 guc_stop_communication(guc); in intel_uc_reset_prepare()
563 struct intel_guc *guc = &uc->guc; in intel_uc_runtime_suspend() local
566 if (!intel_guc_is_running(guc)) in intel_uc_runtime_suspend()
569 err = intel_guc_suspend(guc); in intel_uc_runtime_suspend()
573 guc_disable_communication(guc); in intel_uc_runtime_suspend()
578 struct intel_guc *guc = &uc->guc; in intel_uc_suspend() local
581 if (!intel_guc_is_running(guc)) in intel_uc_suspend()
590 struct intel_guc *guc = &uc->guc; in __uc_resume() local
593 if (!intel_guc_is_running(guc)) in __uc_resume()
597 GEM_BUG_ON(enable_communication == guc_communication_enabled(guc)); in __uc_resume()
600 guc_enable_communication(guc); in __uc_resume()
602 err = intel_guc_resume(guc); in __uc_resume()