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