Message ID | 20220525183702.490989-8-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t,1/9] lib/i915_drm_local: Add I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS | expand |
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 *
Will be useful later. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> --- lib/i915/intel_memory_region.c | 2 ++ lib/i915/intel_memory_region.h | 1 + 2 files changed, 3 insertions(+)