1 | /* |
2 | Copyright (c) 2012, Broadcom Europe Ltd |
3 | All rights reserved. |
4 | |
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the following conditions are met: |
7 | * Redistributions of source code must retain the above copyright |
8 | notice, this list of conditions and the following disclaimer. |
9 | * Redistributions in binary form must reproduce the above copyright |
10 | notice, this list of conditions and the following disclaimer in the |
11 | documentation and/or other materials provided with the distribution. |
12 | * Neither the name of the copyright holder nor the |
13 | names of its contributors may be used to endorse or promote products |
14 | derived from this software without specific prior written permission. |
15 | |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY |
20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ |
27 | |
28 | /*============================================================================= |
29 | Common image types used by the vc_image library. |
30 | =============================================================================*/ |
31 | |
32 | #ifndef INTERFACE_VC_DISPLAY_TYPES_H |
33 | #define INTERFACE_VC_DISPLAY_TYPES_H |
34 | |
35 | //enums of display input format |
36 | typedef enum |
37 | { |
38 | VCOS_DISPLAY_INPUT_FORMAT_INVALID = 0, |
39 | VCOS_DISPLAY_INPUT_FORMAT_RGB888, |
40 | VCOS_DISPLAY_INPUT_FORMAT_RGB565 |
41 | } |
42 | VCOS_DISPLAY_INPUT_FORMAT_T; |
43 | |
44 | /** For backward compatibility */ |
45 | #define DISPLAY_INPUT_FORMAT_INVALID VCOS_DISPLAY_INPUT_FORMAT_INVALID |
46 | #define DISPLAY_INPUT_FORMAT_RGB888 VCOS_DISPLAY_INPUT_FORMAT_RGB888 |
47 | #define DISPLAY_INPUT_FORMAT_RGB565 VCOS_DISPLAY_INPUT_FORMAT_RGB565 |
48 | typedef VCOS_DISPLAY_INPUT_FORMAT_T DISPLAY_INPUT_FORMAT_T; |
49 | |
50 | // Enum determining how image data for 3D displays has to be supplied |
51 | typedef enum |
52 | { |
53 | DISPLAY_3D_UNSUPPORTED = 0, // default |
54 | DISPLAY_3D_INTERLEAVED, // For autosteroscopic displays |
55 | DISPLAY_3D_SBS_FULL_AUTO, // Side-By-Side, Full Width (also used by some autostereoscopic displays) |
56 | DISPLAY_3D_SBS_HALF_HORIZ, // Side-By-Side, Half Width, Horizontal Subsampling (see HDMI spec) |
57 | DISPLAY_3D_TB_HALF, // Top-bottom 3D |
58 | DISPLAY_3D_FRAME_PACKING, // Frame Packed 3D |
59 | DISPLAY_3D_FRAME_SEQUENTIAL, // Output left on even frames and right on odd frames (typically 120Hz) |
60 | DISPLAY_3D_FORMAT_MAX |
61 | } DISPLAY_3D_FORMAT_T; |
62 | |
63 | //enums of display types |
64 | typedef enum |
65 | { |
66 | DISPLAY_INTERFACE_MIN, |
67 | DISPLAY_INTERFACE_SMI, |
68 | DISPLAY_INTERFACE_DPI, |
69 | DISPLAY_INTERFACE_DSI, |
70 | DISPLAY_INTERFACE_LVDS, |
71 | DISPLAY_INTERFACE_MAX |
72 | |
73 | } DISPLAY_INTERFACE_T; |
74 | |
75 | /* display dither setting, used on B0 */ |
76 | typedef enum { |
77 | DISPLAY_DITHER_NONE = 0, /* default if not set */ |
78 | DISPLAY_DITHER_RGB666 = 1, |
79 | DISPLAY_DITHER_RGB565 = 2, |
80 | DISPLAY_DITHER_RGB555 = 3, |
81 | DISPLAY_DITHER_MAX |
82 | } DISPLAY_DITHER_T; |
83 | |
84 | struct PIXELVALVE_PERIPH_SETUP_S; |
85 | typedef struct PIXELVALVE_PERIPH_SETUP_S PIXELVALVE_PERIPH_SETUP_T; |
86 | |
87 | //info struct |
88 | typedef struct |
89 | { |
90 | //type |
91 | DISPLAY_INTERFACE_T type; |
92 | //width / height |
93 | uint32_t width; |
94 | uint32_t height; |
95 | //output format |
96 | DISPLAY_INPUT_FORMAT_T input_format; |
97 | //interlaced? |
98 | uint32_t interlaced; |
99 | /* output dither setting (if required) */ |
100 | DISPLAY_DITHER_T output_dither; |
101 | /* Pixel frequency */ |
102 | uint32_t pixel_freq; |
103 | /* Line rate in lines per second */ |
104 | uint32_t line_rate; |
105 | // Format required for image data for 3D displays |
106 | DISPLAY_3D_FORMAT_T format_3d; |
107 | // If display requires PV1 (e.g. DSI1), special config is required in HVS |
108 | uint32_t use_pixelvalve; |
109 | // Set for DSI displays which use video mode. |
110 | uint32_t dsi_video_mode; |
111 | // Select HVS channel (usually 0). |
112 | uint32_t hvs_channel; |
113 | // transform required to get the display correctly oriented landscape |
114 | uint32_t transform; |
115 | // pixel valve setup for detailed timings |
116 | PIXELVALVE_PERIPH_SETUP_T *pv_setup; |
117 | } DISPLAY_INFO_T; |
118 | |
119 | #endif /* __VC_INCLUDE_IMAGE_TYPES_H__ */ |
120 | |
121 | |
122 | |