[igt-dev] [PATCH i-g-t 7/9] lib/i915/intel_memory_region: plumb through the cpu_size
Matthew Auld
matthew.auld at intel.com
Wed Jun 29 19:06:56 UTC 2022
Will be useful later.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>
---
lib/i915/intel_memory_region.c | 2 ++
lib/i915/intel_memory_region.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
index 3173507f..93a18982 100644
--- a/lib/i915/intel_memory_region.c
+++ b/lib/i915/intel_memory_region.c
@@ -956,6 +956,8 @@ struct gem_memory_region *__gem_get_memory_regions(int i915)
r->ci = info->regions[i].region;
r->size = info->regions[i].probed_size;
+ /* XXX: replace with probed_cpu_visible_size */
+ r->cpu_size = info->regions[i].rsvd1[0];
if (r->size == -1ull)
r->size = igt_get_avail_ram_mb() << 20;
diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
index 40ff832d..e1bfe0ca 100644
--- a/lib/i915/intel_memory_region.h
+++ b/lib/i915/intel_memory_region.h
@@ -176,6 +176,7 @@ struct gem_memory_region {
struct drm_i915_gem_memory_class_instance ci;
uint64_t size;
+ uint64_t cpu_size;
};
struct igt_collection *
--
2.36.1
More information about the igt-dev
mailing list