5aca4d8ea3e2e4a8b0bd7c6c07c6962aef99862e
[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 typedef struct _emgd_drm_config {
76         /**
77          * Whether the EMGD kernel/DRM module should initialize the display at
78          * startup time (1=yes, 0=no).
79          */
80         int init;
81         /** The display configuration to use if initializing the display. */
82         int dc;
83         /** The width to use if initializing the display. */
84         int width;
85         /** The height to use if initializing the display. */
86         int height;
87         /** The refresh rate to use if initializing the display. */
88         int refresh;
89         /** Enable Kernel Mode Set */
90         int kms;
91         /** Overlay Brightness */
92         unsigned long ovl_brightness;
93         /** Overlay Contrast */
94         unsigned long ovl_contrast;
95         /** Overlay Saturation */
96         unsigned long ovl_saturation;
97         /** Overlay Gamma Correction - Red */
98         unsigned long ovl_gamma_red;
99         /** Overlay Gamma Correction - Green */
100         unsigned long ovl_gamma_green;
101         /** Overlay Gamma Correction - Blue */
102         unsigned long ovl_gamma_blue;
103         /** The splash screen data if specified by the user. */
104         emgd_drm_splash_screen_t *ss_data;
105         /** The splash video data if specified by the user. */
106         emgd_drm_splash_video_t *sv_data;
107         /** Array of other parameters (one per configid), used by the hardware
108          * abstraction layer code.
109          */
110         igd_param_t **hal_params;
111 } emgd_drm_config_t;
112
113 #endif