Lines Matching refs:w
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,
58 static s32 is_area_free(struct tcm_area ***map, u16 x0, u16 y0, u16 w, u16 h);
60 static s32 update_candidate(struct tcm *tcm, u16 x0, u16 y0, u16 w, u16 h,
208 static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align, in sita_reserve_2d() argument
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
293 if (w > LEN(start_x, end_x) || h > LEN(end_y, start_y)) in scan_r2l_t2b()
297 start_x = ALIGN_DOWN(start_x - w + 1, align); /* - 1 to be inclusive */ in scan_r2l_t2b()
307 if (is_area_free(map, x, y, w, h)) { in scan_r2l_t2b()
311 if (update_candidate(tcm, x, y, w, h, field, 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
367 if (w > LEN(end_x, start_x) || h > LEN(end_y, start_y)) in scan_l2r_t2b()
373 if (w > LEN(end_x, start_x)) in scan_l2r_t2b()
377 end_x = end_x - w + 1; /* + 1 to be inclusive */ in scan_l2r_t2b()
383 if (is_area_free(map, x, y, w, h)) { in scan_l2r_t2b()
387 if (update_candidate(tcm, x, y, w, h, field, 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
516 if (w > pvt->div_pt.x) 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()
537 if (w > (tcm->width - pvt->div_pt.x)) 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()
559 static s32 is_area_free(struct tcm_area ***map, u16 x0, u16 y0, u16 w, u16 h) in is_area_free() argument
563 for (x = x0; x < x0 + w; x++) { in is_area_free()
602 static s32 update_candidate(struct tcm *tcm, u16 x0, u16 y0, u16 w, u16 h, in update_candidate() argument
615 assign(&me.a, x0, y0, x0 + w - 1, y0 + h - 1); in update_candidate()