Skip to content

Commit 034982c

Browse files
dceraoloickle
authored andcommitted
drm/i915/guc: drop guc shared area
Recent GuC doesn't require the shared area. We still have one user in i915 (engine reset via guc) because we haven't updated the command to match the current guc submission flow [1]. Since the flow in guc is about to change again, just disable the command for now and add a note that we'll implement it as part of the new flow. [1] https://patchwork.freedesktop.org/patch/295038/ Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Michal Wajdeczko <[email protected]> Cc: John Harrison <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Fernando Pacheco <[email protected]> Acked-by: Chris Wilson <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9f37940 commit 034982c

File tree

2 files changed

+3
-49
lines changed

2 files changed

+3
-49
lines changed

drivers/gpu/drm/i915/gt/uc/intel_guc.c

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -192,32 +192,6 @@ void intel_guc_init_early(struct intel_guc *guc)
192192
}
193193
}
194194

195-
static int guc_shared_data_create(struct intel_guc *guc)
196-
{
197-
struct i915_vma *vma;
198-
void *vaddr;
199-
200-
vma = intel_guc_allocate_vma(guc, PAGE_SIZE);
201-
if (IS_ERR(vma))
202-
return PTR_ERR(vma);
203-
204-
vaddr = i915_gem_object_pin_map(vma->obj, I915_MAP_WB);
205-
if (IS_ERR(vaddr)) {
206-
i915_vma_unpin_and_release(&vma, 0);
207-
return PTR_ERR(vaddr);
208-
}
209-
210-
guc->shared_data = vma;
211-
guc->shared_data_vaddr = vaddr;
212-
213-
return 0;
214-
}
215-
216-
static void guc_shared_data_destroy(struct intel_guc *guc)
217-
{
218-
i915_vma_unpin_and_release(&guc->shared_data, I915_VMA_RELEASE_MAP);
219-
}
220-
221195
static u32 guc_ctl_debug_flags(struct intel_guc *guc)
222196
{
223197
u32 level = intel_guc_log_get_level(&guc->log);
@@ -364,14 +338,9 @@ int intel_guc_init(struct intel_guc *guc)
364338
if (ret)
365339
goto err_fetch;
366340

367-
ret = guc_shared_data_create(guc);
368-
if (ret)
369-
goto err_fw;
370-
GEM_BUG_ON(!guc->shared_data);
371-
372341
ret = intel_guc_log_create(&guc->log);
373342
if (ret)
374-
goto err_shared;
343+
goto err_fw;
375344

376345
ret = intel_guc_ads_create(guc);
377346
if (ret)
@@ -406,8 +375,6 @@ int intel_guc_init(struct intel_guc *guc)
406375
intel_guc_ads_destroy(guc);
407376
err_log:
408377
intel_guc_log_destroy(&guc->log);
409-
err_shared:
410-
guc_shared_data_destroy(guc);
411378
err_fw:
412379
intel_uc_fw_fini(&guc->fw);
413380
err_fetch:
@@ -432,7 +399,6 @@ void intel_guc_fini(struct intel_guc *guc)
432399

433400
intel_guc_ads_destroy(guc);
434401
intel_guc_log_destroy(&guc->log);
435-
guc_shared_data_destroy(guc);
436402
intel_uc_fw_fini(&guc->fw);
437403
intel_uc_fw_cleanup_fetch(&guc->fw);
438404
}
@@ -628,19 +594,9 @@ int intel_guc_suspend(struct intel_guc *guc)
628594
int intel_guc_reset_engine(struct intel_guc *guc,
629595
struct intel_engine_cs *engine)
630596
{
631-
u32 data[7];
632-
633-
GEM_BUG_ON(!guc->execbuf_client);
597+
/* XXX: to be implemented with submission interface rework */
634598

635-
data[0] = INTEL_GUC_ACTION_REQUEST_ENGINE_RESET;
636-
data[1] = engine->guc_id;
637-
data[2] = 0;
638-
data[3] = 0;
639-
data[4] = 0;
640-
data[5] = guc->execbuf_client->stage_id;
641-
data[6] = intel_guc_ggtt_offset(guc, guc->shared_data);
642-
643-
return intel_guc_send(guc, data, ARRAY_SIZE(data));
599+
return -ENODEV;
644600
}
645601

646602
/**

drivers/gpu/drm/i915/gt/uc/intel_guc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ struct intel_guc {
4747
struct i915_vma *stage_desc_pool;
4848
void *stage_desc_pool_vaddr;
4949
struct ida stage_ids;
50-
struct i915_vma *shared_data;
51-
void *shared_data_vaddr;
5250

5351
struct intel_guc_client *execbuf_client;
5452

0 commit comments

Comments
 (0)