summaryrefslogtreecommitdiff
path: root/drivers/video/b2r2/b2r2_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/b2r2/b2r2_utils.h')
-rw-r--r--drivers/video/b2r2/b2r2_utils.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/b2r2/b2r2_utils.h b/drivers/video/b2r2/b2r2_utils.h
index 5db7868e255..4597b2bd684 100644
--- a/drivers/video/b2r2/b2r2_utils.h
+++ b/drivers/video/b2r2/b2r2_utils.h
@@ -15,6 +15,7 @@
extern const s32 b2r2_s32_max;
+int calculate_scale_factor(u32 from, u32 to, u16 *sf_out);
void b2r2_get_img_bounding_rect(struct b2r2_blt_img *img,
struct b2r2_blt_rect *bounding_rect);
@@ -24,7 +25,12 @@ bool b2r2_is_rect_inside_rect(struct b2r2_blt_rect *rect1,
bool b2r2_is_rect_gte_rect(struct b2r2_blt_rect *rect1,
struct b2r2_blt_rect *rect2);
void b2r2_intersect_rects(struct b2r2_blt_rect *rect1,
- struct b2r2_blt_rect *rect2, struct b2r2_blt_rect *intersection);
+ struct b2r2_blt_rect *rect2,
+ struct b2r2_blt_rect *intersection);
+void b2r2_trim_rects(const struct b2r2_blt_req *req,
+ struct b2r2_blt_rect *new_bg_rect,
+ struct b2r2_blt_rect *new_dst_rect,
+ struct b2r2_blt_rect *new_src_rect);
int b2r2_get_fmt_bpp(enum b2r2_blt_fmt fmt);
int b2r2_get_fmt_y_bpp(enum b2r2_blt_fmt fmt);