static void
i915_ttm_place_from_region(const struct intel_memory_region *mr,
- struct ttm_place *place)
+ struct ttm_place *place,
+ unsigned int flags)
{
memset(place, 0, sizeof(*place));
place->mem_type = intel_region_to_ttm_type(mr);
+
+ if (flags & I915_BO_ALLOC_CONTIGUOUS)
+ place->flags = TTM_PL_FLAG_CONTIGUOUS;
}
static void
struct ttm_placement *placement)
{
unsigned int num_allowed = obj->mm.n_placements;
+ unsigned int flags = obj->flags;
unsigned int i;
placement->num_placement = 1;
i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] :
- obj->mm.region, requested);
+ obj->mm.region, requested, flags);
/* Cache this on object? */
placement->num_busy_placement = num_allowed;
for (i = 0; i < placement->num_busy_placement; ++i)
- i915_ttm_place_from_region(obj->mm.placements[i], busy + i);
+ i915_ttm_place_from_region(obj->mm.placements[i], busy + i, flags);
if (num_allowed == 0) {
*busy = *requested;