Lines Matching +full:multi +full:- +full:functional

1 // SPDX-License-Identifier: MIT
3 * Copyright(c) 2019-2022, Intel Corporation. All rights reserved.
49 obj = i915_gem_object_create_lmem(gt->i915, size, in gsc_ext_om_alloc()
63 intf->gem_obj = obj; in gsc_ext_om_alloc()
74 struct drm_i915_gem_object *obj = fetch_and_zero(&intf->gem_obj); in gsc_ext_om_destroy()
100 .name = "mei-gscfi",
108 .name = "mei-gsc",
114 .name = "mei-gscfi",
131 struct intel_gsc_intf *intf = &gsc->intf[intf_id]; in gsc_destroy_one()
133 if (intf->adev) { in gsc_destroy_one()
134 struct auxiliary_device *aux_dev = &intf->adev->aux_dev; in gsc_destroy_one()
137 intel_huc_unregister_gsc_notifier(&gsc_to_gt(gsc)->uc.huc, in gsc_destroy_one()
138 aux_dev->dev.bus); in gsc_destroy_one()
142 intf->adev = NULL; in gsc_destroy_one()
145 if (intf->irq >= 0) in gsc_destroy_one()
146 irq_free_desc(intf->irq); in gsc_destroy_one()
147 intf->irq = -1; in gsc_destroy_one()
155 struct pci_dev *pdev = to_pci_dev(i915->drm.dev); in gsc_init_one()
159 struct intel_gsc_intf *intf = &gsc->intf[intf_id]; in gsc_init_one()
162 intf->irq = -1; in gsc_init_one()
163 intf->id = 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()
181 drm_warn_once(&i915->drm, "Unknown platform\n"); in gsc_init_one()
185 if (!def->name) { in gsc_init_one()
186 drm_warn_once(&i915->drm, "HECI%d is not implemented!\n", intf_id + 1); in gsc_init_one()
191 if (def->use_polling) in gsc_init_one()
194 intf->irq = irq_alloc_desc(0); in gsc_init_one()
195 if (intf->irq < 0) { in gsc_init_one()
196 drm_err(&i915->drm, "gsc irq error %d\n", intf->irq); in gsc_init_one()
200 ret = gsc_irq_init(intf->irq); in gsc_init_one()
202 drm_err(&i915->drm, "gsc irq init failed %d\n", ret); in gsc_init_one()
211 if (def->lmem_size) { 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()
220 adev->ext_op_mem.start = i915_gem_object_get_dma_address(intf->gem_obj, 0); in gsc_init_one()
221 adev->ext_op_mem.end = adev->ext_op_mem.start + def->lmem_size; in gsc_init_one()
224 adev->irq = intf->irq; in gsc_init_one()
225 adev->bar.parent = &pdev->resource[0]; in gsc_init_one()
226 adev->bar.start = def->bar + pdev->resource[0].start; in gsc_init_one()
227 adev->bar.end = adev->bar.start + def->bar_size - 1; in gsc_init_one()
228 adev->bar.flags = IORESOURCE_MEM; in gsc_init_one()
229 adev->bar.desc = IORES_DESC_NONE; in gsc_init_one()
230 adev->slow_firmware = def->slow_firmware; in gsc_init_one()
232 aux_dev = &adev->aux_dev; in gsc_init_one()
233 aux_dev->name = def->name; in gsc_init_one()
234 aux_dev->id = (pci_domain_nr(pdev->bus) << 16) | in gsc_init_one()
235 PCI_DEVID(pdev->bus->number, pdev->devfn); in gsc_init_one()
236 aux_dev->dev.parent = &pdev->dev; in gsc_init_one()
237 aux_dev->dev.release = gsc_release_dev; in gsc_init_one()
241 drm_err(&i915->drm, "gsc aux init failed %d\n", ret); in gsc_init_one()
246 intf->adev = adev; /* needed by the notifier */ in gsc_init_one()
249 intel_huc_register_gsc_notifier(&gsc_to_gt(gsc)->uc.huc, in gsc_init_one()
250 aux_dev->dev.bus); 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()
257 aux_dev->dev.bus); in gsc_init_one()
258 intf->adev = NULL; in gsc_init_one()
267 gsc_destroy_one(i915, gsc, intf->id); in gsc_init_one()
279 if (!HAS_HECI_GSC(gt->i915)) { 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()
316 if (!HAS_HECI_GSC(gt->i915)) in intel_gsc_fini()
320 gsc_destroy_one(gt->i915, gsc, i); in intel_gsc_fini()