drm/i915: Add stable memory region names
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 7 Nov 2023 10:18:05 +0000 (10:18 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 10 Nov 2023 11:49:06 +0000 (11:49 +0000)
commit3b38d35157530c12c84fc02cccd469b9a0a00ae7
treef9805157cbd86606a8a5c4ba4a45c5df0a43fd6a
parentdc1a2775070f0618b661500310b2ea8643592ed1
drm/i915: Add stable memory region names

At the moment memory region names are a bit too varied and too
inconsistent to be used for ABI purposes, like for upcoming fdinfo
memory stats.

System memory can be either system or system-ttm. Local memory has the
instance number appended, others do not. Not only incosistent but thi
kind of implementation detail is uninteresting for intended users of
fdinfo memory stats.

Add a stable name always formed as $type$instance. Could have chosen a
different stable scheme, but I think any consistent and stable scheme
should do just fine.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-5-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/intel_memory_region.c
drivers/gpu/drm/i915/intel_memory_region.h