intel: Add intel_memory_class_instance

This is a KMD independent struct to hold memory class and instance
values.

drm_i915_gem_memory_class_instance usage will be gradually replaced.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20948>
This commit is contained in:
José Roberto de Souza
2022-10-21 11:22:39 -07:00
committed by Marge Bot
parent cc0b749890
commit 9fc224631c
5 changed files with 27 additions and 22 deletions
+6 -6
View File
@@ -406,22 +406,22 @@ anv_init_meminfo(struct anv_physical_device *device, int fd)
{
const struct intel_device_info *devinfo = &device->info;
device->sys.region.memory_class = devinfo->mem.sram.mem_class;
device->sys.region.memory_instance = devinfo->mem.sram.mem_instance;
device->sys.region.memory_class = devinfo->mem.sram.mem.klass;
device->sys.region.memory_instance = devinfo->mem.sram.mem.instance;
device->sys.size =
anv_compute_sys_heap_size(device, devinfo->mem.sram.mappable.size);
device->sys.available = devinfo->mem.sram.mappable.free;
device->vram_mappable.region.memory_class = devinfo->mem.vram.mem_class;
device->vram_mappable.region.memory_class = devinfo->mem.vram.mem.klass;
device->vram_mappable.region.memory_instance =
devinfo->mem.vram.mem_instance;
devinfo->mem.vram.mem.instance;
device->vram_mappable.size = devinfo->mem.vram.mappable.size;
device->vram_mappable.available = devinfo->mem.vram.mappable.free;
device->vram_non_mappable.region.memory_class =
devinfo->mem.vram.mem_class;
devinfo->mem.vram.mem.klass;
device->vram_non_mappable.region.memory_instance =
devinfo->mem.vram.mem_instance;
devinfo->mem.vram.mem.instance;
device->vram_non_mappable.size = devinfo->mem.vram.unmappable.size;
device->vram_non_mappable.available = devinfo->mem.vram.unmappable.free;