Lines Matching +full:0 +full:xe
38 * 1 - Xe submits a request to GSC asking for the message to CSME
40 * 3 - Xe sends the reply from GSC as-is to CSME via the mei proxy component
42 * 5 - Xe submits a request to GSC with the reply from CSME
99 __gsc_proxy_irq_rmw(gsc, 0, HECI_H_CSR_IS); in gsc_proxy_irq_clear()
104 u32 set = enabled ? HECI_H_CSR_IE : 0; in gsc_proxy_irq_toggle()
105 u32 clr = enabled ? 0 : HECI_H_CSR_IE; in gsc_proxy_irq_toggle()
117 if (ret < 0) { in proxy_send_to_csme()
123 if (ret < 0) { in proxy_send_to_csme()
151 return 0; in proxy_send_to_gsc()
160 int ret = 0; in validate_proxy_header()
173 if (dest == GSC_PROXY_ADDRESSING_KMD && header->status != 0) { in validate_proxy_header()
180 if (length > 0) in validate_proxy_header()
193 "GSC proxy error: s=0x%x[0x%x], d=0x%x[0x%x], t=%u, l=0x%x, st=0x%x\n", in validate_proxy_header()
206 static u32 emit_proxy_header(struct xe_device *xe, struct iosys_map *map, u32 offset) in emit_proxy_header() argument
208 xe_map_memset(xe, map, offset, 0, PROXY_HDR_SIZE); in emit_proxy_header()
210 proxy_header_wr(xe, map, offset, hdr, in emit_proxy_header()
212 FIELD_PREP(GSC_PROXY_PAYLOAD_LENGTH, 0)); in emit_proxy_header()
214 proxy_header_wr(xe, map, offset, source, GSC_PROXY_ADDRESSING_KMD); in emit_proxy_header()
215 proxy_header_wr(xe, map, offset, destination, GSC_PROXY_ADDRESSING_GSC); in emit_proxy_header()
216 proxy_header_wr(xe, map, offset, status, 0); in emit_proxy_header()
224 struct xe_device *xe = gt_to_xe(gt); in proxy_query() local
232 wr_offset = xe_gsc_emit_header(xe, &gsc->proxy.to_gsc, 0, in proxy_query()
233 HECI_MEADDRESS_PROXY, 0, PROXY_HDR_SIZE); in proxy_query()
234 wr_offset = emit_proxy_header(xe, &gsc->proxy.to_gsc, wr_offset); in proxy_query()
243 xe_gsc_poison_header(xe, &gsc->proxy.from_gsc, 0); in proxy_query()
251 ret = xe_gsc_read_out_header(xe, &gsc->proxy.from_gsc, 0, in proxy_query()
260 xe_map_memcpy_from(xe, to_csme_hdr, &gsc->proxy.from_gsc, in proxy_query()
285 xe_map_memcpy_from(xe, to_csme_payload, &gsc->proxy.from_gsc, in proxy_query()
290 if (ret < 0) in proxy_query()
296 xe_gt_err(gt, "CSME to GSC proxy msg too small: 0x%x\n", size); in proxy_query()
312 wr_offset = xe_gsc_emit_header(xe, &gsc->proxy.to_gsc, 0, in proxy_query()
313 HECI_MEADDRESS_PROXY, 0, size); in proxy_query()
316 xe_map_memcpy_to(xe, &gsc->proxy.to_gsc, wr_offset, gsc->proxy.from_csme, size); in proxy_query()
322 return ret < 0 ? ret : 0; in proxy_query()
335 for (slept = 0; slept < GSC_PROXY_INIT_TIMEOUT_MS; slept += 100) { in xe_gsc_proxy_request_handler()
380 struct xe_device *xe = kdev_to_xe_device(xe_kdev); in xe_gsc_proxy_component_bind() local
381 struct xe_gt *gt = xe->tiles[0].media_gt; in xe_gsc_proxy_component_bind()
389 return 0; in xe_gsc_proxy_component_bind()
395 struct xe_device *xe = kdev_to_xe_device(xe_kdev); in xe_gsc_proxy_component_unbind() local
396 struct xe_gt *gt = xe->tiles[0].media_gt; in xe_gsc_proxy_component_unbind()
415 struct xe_device *xe = gt_to_xe(gt); in proxy_channel_alloc() local
419 csme = drmm_kzalloc(&xe->drm, GSC_PROXY_CHANNEL_SIZE, GFP_KERNEL); in proxy_channel_alloc()
423 bo = xe_managed_bo_create_pin_map(xe, tile, GSC_PROXY_CHANNEL_SIZE, in proxy_channel_alloc()
430 gsc->proxy.to_gsc = IOSYS_MAP_INIT_OFFSET(&bo->vmap, 0); in proxy_channel_alloc()
435 return 0; in proxy_channel_alloc()
441 struct xe_device *xe = gt_to_xe(gt); in xe_gsc_proxy_stop() local
444 scoped_guard(xe_pm_runtime, xe) { in xe_gsc_proxy_stop()
461 struct xe_device *xe = gt_to_xe(gt); in xe_gsc_proxy_remove() local
468 * Xe module load/unload. Using devm managed action to register in xe_gsc_proxy_remove()
469 * xe_gsc_proxy_stop could cause issues if Xe module unload has in xe_gsc_proxy_remove()
479 component_del(xe->drm.dev, &xe_gsc_proxy_component_ops); in xe_gsc_proxy_remove()
487 * Return: 0 if the initialization was successful, a negative errno otherwise.
494 struct xe_device *xe = tile_to_xe(tile); in xe_gsc_proxy_init() local
513 err = component_add_typed(xe->drm.dev, &xe_gsc_proxy_component_ops, in xe_gsc_proxy_init()
515 if (err < 0) { in xe_gsc_proxy_init()
522 return devm_add_action_or_reset(xe->drm.dev, xe_gsc_proxy_remove, gsc); in xe_gsc_proxy_init()
529 * Return: 0 if the proxy are now enabled, a negative errno otherwise.
554 return 0; in xe_gsc_proxy_start()