Lines Matching refs:dsm

80 static bool valid_stolen_size(struct drm_i915_private *i915, struct resource *dsm)  in valid_stolen_size()  argument
82 return (dsm->start != 0 || HAS_LMEMBAR_SMEM_STOLEN(i915)) && dsm->end > dsm->start; in valid_stolen_size()
86 struct resource *dsm) in adjust_stolen() argument
91 if (!valid_stolen_size(i915, dsm)) in adjust_stolen()
102 struct resource stolen[2] = {*dsm, *dsm}; in adjust_stolen()
122 *dsm = stolen[0]; in adjust_stolen()
124 *dsm = stolen[1]; in adjust_stolen()
132 dsm); in adjust_stolen()
136 if (!valid_stolen_size(i915, dsm)) in adjust_stolen()
143 struct resource *dsm) in request_smem_stolen() argument
163 r = devm_request_mem_region(i915->drm.dev, dsm->start, in request_smem_stolen()
164 resource_size(dsm), in request_smem_stolen()
176 r = devm_request_mem_region(i915->drm.dev, dsm->start + 1, in request_smem_stolen()
177 resource_size(dsm) - 2, in request_smem_stolen()
186 dsm); in request_smem_stolen()
212 resource_size_t stolen_top = i915->dsm.stolen.end + 1; in g4x_get_stolen_reserved()
277 resource_size_t stolen_top = i915->dsm.stolen.end + 1; in vlv_get_stolen_reserved()
366 resource_size_t stolen_top = i915->dsm.stolen.end + 1; in bdw_get_stolen_reserved()
431 stolen_top = i915->dsm.stolen.end + 1; in init_reserved_stolen()
472 i915->dsm.reserved = DEFINE_RES_MEM(reserved_base, reserved_size); in init_reserved_stolen()
474 if (!resource_contains(&i915->dsm.stolen, &i915->dsm.reserved)) { in init_reserved_stolen()
477 &i915->dsm.reserved, &i915->dsm.stolen); in init_reserved_stolen()
485 i915->dsm.reserved = DEFINE_RES_MEM(reserved_base, 0); in init_reserved_stolen()
516 i915->dsm.stolen = mem->region; in i915_gem_init_stolen()
522 mem->region.end = i915->dsm.reserved.start - 1; in i915_gem_init_stolen()
525 i915->dsm.usable_size = resource_size(&mem->region); in i915_gem_init_stolen()
529 (u64)resource_size(&i915->dsm.stolen) >> 10, in i915_gem_init_stolen()
530 (u64)i915->dsm.usable_size >> 10); in i915_gem_init_stolen()
532 if (i915->dsm.usable_size == 0) in i915_gem_init_stolen()
536 drm_mm_init(&i915->mm.stolen, 0, i915->dsm.usable_size); in i915_gem_init_stolen()
586 GEM_BUG_ON(range_overflows(offset, size, resource_size(&i915->dsm.stolen))); in i915_pages_create_for_stolen()
606 sg_dma_address(sg) = (dma_addr_t)i915->dsm.stolen.start + offset; in i915_pages_create_for_stolen()