Initialize Tizen 2.3
[adaptation/xorg/driver/xserver-xorg-video-emulfb.git] / src / xv / fbdev_video_types.h
1 /**************************************************************************
2
3 xserver-xorg-video-emulfb
4
5 Copyright 2010 - 2011 Samsung Electronics co., Ltd. All Rights Reserved.
6
7 Contact: Boram Park <boram1288.park@samsung.com>
8
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sub license, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
19 of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 **************************************************************************/
30
31 #ifndef __FBDEV_V4L2_TYPES_H__
32 #define __FBDEV_V4L2_TYPES_H__
33
34 #include <sys/types.h>
35 #include <X11/Xdefs.h>
36
37 #include <linux/videodev2.h>
38
39 enum
40 {
41         OUTPUT_PATH_DMA,        /* FrameBuffer */
42         OUTPUT_PATH_FIMD,       /* LCD */
43 };
44
45 /************************************************************
46  * TYPE DEFINITION
47  ************************************************************/
48 typedef enum v4l2_buf_type FBDevV4l2BufType;
49 typedef enum v4l2_memory   FBDevV4l2Memory;
50
51 #ifndef uint
52 typedef unsigned int uint;
53 #endif
54
55 #ifndef uchar
56 typedef unsigned char uchar;
57 #endif
58
59 #ifndef ushort
60 typedef unsigned short ushort;
61 #endif
62
63 /************************************************************
64  * STRUCTURE
65  ************************************************************/
66 typedef struct _FBDevV4l2Data
67 {
68         __u32   path;
69         __u32   in_format;
70         __u32   out_format;
71         __u32   field;
72         char    in_file_name[50];
73
74         struct v4l2_rect src;
75         struct v4l2_rect crop;
76         struct v4l2_rect dst;
77         struct v4l2_rect win;
78
79         __u32   s_size[3];
80         __u32   src_size;
81         __u32   d_size[3];
82         __u32   dst_size;
83
84         int         rotation;
85 } FBDevV4l2Data;
86
87 typedef struct _FBDevV4l2FimcBuffer
88 {
89         uint    base[3];
90         size_t  length[3];
91 } FBDevV4l2FimcBuffer;
92
93 typedef struct _FBDevV4l2SrcBuffer
94 {
95         int     index;
96         int     size;
97         uchar  *buf;
98 } FBDevV4l2SrcBuffer;
99
100 typedef struct _FBDevV4l2DstBuffer
101 {
102         int     index;
103         int     size;
104         uchar  *buf;
105 } FBDevV4l2DstBuffer;
106
107 #endif