staging: emgd: IVI display configuration
[profile/ivi/intel-emgd-kmod.git] / emgd / drm / user_config.h
1 /*
2  *-----------------------------------------------------------------------------
3  * Filename: user_config.h
4  * $Revision: 1.8 $
5  *-----------------------------------------------------------------------------
6  * Copyright (c) 2002-2010, Intel Corporation.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a copy
9  * of this software and associated documentation files (the "Software"), to deal
10  * in the Software without restriction, including without limitation the rights
11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12  * copies of the Software, and to permit persons to whom the Software is
13  * furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included in
16  * all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24  * THE SOFTWARE.
25  *
26  *-----------------------------------------------------------------------------
27  * Description:
28  *  Data structure containing the initial display configuration information of
29  *  the EMGD kernel module.
30  *-----------------------------------------------------------------------------
31  */
32 #ifndef _USER_CONFIG_H_
33 #define _USER_CONFIG_H_
34
35 #include "igd_init.h"
36 #include "igd_mode.h"
37
38 /*
39  * Splash Screen data provided by the user.
40  */
41 typedef struct _emgd_drm_splash_screen {
42         unsigned long bg_color;
43         unsigned long x;
44         unsigned long y;
45         unsigned long width;
46         unsigned long height;
47 } emgd_drm_splash_screen_t;
48
49 /*
50  * Splash Video data provided by the user.
51  */
52 typedef struct _emgd_drm_splash_video {
53         unsigned long offset;
54         unsigned long pixel_format;
55         unsigned long src_width;
56         unsigned long src_height;
57         unsigned long src_pitch;
58         unsigned long dst_x;
59         unsigned long dst_y;
60         unsigned long dst_width;
61         unsigned long dst_height;
62 } emgd_drm_splash_video_t;
63
64 /**
65  * User-configurable parameters.  This structure is the basis for the
66  * user_config.c" file, which allows compile-time customization of the EMGD DRM
67  * module.
68  *
69  * Besides the igd_param_t values, the other options in this structure
70  * correspond to EMGD module parameters of the same name.  Most are only
71  * applicable if the init option is non-zero.  There is one additional module
72  * parameter ("portorder") that corresponds to the port_order member of the
73  * igd_param_t structure.
74  */
75
76 #define USER_CONFIG_NUM 3
77
78 typedef struct _emgd_drm_config {
79         /**
80          * Whether the EMGD kernel/DRM module should initialize the display at
81          * startup time (1=yes, 0=no).
82          */
83         int init;
84         /** The display configuration to use if initializing the display. */
85         int dc;
86         /** The width to use if initializing the display. */
87         int width;
88         /** The height to use if initializing the display. */
89         int height;
90         /** The refresh rate to use if initializing the display. */
91         int refresh;
92         /** Enable Kernel Mode Set */
93         int kms;
94         /** Overlay Brightness */
95         unsigned long ovl_brightness;
96         /** Overlay Contrast */
97         unsigned long ovl_contrast;
98         /** Overlay Saturation */
99         unsigned long ovl_saturation;
100         /** Overlay Gamma Correction - Red */
101         unsigned long ovl_gamma_red;
102         /** Overlay Gamma Correction - Green */
103         unsigned long ovl_gamma_green;
104         /** Overlay Gamma Correction - Blue */
105         unsigned long ovl_gamma_blue;
106         /** The splash screen data if specified by the user. */
107         emgd_drm_splash_screen_t *ss_data;
108         /** The splash video data if specified by the user. */
109         emgd_drm_splash_video_t *sv_data;
110         /** Array of other parameters (one per configid), used by the hardware
111          * abstraction layer code.
112          */
113         igd_param_t *hal_params[USER_CONFIG_NUM];
114 } emgd_drm_config_t;
115
116 #endif