2 * Samsung S5P G2D - 2D Graphics Accelerator Driver
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 * Kamil Debski, <k.debski@samsung.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version
13 #include <linux/platform_device.h>
14 #include <media/v4l2-device.h>
15 #include <media/v4l2-ctrls.h>
17 #define G2D_NAME "s5p-g2d"
22 struct v4l2_device v4l2_dev
;
23 struct v4l2_m2m_dev
*m2m_dev
;
24 struct video_device
*vfd
;
32 struct g2d_variant
*variant
;
37 /* Original dimensions */
48 /* Variables that can calculated once and reused */
60 struct v4l2_ctrl
*ctrl_hflip
;
61 struct v4l2_ctrl
*ctrl_vflip
;
62 struct v4l2_ctrl_handler ctrl_handler
;
75 unsigned short hw_rev
;
78 void g2d_reset(struct g2d_dev
*d
);
79 void g2d_set_src_size(struct g2d_dev
*d
, struct g2d_frame
*f
);
80 void g2d_set_src_addr(struct g2d_dev
*d
, dma_addr_t a
);
81 void g2d_set_dst_size(struct g2d_dev
*d
, struct g2d_frame
*f
);
82 void g2d_set_dst_addr(struct g2d_dev
*d
, dma_addr_t a
);
83 void g2d_start(struct g2d_dev
*d
);
84 void g2d_clear_int(struct g2d_dev
*d
);
85 void g2d_set_rop4(struct g2d_dev
*d
, u32 r
);
86 void g2d_set_flip(struct g2d_dev
*d
, u32 r
);
87 void g2d_set_v41_stretch(struct g2d_dev
*d
,
88 struct g2d_frame
*src
, struct g2d_frame
*dst
);
89 void g2d_set_cmd(struct g2d_dev
*d
, u32 c
);