Lines Matching refs:gsc

40 bool intel_gsc_uc_fw_proxy_init_done(struct intel_gsc_uc *gsc, bool needs_wakeref)  in intel_gsc_uc_fw_proxy_init_done()  argument
43 gsc_uc_get_fw_status(gsc_uc_to_gt(gsc)->uncore, in intel_gsc_uc_fw_proxy_init_done()
48 int intel_gsc_uc_fw_proxy_get_status(struct intel_gsc_uc *gsc) in intel_gsc_uc_fw_proxy_get_status() argument
52 if (!intel_uc_fw_is_loadable(&gsc->fw)) in intel_gsc_uc_fw_proxy_get_status()
54 if (__intel_uc_fw_status(&gsc->fw) == INTEL_UC_FIRMWARE_LOAD_FAIL) in intel_gsc_uc_fw_proxy_get_status()
56 if (!intel_gsc_uc_fw_proxy_init_done(gsc, true)) in intel_gsc_uc_fw_proxy_get_status()
62 bool intel_gsc_uc_fw_init_done(struct intel_gsc_uc *gsc) in intel_gsc_uc_fw_init_done() argument
64 return gsc_uc_get_fw_status(gsc_uc_to_gt(gsc)->uncore, false) & in intel_gsc_uc_fw_init_done()
75 struct intel_gsc_uc *gsc = container_of(gsc_fw, struct intel_gsc_uc, fw); in intel_gsc_fw_get_binary_info() local
76 struct intel_gt *gt = gsc_uc_to_gt(gsc); in intel_gsc_fw_get_binary_info()
208 intel_uc_fw_version_from_gsc_manifest(&gsc->release, in intel_gsc_fw_get_binary_info()
210 gsc->security_version = manifest->security_version; in intel_gsc_fw_get_binary_info()
218 static int emit_gsc_fw_load(struct i915_request *rq, struct intel_gsc_uc *gsc) in emit_gsc_fw_load() argument
220 u32 offset = i915_ggtt_offset(gsc->local); in emit_gsc_fw_load()
230 *cs++ = (gsc->local->size / SZ_4K) | HECI1_FW_LIMIT_VALID; in emit_gsc_fw_load()
237 static int gsc_fw_load(struct intel_gsc_uc *gsc) in gsc_fw_load() argument
239 struct intel_context *ce = gsc->ce; in gsc_fw_load()
256 err = emit_gsc_fw_load(rq, gsc); in gsc_fw_load()
276 gt_err(gsc_uc_to_gt(gsc), "Request submission for GSC load failed %pe\n", in gsc_fw_load()
282 static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc) in gsc_fw_load_prepare() argument
284 struct intel_gt *gt = gsc_uc_to_gt(gsc); in gsc_fw_load_prepare()
287 if (!gsc->local) in gsc_fw_load_prepare()
290 if (gsc->local->size < gsc->fw.size) in gsc_fw_load_prepare()
293 src = i915_gem_object_pin_map_unlocked(gsc->fw.obj, in gsc_fw_load_prepare()
294 intel_gt_coherent_map_type(gt, gsc->fw.obj, true)); in gsc_fw_load_prepare()
298 memcpy_toio(gsc->local_vaddr, src, gsc->fw.size); in gsc_fw_load_prepare()
299 memset_io(gsc->local_vaddr + gsc->fw.size, 0, gsc->local->size - gsc->fw.size); in gsc_fw_load_prepare()
303 i915_gem_object_unpin_map(gsc->fw.obj); in gsc_fw_load_prepare()
344 static int gsc_fw_query_compatibility_version(struct intel_gsc_uc *gsc) in gsc_fw_query_compatibility_version() argument
346 struct intel_gt *gt = gsc_uc_to_gt(gsc); in gsc_fw_query_compatibility_version()
371 err = intel_gsc_uc_heci_cmd_submit_packet(&gt->uc.gsc, in gsc_fw_query_compatibility_version()
391 gsc->fw.file_selected.ver.major = msg_out->compat_major; in gsc_fw_query_compatibility_version()
392 gsc->fw.file_selected.ver.minor = msg_out->compat_minor; in gsc_fw_query_compatibility_version()
399 int intel_gsc_uc_fw_upload(struct intel_gsc_uc *gsc) in intel_gsc_uc_fw_upload() argument
401 struct intel_gt *gt = gsc_uc_to_gt(gsc); in intel_gsc_uc_fw_upload()
402 struct intel_uc_fw *gsc_fw = &gsc->fw; in intel_gsc_uc_fw_upload()
406 if (intel_gsc_uc_fw_init_done(gsc)) { in intel_gsc_uc_fw_upload()
416 intel_uc_fw_sanitize(&gsc->fw); in intel_gsc_uc_fw_upload()
421 err = gsc_fw_load_prepare(gsc); in intel_gsc_uc_fw_upload()
448 err = gsc_fw_load(gsc); in intel_gsc_uc_fw_upload()
456 err = gsc_fw_query_compatibility_version(gsc); in intel_gsc_uc_fw_upload()
471 gsc->release.major, gsc->release.minor, in intel_gsc_uc_fw_upload()
472 gsc->release.patch, gsc->release.build, in intel_gsc_uc_fw_upload()
473 gsc->security_version); in intel_gsc_uc_fw_upload()