2 *-----------------------------------------------------------------------------
3 * Filename: user_config.c
5 *-----------------------------------------------------------------------------
6 * Copyright (c) 2002-2010, Intel Corporation.
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:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
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
26 *-----------------------------------------------------------------------------
28 * A file that contains the initial display configuration information of the
29 * EMGD kernel module. A user can edit this file in order to affect the way
30 * that the kernel initially configures the displays. This file is compiled
31 * into the EMGD kernel module.
32 *-----------------------------------------------------------------------------
34 #include "user_config.h"
37 #warning **** This driver has NOT been configured for your system. You are
38 #warning **** building with a sample user_config.c configuration that may or
39 #warning **** may not meet your needs. It is recommended that you run CED to
40 #warning **** generate an appropriate configuration or see the User Guide
41 #warning **** for more information about driver configuration.
46 * One array of igd_display_info_t structures should exist for each port that
47 * needs to provide a DTD list. Each igd_display_info_t contains the DTD
48 * information for a given resolution/refresh-rate. This is especially needed
49 * for analog/VGA ports.
53 static igd_display_info_t dtd_config1_port4_dtdlist[] = {
58 31746, /* Dot Clock */
59 999, /* Horizontal Total (horizontal synch end) */
60 799, /* Horizontal Blank Start (h_active-1) */
61 999, /* Horizontal Blank End (start + h_blank) */
62 859, /* Horizontal Sync Start (h_active+h_synch-1) */
63 999, /* Horizontal Sync End (start + h_syncp) */
64 524, /* Vertical Total (Vertical synch end) */
65 479, /* Vertical Blank Start (v_active-1) */
66 524, /* Vertical Blank End (start + v_blank) */
67 507, /* Vertical Sync Start (v_active+v_synch-1) */
68 538, /* Vertical Sync End (start + v_synchp) */
70 0x8020000, /* Flags */
73 NULL, /* pd extension pointer */
74 0, 0 /* mode extension pointer */
77 static igd_param_attr_t attrs_config1_port4[] = {
84 static igd_display_info_t dtd_config2_port4_dtdlist[] = {
88 60, /* Refresh Rate */
89 72300, /* Dot Clock */
90 1525, /* Horizontal Total (horizontal synch end) */
91 1365, /* Horizontal Blank Start (h_active-1) */
92 1525, /* Horizontal Blank End (start + h_blank) */
93 1413, /* Horizontal Sync Start (h_active+h_synch-1) */
94 1445, /* Horizontal Sync End (start + h_syncp) */
95 789, /* Vertical Total (Vertical synch end) */
96 767, /* Vertical Blank Start (v_active-1) */
97 789, /* Vertical Blank End (start + v_blank) */
98 770, /* Vertical Sync Start (v_active+v_synch-1) */
99 775, /* Vertical Sync End (start + v_synchp) */
104 NULL, /* pd extension pointer */
105 0, 0 /* mode extension pointer */
108 /* shares attributes with config1 */
110 /* NexCom VCT1000 7' */
111 static igd_display_info_t dtd_config3_port4_dtdlist[] = {
115 0, /* Refresh Rate */
116 31746, /* Dot Clock */
117 999, /* Horizontal Total (horizontal synch end) */
118 799, /* Horizontal Blank Start (h_active-1) */
119 999, /* Horizontal Blank End (start + h_blank) */
120 859, /* Horizontal Sync Start (h_active+h_synch-1) */
121 999, /* Horizontal Sync End (start + h_syncp) */
122 524, /* Vertical Total (Vertical synch end) */
123 479, /* Vertical Blank Start (v_active-1) */
124 524, /* Vertical Blank End (start + v_blank) */
125 507, /* Vertical Sync Start (v_active+v_synch-1) */
126 538, /* Vertical Sync End (start + v_synchp) */
128 0x8020000, /* Flags */
131 NULL, /* pd extension pointer */
132 0, 0 /* mode extension pointer */
135 static igd_param_attr_t attrs_config3_port4[] = {
142 static emgd_drm_splash_screen_t splash_screen_data = {
143 0x000000, /* bg_color */
150 static emgd_drm_splash_video_t splash_video_data = {
152 0, /* pixel_format */
162 /* Config #1: Crossville 7' */
163 static igd_param_t config_params_config1 = {
164 1*256*1024, /* Page request */
165 0, /* Max frame buffer size */
166 1, /* Preserve registers */
167 0x6, /* Display flags */
168 { 4, 0, 0, 0, 0 }, /* Display port order */
169 { /* Display Params */
171 4, /* Display port number */
172 0x180, /* Parameters present */
174 0x0, /* Flags when EDID is available */
175 0x4, /* Flags when EDID is not available */
176 0, /* DDC GPIO pins */
179 0, /* I2C GPIO pins */
182 { /* Flat Panel Info */
183 0, /* Flat Panel width */
184 0, /* Flat Panel height */
185 0, /* Flat Panel power method */
186 0, /* VDD active & DVO clock/data active */
187 0, /* DVO clock/data active & backlight enable */
188 0, /* backlight disable & DVO clock/data inactive */
189 0, /* DVO clock/data inactive & VDD inactive */
190 0 /* VDD inactive & VDD active */
193 sizeof(dtd_config1_port4_dtdlist)/sizeof(igd_display_info_t), /* Number of DTDs */
194 dtd_config1_port4_dtdlist /* DTD name */
196 { /* Attribute Info */
197 sizeof(attrs_config1_port4)/sizeof(igd_param_attr_t), /* Number of attributes */
198 attrs_config1_port4 /* Attr name */
202 2, /* Display port number */
203 0x0, /* Parameters present */
205 0x5, /* Flags when EDID is available */
206 0x5, /* Flags when EDID is not available */
207 0, /* DDC GPIO pins */
210 0, /* I2C GPIO pins */
213 { /* Flat Panel Info */
214 0, /* Flat Panel width */
215 0, /* Flat Panel height */
216 0, /* Flat Panel power method */
217 0, /* VDD active & DVO clock/data active */
218 0, /* DVO clock/data active & backlight enable */
219 0, /* backlight disable & DVO clock/data inactive */
220 0, /* DVO clock/data inactive & VDD inactive */
221 0 /* VDD inactive & VDD active */
226 { /* Attribute Info */
231 0, /* 24-bit RGB color that framebuffer is cleared to */
232 1, /* Quickboot (1 = enabled) */
233 0, /* Quickboot seamless (1 = enabled) */
234 0, /* Quickboot video input (1 = enabled) */
235 0 /* Polling (1 = override interrupt support and use polling) */
238 /* Config #2: CrownBay 13' */
239 static igd_param_t config_params_config2 = {
240 1*256*1024, /* Page request */
241 0, /* Max frame buffer size */
242 1, /* Preserve registers */
243 0x6, /* Display flags */
244 { 4, 0, 0, 0, 0 }, /* Display port order */
245 { /* Display Params */
247 4, /* Display port number */
248 0x80, /* Parameters present */
250 0x5, /* Flags when EDID is available */
251 0x5, /* Flags when EDID is not available */
252 0, /* DDC GPIO pins */
255 0, /* I2C GPIO pins */
258 { /* Flat Panel Info */
259 0, /* Flat Panel width */
260 0, /* Flat Panel height */
261 0, /* Flat Panel power method */
262 0, /* VDD active & DVO clock/data active */
263 0, /* DVO clock/data active & backlight enable */
264 0, /* backlight disable & DVO clock/data inactive */
265 0, /* DVO clock/data inactive & VDD inactive */
266 0 /* VDD inactive & VDD active */
269 sizeof(dtd_config2_port4_dtdlist)/sizeof(igd_display_info_t), /* Number of DTDs */
270 dtd_config2_port4_dtdlist /* DTD name */
272 { /* Attribute Info */
273 sizeof(attrs_config1_port4)/sizeof(igd_param_attr_t), /* Number of attributes */
274 attrs_config1_port4 /* Attr name */
278 2, /* Display port number */
279 0x0, /* Parameters present */
281 0x5, /* Flags when EDID is available */
282 0x5, /* Flags when EDID is not available */
283 0, /* DDC GPIO pins */
286 0, /* I2C GPIO pins */
289 { /* Flat Panel Info */
290 0, /* Flat Panel width */
291 0, /* Flat Panel height */
292 0, /* Flat Panel power method */
293 0, /* VDD active & DVO clock/data active */
294 0, /* DVO clock/data active & backlight enable */
295 0, /* backlight disable & DVO clock/data inactive */
296 0, /* DVO clock/data inactive & VDD inactive */
297 0 /* VDD inactive & VDD active */
302 { /* Attribute Info */
307 0, /* 24-bit RGB color that framebuffer is cleared to */
308 1, /* Quickboot (1 = enabled) */
309 0, /* Quickboot seamless (1 = enabled) */
310 0, /* Quickboot video input (1 = enabled) */
311 0 /* Polling (1 = override interrupt support and use polling) */
314 /* Config #3: NexCom VCT1000 7' */
315 static igd_param_t config_params_config3 = {
316 1*256*1024, /* Page request */
317 0, /* Max frame buffer size */
318 1, /* Preserve registers */
319 0x6, /* Display flags */
320 { 4, 0, 0, 0, 0 }, /* Display port order */
321 { /* Display Params */
323 4, /* Display port number */
324 0x180, /* Parameters present */
326 0x0, /* Flags when EDID is available */
327 0x4, /* Flags when EDID is not available */
328 0, /* DDC GPIO pins */
331 0, /* I2C GPIO pins */
334 { /* Flat Panel Info */
335 0, /* Flat Panel width */
336 0, /* Flat Panel height */
337 0, /* Flat Panel power method */
338 0, /* VDD active & DVO clock/data active */
339 0, /* DVO clock/data active & backlight enable */
340 0, /* backlight disable & DVO clock/data inactive */
341 0, /* DVO clock/data inactive & VDD inactive */
342 0 /* VDD inactive & VDD active */
345 sizeof(dtd_config3_port4_dtdlist)/sizeof(igd_display_info_t), /* Number of DTDs */
346 dtd_config3_port4_dtdlist /* DTD name */
348 { /* Attribute Info */
349 sizeof(attrs_config3_port4)/sizeof(igd_param_attr_t), /* Number of attributes */
350 attrs_config3_port4 /* Attr name */
354 2, /* Display port number */
355 0x0, /* Parameters present */
357 0x5, /* Flags when EDID is available */
358 0x5, /* Flags when EDID is not available */
359 0, /* DDC GPIO pins */
362 0, /* I2C GPIO pins */
365 { /* Flat Panel Info */
366 0, /* Flat Panel width */
367 0, /* Flat Panel height */
368 0, /* Flat Panel power method */
369 0, /* VDD active & DVO clock/data active */
370 0, /* DVO clock/data active & backlight enable */
371 0, /* backlight disable & DVO clock/data inactive */
372 0, /* DVO clock/data inactive & VDD inactive */
373 0 /* VDD inactive & VDD active */
378 { /* Attribute Info */
383 0, /* 24-bit RGB color that framebuffer is cleared to */
384 1, /* Quickboot (1 = enabled) */
385 0, /* Quickboot seamless (1 = enabled) */
386 0, /* Quickboot video input (1 = enabled) */
387 0 /* Polling (1 = override interrupt support and use polling) */
391 * The emgd_drm_config_t structure is the main configuration structure
392 * for the EMGD kernel module.
394 emgd_drm_config_t config_drm = {
395 1, /* Whether to initialize the display at EMGD module startup time
396 * (corresponds to the "init" module parameter)
398 1, /* The display configuration to use if initializing the display
399 * (corresponds to the "init" module parameter), where:
400 * - 1 = Single port/display
401 * - 2 = Cloned port/display (e.g. LVDS + CRT with different timings)
402 * - 4 = Twin ports/displays (e.g. LVDS + CRT with same timings)
403 * Note: Twin is NOT CURRENTLY SUPPORTED
404 * - 8 = Extended displays (e.g. LVDS + CRT displaying different images)
406 800,/* Display width to use if initializing the display
407 * (corresponds to the "width" module parameter)
409 480,/* Display height to use if initializing the display
410 * (corresponds to the "height" module parameter)
412 60, /* Display refresh rate to use if initializing the display
413 * (corresponds to the "refresh" module parameter)
416 0, /* ovl_brightness */
417 0, /* ovl_contrast */
418 0, /* ovl_saturation */
419 0, /* ovl_gamma_red */
420 0, /* ovl_gamma_green */
421 0, /* ovl_gamma_blue */
424 { /* driver parameters from above */
425 &config_params_config1,
426 &config_params_config2,
427 &config_params_config3
432 /* type: 2:crownbay else:crossvile */
433 void emgd_drm_override_user_config(int configid)
437 /* Crossville 7inch */
438 config_drm.width = 800;
439 config_drm.height = 480;
441 else if ( configid == 2 )
443 /* CrownBay 13inch LVDS */
444 config_drm.width = 1366;
445 config_drm.height = 768;
449 /* NexCom VCT1000 7inch LVDS*/
450 config_drm.width = 800;
451 config_drm.height = 480;