1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Samsung S5P G2D - 2D Graphics Accelerator Driver
5 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
6 * Kamil Debski, <k.debski@samsung.com>
9 #include <linux/platform_device.h>
10 #include <media/v4l2-device.h>
11 #include <media/v4l2-ctrls.h>
13 #define G2D_NAME "s5p-g2d"
18 struct v4l2_device v4l2_dev
;
19 struct v4l2_m2m_dev
*m2m_dev
;
20 struct video_device
*vfd
;
28 struct g2d_variant
*variant
;
33 /* Original dimensions */
44 /* Variables that can calculated once and reused */
56 struct v4l2_ctrl
*ctrl_hflip
;
57 struct v4l2_ctrl
*ctrl_vflip
;
58 struct v4l2_ctrl_handler ctrl_handler
;
70 unsigned short hw_rev
;
73 void g2d_reset(struct g2d_dev
*d
);
74 void g2d_set_src_size(struct g2d_dev
*d
, struct g2d_frame
*f
);
75 void g2d_set_src_addr(struct g2d_dev
*d
, dma_addr_t a
);
76 void g2d_set_dst_size(struct g2d_dev
*d
, struct g2d_frame
*f
);
77 void g2d_set_dst_addr(struct g2d_dev
*d
, dma_addr_t a
);
78 void g2d_start(struct g2d_dev
*d
);
79 void g2d_clear_int(struct g2d_dev
*d
);
80 void g2d_set_rop4(struct g2d_dev
*d
, u32 r
);
81 void g2d_set_flip(struct g2d_dev
*d
, u32 r
);
82 void g2d_set_v41_stretch(struct g2d_dev
*d
,
83 struct g2d_frame
*src
, struct g2d_frame
*dst
);
84 void g2d_set_cmd(struct g2d_dev
*d
, u32 c
);