Lines Matching +full:flip +full:- +full:vertical

2  * Copyright (C) 2011-2013 Intel Corporation
33 * drm_rect_intersect - intersect two rectangles
46 r1->x1 = max(r1->x1, r2->x1); in drm_rect_intersect()
47 r1->y1 = max(r1->y1, r2->y1); in drm_rect_intersect()
48 r1->x2 = min(r1->x2, r2->x2); in drm_rect_intersect()
49 r1->y2 = min(r1->y2, r2->y2); in drm_rect_intersect()
65 tmp = mul_u32_u32(src, dst - *clip); in clip_scaled()
78 * drm_rect_clip_scaled - perform a scaled clip operation
84 * the corresponding amounts, retaining the vertical and horizontal scaling
96 diff = clip->x1 - dst->x1; in drm_rect_clip_scaled()
101 src->x1 = src->x2 - new_src_w; in drm_rect_clip_scaled()
102 dst->x1 += diff; in drm_rect_clip_scaled()
104 diff = clip->y1 - dst->y1; in drm_rect_clip_scaled()
109 src->y1 = src->y2 - new_src_h; in drm_rect_clip_scaled()
110 dst->y1 += diff; in drm_rect_clip_scaled()
112 diff = dst->x2 - clip->x2; in drm_rect_clip_scaled()
117 src->x2 = src->x1 + new_src_w; in drm_rect_clip_scaled()
118 dst->x2 -= diff; in drm_rect_clip_scaled()
120 diff = dst->y2 - clip->y2; in drm_rect_clip_scaled()
125 src->y2 = src->y1 + new_src_h; in drm_rect_clip_scaled()
126 dst->y2 -= diff; in drm_rect_clip_scaled()
138 return -EINVAL; in drm_calc_scale()
152 * drm_rect_calc_hscale - calculate the horizontal scaling factor
180 return -ERANGE; in drm_rect_calc_hscale()
187 * drm_rect_calc_vscale - calculate the vertical scaling factor
190 * @min_vscale: minimum allowed vertical scaling factor
191 * @max_vscale: maximum allowed vertical scaling factor
193 * Calculate the vertical scaling factor as
201 * The vertical scaling factor, or errno of out of limits.
215 return -ERANGE; in drm_rect_calc_vscale()
222 * drm_rect_debug_print - print the rectangle information
237 * drm_rect_rotate - Rotate the rectangle
249 * to the vertical axis of the untransformed coordinate
262 r->x1 = width - tmp.x2; in drm_rect_rotate()
263 r->x2 = width - tmp.x1; in drm_rect_rotate()
267 r->y1 = height - tmp.y2; in drm_rect_rotate()
268 r->y2 = height - tmp.y1; in drm_rect_rotate()
277 r->x1 = tmp.y1; in drm_rect_rotate()
278 r->x2 = tmp.y2; in drm_rect_rotate()
279 r->y1 = width - tmp.x2; in drm_rect_rotate()
280 r->y2 = width - tmp.x1; in drm_rect_rotate()
284 r->x1 = width - tmp.x2; in drm_rect_rotate()
285 r->x2 = width - tmp.x1; in drm_rect_rotate()
286 r->y1 = height - tmp.y2; in drm_rect_rotate()
287 r->y2 = height - tmp.y1; in drm_rect_rotate()
291 r->x1 = height - tmp.y2; in drm_rect_rotate()
292 r->x2 = height - tmp.y1; in drm_rect_rotate()
293 r->y1 = tmp.x1; in drm_rect_rotate()
294 r->y2 = tmp.x2; in drm_rect_rotate()
303 * drm_rect_rotate_inv - Inverse rotate the rectangle
316 * to the vertical axis of the original untransformed
317 * coordinate space, so that you never have to flip
337 r->x1 = width - tmp.y2; in drm_rect_rotate_inv()
338 r->x2 = width - tmp.y1; in drm_rect_rotate_inv()
339 r->y1 = tmp.x1; in drm_rect_rotate_inv()
340 r->y2 = tmp.x2; in drm_rect_rotate_inv()
344 r->x1 = width - tmp.x2; in drm_rect_rotate_inv()
345 r->x2 = width - tmp.x1; in drm_rect_rotate_inv()
346 r->y1 = height - tmp.y2; in drm_rect_rotate_inv()
347 r->y2 = height - tmp.y1; in drm_rect_rotate_inv()
351 r->x1 = tmp.y1; in drm_rect_rotate_inv()
352 r->x2 = tmp.y2; in drm_rect_rotate_inv()
353 r->y1 = height - tmp.x2; in drm_rect_rotate_inv()
354 r->y2 = height - tmp.x1; in drm_rect_rotate_inv()
364 r->x1 = width - tmp.x2; in drm_rect_rotate_inv()
365 r->x2 = width - tmp.x1; in drm_rect_rotate_inv()
369 r->y1 = height - tmp.y2; in drm_rect_rotate_inv()
370 r->y2 = height - tmp.y1; in drm_rect_rotate_inv()