• Home
  • Raw
  • Download

Lines Matching refs:mem

395 static int i915_gem_init_stolen(struct intel_memory_region *mem)  in i915_gem_init_stolen()  argument
397 struct drm_i915_private *i915 = mem->i915; in i915_gem_init_stolen()
418 if (resource_size(&mem->region) == 0) in i915_gem_init_stolen()
421 i915->dsm = mem->region; in i915_gem_init_stolen()
482 mem->region.end = reserved_base - 1; in i915_gem_init_stolen()
483 mem->io_size = min(mem->io_size, resource_size(&mem->region)); in i915_gem_init_stolen()
632 static int __i915_gem_object_create_stolen(struct intel_memory_region *mem, in __i915_gem_object_create_stolen() argument
647 drm_gem_private_object_init(&mem->i915->drm, &obj->base, stolen->size); in __i915_gem_object_create_stolen()
652 cache_level = HAS_LLC(mem->i915) ? I915_CACHE_LLC : I915_CACHE_NONE; in __i915_gem_object_create_stolen()
658 i915_gem_object_init_memory_region(obj, mem); in __i915_gem_object_create_stolen()
668 static int _i915_gem_object_stolen_init(struct intel_memory_region *mem, in _i915_gem_object_stolen_init() argument
675 struct drm_i915_private *i915 = mem->i915; in _i915_gem_object_stolen_init()
689 if (mem->type == INTEL_MEMORY_STOLEN_LOCAL && !mem->io_size && in _i915_gem_object_stolen_init()
709 mem->min_page_size); in _i915_gem_object_stolen_init()
714 ret = __i915_gem_object_create_stolen(mem, obj, stolen); in _i915_gem_object_stolen_init()
734 static int init_stolen_smem(struct intel_memory_region *mem) in init_stolen_smem() argument
740 return i915_gem_init_stolen(mem); in init_stolen_smem()
743 static int release_stolen_smem(struct intel_memory_region *mem) in release_stolen_smem() argument
745 i915_gem_cleanup_stolen(mem->i915); in release_stolen_smem()
755 static int init_stolen_lmem(struct intel_memory_region *mem) in init_stolen_lmem() argument
759 if (GEM_WARN_ON(resource_size(&mem->region) == 0)) in init_stolen_lmem()
767 err = i915_gem_init_stolen(mem); in init_stolen_lmem()
771 if (mem->io_size && !io_mapping_init_wc(&mem->iomap, in init_stolen_lmem()
772 mem->io_start, in init_stolen_lmem()
773 mem->io_size)) { in init_stolen_lmem()
781 i915_gem_cleanup_stolen(mem->i915); in init_stolen_lmem()
785 static int release_stolen_lmem(struct intel_memory_region *mem) in release_stolen_lmem() argument
787 if (mem->io_size) in release_stolen_lmem()
788 io_mapping_fini(&mem->iomap); in release_stolen_lmem()
789 i915_gem_cleanup_stolen(mem->i915); in release_stolen_lmem()
806 struct intel_memory_region *mem; in i915_gem_stolen_lmem_setup() local
842 mem = intel_memory_region_create(i915, dsm_base, dsm_size, in i915_gem_stolen_lmem_setup()
847 if (IS_ERR(mem)) in i915_gem_stolen_lmem_setup()
848 return mem; in i915_gem_stolen_lmem_setup()
857 &mem->io_start); in i915_gem_stolen_lmem_setup()
860 intel_memory_region_set_name(mem, "stolen-local"); in i915_gem_stolen_lmem_setup()
862 mem->private = true; in i915_gem_stolen_lmem_setup()
864 return mem; in i915_gem_stolen_lmem_setup()
871 struct intel_memory_region *mem; in i915_gem_stolen_smem_setup() local
873 mem = intel_memory_region_create(i915, in i915_gem_stolen_smem_setup()
878 if (IS_ERR(mem)) in i915_gem_stolen_smem_setup()
879 return mem; in i915_gem_stolen_smem_setup()
881 intel_memory_region_set_name(mem, "stolen-system"); in i915_gem_stolen_smem_setup()
883 mem->private = true; in i915_gem_stolen_smem_setup()
884 return mem; in i915_gem_stolen_smem_setup()