[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 May 25 18:37:00 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>
---
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 da81650d..2dd4c156 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 = intel_get_avail_ram_mb() << 20;
diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
index 5aa163dd..8ee1ed9b 100644
--- a/lib/i915/intel_memory_region.h
+++ b/lib/i915/intel_memory_region.h
@@ -155,6 +155,7 @@ struct gem_memory_region {
struct drm_i915_gem_memory_class_instance ci;
uint64_t size;
+ uint64_t cpu_size;
};
struct igt_collection *
--
2.34.3
More information about the igt-dev
mailing list