Lines Matching refs:align
25 #define ALIGN_DOWN(value, align) ((value) & ~((align) - 1)) argument
34 static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align,
43 static s32 scan_areas_and_find_fit(struct tcm *tcm, u16 w, u16 h, u16 align,
46 static s32 scan_l2r_t2b(struct tcm *tcm, u16 w, u16 h, u16 align,
49 static s32 scan_r2l_t2b(struct tcm *tcm, u16 w, u16 h, u16 align,
208 static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align, in sita_reserve_2d() argument
215 if (align > 64) in sita_reserve_2d()
219 align = align <= 1 ? 1 : align <= 32 ? 32 : 64; in sita_reserve_2d()
222 ret = scan_areas_and_find_fit(tcm, w, h, align, area); in sita_reserve_2d()
274 static s32 scan_r2l_t2b(struct tcm *tcm, u16 w, u16 h, u16 align, in scan_r2l_t2b() argument
297 start_x = ALIGN_DOWN(start_x - w + 1, align); /* - 1 to be inclusive */ in scan_r2l_t2b()
306 for (x = start_x; x >= end_x; x -= align) { in scan_r2l_t2b()
320 x = ALIGN(map[x][y]->p0.x - w + 1, align); in scan_r2l_t2b()
348 static s32 scan_l2r_t2b(struct tcm *tcm, u16 w, u16 h, u16 align, in scan_l2r_t2b() argument
370 start_x = ALIGN(start_x, align); in scan_l2r_t2b()
382 for (x = start_x; x <= end_x; x += align) { in scan_l2r_t2b()
396 x = ALIGN_DOWN(map[x][y]->p1.x, align); in scan_l2r_t2b()
502 static s32 scan_areas_and_find_fit(struct tcm *tcm, u16 w, u16 h, u16 align, in scan_areas_and_find_fit() argument
510 if (align > 1) { in scan_areas_and_find_fit()
522 ret = scan_l2r_t2b(tcm, w, h, align, &field, area); in scan_areas_and_find_fit()
529 ret = scan_l2r_t2b(tcm, w, h, align, &field, area); in scan_areas_and_find_fit()
531 } else if (align == 1) { in scan_areas_and_find_fit()
543 ret = scan_r2l_t2b(tcm, w, h, align, &field, area); in scan_areas_and_find_fit()
550 ret = scan_r2l_t2b(tcm, w, h, align, &field, in scan_areas_and_find_fit()