OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2009, Code Aurora Forum. All rights reserved. | 2 * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. |
3 * | 3 * |
4 * (C) Copyright 2001-2002 | 4 * (C) Copyright 2001-2002 |
5 * Wolfgang Denk, DENX Software Engineering -- wd@denx.de | 5 * Wolfgang Denk, DENX Software Engineering -- wd@denx.de |
6 * | 6 * |
7 * See file CREDITS for list of people who contributed to this | 7 * See file CREDITS for list of people who contributed to this |
8 * project. | 8 * project. |
9 * | 9 * |
10 * This program is free software; you can redistribute it and/or modify | 10 * This program is free software; you can redistribute it and/or modify |
11 * it under the terms of the GNU General Public License version 2 and | 11 * it under the terms of the GNU General Public License version 2 and |
12 * only version 2 as published by the Free Software Foundation. | 12 * only version 2 as published by the Free Software Foundation. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 vidinfo_t panel_info = { | 45 vidinfo_t panel_info = { |
46 vl_col: LCDC_vl_col, | 46 vl_col: LCDC_vl_col, |
47 vl_row: LCDC_vl_row, | 47 vl_row: LCDC_vl_row, |
48 vl_sync_width: LCDC_vl_sync_width, | 48 vl_sync_width: LCDC_vl_sync_width, |
49 vl_sync_height: LCDC_vl_sync_height, | 49 vl_sync_height: LCDC_vl_sync_height, |
50 vl_hbp: LCDC_vl_hbp, | 50 vl_hbp: LCDC_vl_hbp, |
51 vl_hfp: LCDC_vl_hfp, | 51 vl_hfp: LCDC_vl_hfp, |
52 vl_vbp: LCDC_vl_vbp, | 52 vl_vbp: LCDC_vl_vbp, |
53 vl_vfp: LCDC_vl_vfp, | 53 vl_vfp: LCDC_vl_vfp, |
54 vl_hsync_width: LCDC_vl_hsync_width, | 54 vl_hsync_width: LCDC_vl_hsync_width, |
| 55 vl_vsync_width: LCDC_vl_vsync_width, |
55 vl_bpix: LCD_BPP | 56 vl_bpix: LCD_BPP |
56 }; | 57 }; |
57 | 58 |
58 void lcd_disable (void); | 59 void lcd_disable (void); |
59 void lcd_enable (void); | 60 void lcd_enable (void); |
60 void lcdc_init (void); | 61 void lcdc_init (void); |
61 void lcdc_initpalette (void); | 62 void lcdc_initpalette (void); |
62 pixel_24bpp_t lcdc_getcolor (ushort regno); | 63 pixel_24bpp_t lcdc_getcolor (ushort regno); |
63 | 64 |
64 extern void board_lcd_enable (void); | 65 extern void board_lcd_enable (void); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 int vactive_end_y; | 123 int vactive_end_y; |
123 | 124 |
124 int hsync_width; | 125 int hsync_width; |
125 int vsync_width; | 126 int vsync_width; |
126 int vsync_starty; | 127 int vsync_starty; |
127 int vsync_endy; | 128 int vsync_endy; |
128 | 129 |
129 hsync_period = panel_info.vl_sync_width + panel_info.vl_hfp + panel_info.vl_h
bp; | 130 hsync_period = panel_info.vl_sync_width + panel_info.vl_hfp + panel_info.vl_h
bp; |
130 vsync_period = panel_info.vl_sync_height + panel_info.vl_vfp + panel_info.vl_
vbp; | 131 vsync_period = panel_info.vl_sync_height + panel_info.vl_vfp + panel_info.vl_
vbp; |
131 hsync_width = panel_info.vl_hsync_width; | 132 hsync_width = panel_info.vl_hsync_width; |
132 vsync_width = 6 * hsync_period; | 133 vsync_width = panel_info.vl_vsync_width * hsync_period; |
133 vsync_starty = panel_info.vl_vbp * hsync_period; | 134 vsync_starty = panel_info.vl_vbp * hsync_period; |
134 vsync_endy = (((panel_info.vl_vbp + panel_info.vl_sync_height) * hsync_peri
od) - 1); | 135 vsync_endy = (((panel_info.vl_vbp + panel_info.vl_sync_height) * hsync_peri
od) - 1); |
135 | 136 |
136 // Active area of display | 137 // Active area of display |
137 hactive_start_x = X + panel_info.vl_hbp; | 138 hactive_start_x = X + panel_info.vl_hbp; |
138 hactive_end_x = hactive_start_x + width - 1; | 139 hactive_end_x = hactive_start_x + width - 1; |
139 vactive_start_y = (Y + panel_info.vl_vbp) * hsync_period; | 140 vactive_start_y = (Y + panel_info.vl_vbp) * hsync_period; |
140 vactive_end_y = vactive_start_y + (height * hsync_period) - 1; | 141 vactive_end_y = vactive_start_y + (height * hsync_period) - 1; |
141 | 142 |
142 #ifdef USE_PROC_COMM | 143 #ifdef USE_PROC_COMM |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 } | 274 } |
274 /* | 275 /* |
275 * | 276 * |
276 */ | 277 */ |
277 pixel_24bpp_t lcdc_getcolor(ushort regno) | 278 pixel_24bpp_t lcdc_getcolor(ushort regno) |
278 { | 279 { |
279 return *(pixel_24bpp_t *)(panel_info.vl_palette_base + regno); | 280 return *(pixel_24bpp_t *)(panel_info.vl_palette_base + regno); |
280 } | 281 } |
281 | 282 |
282 #endif /*CONFIG_LCD*/ | 283 #endif /*CONFIG_LCD*/ |
OLD | NEW |