Skip to content

Commit c538d54

Browse files
wegorz76danvet
authored andcommitted
drm/i915: Distinction of memory regions
In preparation for Xe HP multi-tile architecture with multiple memory regions, we need to be able differentiate multiple instances of device local-memory. Note that the region name is just to give it a human friendly identifier, instead of using class/instance which also uniquely identifies the region. So far the region name is only for our own internal debugging in the kernel(like in the selftests), or debugfs which prints the list of regions, including the regions name. v2: add commentary for our current region name use Signed-off-by: Zbigniew Kempczyński <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Daniel Vetter <[email protected]>
1 parent c9a995e commit c538d54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ int intel_gt_probe_lmem(struct intel_gt *gt)
6868
mem->type = INTEL_MEMORY_LOCAL;
6969
mem->instance = 0;
7070

71+
intel_memory_region_set_name(mem, "local%u", mem->instance);
72+
7173
GEM_BUG_ON(!HAS_REGION(i915, id));
7274
GEM_BUG_ON(i915->mm.regions[id]);
7375
i915->mm.regions[id] = mem;

drivers/gpu/drm/i915/gt/intel_region_lmem.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ region_lmem_init(struct intel_memory_region *mem)
9090
if (ret)
9191
io_mapping_fini(&mem->iomap);
9292

93-
intel_memory_region_set_name(mem, "local");
94-
9593
return ret;
9694
}
9795

0 commit comments

Comments
 (0)