• Home
  • Raw
  • Download

Lines Matching refs:pos

36 static void free_slots(unsigned long pos, u16 w, u16 h,  in free_slots()  argument
41 for (i = 0; i < h; i++, pos += stride) in free_slots()
42 bitmap_clear(map, pos, w); in free_slots()
51 static int r2l_b2t_1d(u16 w, unsigned long *pos, unsigned long *map, in r2l_b2t_1d() argument
58 *pos = num_bits - w; in r2l_b2t_1d()
61 bit = find_next_bit(map, num_bits, *pos); in r2l_b2t_1d()
63 if (bit - *pos >= w) { in r2l_b2t_1d()
65 bitmap_set(map, *pos, w); in r2l_b2t_1d()
71 *pos = bit - w; in r2l_b2t_1d()
88 unsigned long *pos, unsigned long slot_bytes, in l2r_t2b() argument
105 *pos = bitmap_find_next_zero_area(map, num_bits, curr_bit, w, in l2r_t2b()
109 if (bit_offset > 0 && (*pos % slots_per_band != bit_offset)) { in l2r_t2b()
110 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b()
115 if ((*pos % slot_stride) + w > slot_stride) { in l2r_t2b()
116 curr_bit = ALIGN(*pos, slot_stride) + bit_offset; in l2r_t2b()
123 if ((*pos + slot_stride * h) > num_bits) in l2r_t2b()
128 bitmap_set(mask, (*pos % BITS_PER_LONG), w); in l2r_t2b()
135 index = *pos / BITS_PER_LONG + i * 8; in l2r_t2b()
137 (*pos % BITS_PER_LONG) + w)) { in l2r_t2b()
148 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b()
150 curr_bit = *pos + a + 1; in l2r_t2b()
155 for (i = 0, index = *pos; i < h; i++, index += slot_stride) in l2r_t2b()
165 unsigned long pos; in sita_reserve_1d() local
169 ret = r2l_b2t_1d(num_slots, &pos, tcm->bitmap, tcm->map_size); in sita_reserve_1d()
171 area->p0.x = pos % tcm->width; in sita_reserve_1d()
172 area->p0.y = pos / tcm->width; in sita_reserve_1d()
173 area->p1.x = (pos + num_slots - 1) % tcm->width; in sita_reserve_1d()
174 area->p1.y = (pos + num_slots - 1) / tcm->width; in sita_reserve_1d()
185 unsigned long pos; in sita_reserve_2d() local
189 ret = l2r_t2b(w, h, align, offset, &pos, slot_bytes, tcm->bitmap, in sita_reserve_2d()
193 area->p0.x = pos % tcm->width; in sita_reserve_2d()
194 area->p0.y = pos / tcm->width; in sita_reserve_2d()
210 unsigned long pos; in sita_free() local
213 pos = area->p0.x + area->p0.y * tcm->width; in sita_free()
218 w = area->p1.x + area->p1.y * tcm->width - pos + 1; in sita_free()
223 free_slots(pos, w, h, tcm->bitmap, tcm->width); in sita_free()