Lines Matching full:gsc
43 gsc_ext_om_alloc(struct intel_gsc *gsc, struct intel_gsc_intf *intf, size_t size) in gsc_ext_om_alloc() argument
45 struct intel_gt *gt = gsc_to_gt(gsc); in gsc_ext_om_alloc()
53 gt_err(gt, "Failed to allocate gsc memory\n"); in gsc_ext_om_alloc()
59 gt_err(gt, "Failed to pin pages for gsc memory\n"); in gsc_ext_om_alloc()
94 /* gsc resources and definitions (HECI1 and HECI2) */
108 .name = "mei-gsc",
129 struct intel_gsc *gsc, unsigned int intf_id) in gsc_destroy_one() argument
131 struct intel_gsc_intf *intf = &gsc->intf[intf_id]; in gsc_destroy_one()
137 intel_huc_unregister_gsc_notifier(&gsc_to_gt(gsc)->uc.huc, in gsc_destroy_one()
152 static void gsc_init_one(struct drm_i915_private *i915, struct intel_gsc *gsc, in gsc_init_one() argument
159 struct intel_gsc_intf *intf = &gsc->intf[intf_id]; in gsc_init_one()
166 * On the multi-tile setups the GSC is functional on the first tile only in gsc_init_one()
168 if (gsc_to_gt(gsc)->info.id != 0) { in gsc_init_one()
169 drm_dbg(&i915->drm, "Not initializing gsc for remote tiles\n"); in gsc_init_one()
196 drm_err(&i915->drm, "gsc irq error %d\n", intf->irq); in gsc_init_one()
202 drm_err(&i915->drm, "gsc irq init failed %d\n", ret); in gsc_init_one()
212 drm_dbg(&i915->drm, "setting up GSC lmem\n"); in gsc_init_one()
214 if (gsc_ext_om_alloc(gsc, intf, def->lmem_size)) { in gsc_init_one()
215 drm_err(&i915->drm, "setting up gsc extended operational memory failed\n"); in gsc_init_one()
241 drm_err(&i915->drm, "gsc aux init failed %d\n", ret); in gsc_init_one()
249 intel_huc_register_gsc_notifier(&gsc_to_gt(gsc)->uc.huc, in gsc_init_one()
254 drm_err(&i915->drm, "gsc aux add failed %d\n", ret); in gsc_init_one()
256 intel_huc_unregister_gsc_notifier(&gsc_to_gt(gsc)->uc.huc, in gsc_init_one()
267 gsc_destroy_one(i915, gsc, intf->id); in gsc_init_one()
275 gt_warn_once(gt, "GSC irq: intf_id %d is out of range", intf_id); in gsc_irq_handler()
280 gt_warn_once(gt, "GSC irq: not supported"); in gsc_irq_handler()
284 if (gt->gsc.intf[intf_id].irq < 0) in gsc_irq_handler()
287 ret = generic_handle_irq(gt->gsc.intf[intf_id].irq); in gsc_irq_handler()
289 gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret); in gsc_irq_handler()
300 void intel_gsc_init(struct intel_gsc *gsc, struct drm_i915_private *i915) in intel_gsc_init() argument
308 gsc_init_one(i915, gsc, i); in intel_gsc_init()
311 void intel_gsc_fini(struct intel_gsc *gsc) in intel_gsc_fini() argument
313 struct intel_gt *gt = gsc_to_gt(gsc); in intel_gsc_fini()
320 gsc_destroy_one(gt->i915, gsc, i); in intel_gsc_fini()