blob: 6deba32754907977cfc51d8371f93e7a2d9ceae4 [file] [log] [blame]
York Sunb7145172007-10-29 13:58:39 -05001/*
2 * Copyright 2007 Freescale Semiconductor, Inc.
3 * York Sun <yorksun@freescale.com>
4 *
5 * FSL DIU Framebuffer driver
6 *
7 * See file CREDITS for list of people who contributed to this
8 * project.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */
25
Jon Loeligerec237a32007-11-20 15:00:53 -060026struct fb_var_screeninfo {
27 unsigned int xres; /* visible resolution */
28 unsigned int yres;
29
30 unsigned int bits_per_pixel; /* guess what */
31
32 /* Timing: All values in pixclocks, except pixclock (of course) */
33 unsigned int pixclock; /* pixel clock in ps (pico seconds) */
34 unsigned int left_margin; /* time from sync to picture */
35 unsigned int right_margin; /* time from picture to sync */
36 unsigned int upper_margin; /* time from sync to picture */
37 unsigned int lower_margin;
38 unsigned int hsync_len; /* length of horizontal sync */
39 unsigned int vsync_len; /* length of vertical sync */
40 unsigned int sync; /* see FB_SYNC_* */
41 unsigned int vmode; /* see FB_VMODE_* */
42 unsigned int rotate; /* angle we rotate counter clockwise */
43};
44
45struct fb_info {
46 struct fb_var_screeninfo var; /* Current var */
47 unsigned long smem_start; /* Start of frame buffer mem */
48 /* (physical address) */
49 unsigned int smem_len; /* Length of frame buffer mem */
50 unsigned int type; /* see FB_TYPE_* */
51 unsigned int line_length; /* length of a line in bytes */
52
53 char *screen_base;
54 unsigned long screen_size;
55 int logo_height;
56 unsigned int logo_size;
57};
58
York Sunb7145172007-10-29 13:58:39 -050059
Jon Loeligerec237a32007-11-20 15:00:53 -060060extern char *fsl_fb_open(struct fb_info **info);
York Sunb7145172007-10-29 13:58:39 -050061extern int fsl_diu_init(int xres,
62 unsigned int pixel_format,
63 int gamma_fix,
64 unsigned char *splash_bmp);
65extern void fsl_diu_clear_screen(void);
66extern int fsl_diu_display_bmp(unsigned char *bmp,
67 int xoffset,
68 int yoffset,
69 int transpar);