diff mbox series

[RFC,097/162] drm/i915: Distinction of memory regions

Message ID 20201127120718.454037-98-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show
Series DG1 + LMEM enabling | expand

Commit Message

Matthew Auld Nov. 27, 2020, 12:06 p.m. UTC
From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

IGTs should be able to choose testing strategy depending on memory
regions and its sizes. Add region instance number to make this
easier and descriptive.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Adam Miszczak <adam.miszczak@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 drivers/gpu/drm/i915/intel_memory_region.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Chris Wilson Nov. 27, 2020, 1:30 p.m. UTC | #1
Quoting Matthew Auld (2020-11-27 12:06:13)
> From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> 
> IGTs should be able to choose testing strategy depending on memory
> regions and its sizes. Add region instance number to make this
> easier and descriptive.
> 
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Adam Miszczak <adam.miszczak@intel.com>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_memory_region.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_memory_region.c b/drivers/gpu/drm/i915/intel_memory_region.c
> index 1f26bc06ec20..cea44ddebe46 100644
> --- a/drivers/gpu/drm/i915/intel_memory_region.c
> +++ b/drivers/gpu/drm/i915/intel_memory_region.c
> @@ -329,6 +329,10 @@ int intel_memory_regions_hw_probe(struct drm_i915_private *i915)
>                 mem->instance = instance;
>                 mem->gt = &i915->gt;
>  
> +               if (HAS_LMEM(mem->i915) && type != INTEL_MEMORY_SYSTEM)
> +                       intel_memory_region_set_name(mem, "%s%u",
> +                                                    mem->name, mem->instance);

sprintf(mem->name, "%s", mem->name)

is that even defined behaviour?
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_memory_region.c b/drivers/gpu/drm/i915/intel_memory_region.c
index 1f26bc06ec20..cea44ddebe46 100644
--- a/drivers/gpu/drm/i915/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/intel_memory_region.c
@@ -329,6 +329,10 @@  int intel_memory_regions_hw_probe(struct drm_i915_private *i915)
 		mem->instance = instance;
 		mem->gt = &i915->gt;
 
+		if (HAS_LMEM(mem->i915) && type != INTEL_MEMORY_SYSTEM)
+			intel_memory_region_set_name(mem, "%s%u",
+						     mem->name, mem->instance);
+
 		i915->mm.regions[i] = mem;
 	}