York Sun | a877880 | 2007-10-29 13:58:39 -0500 | [diff] [blame] | 1 | /* |
| 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 Loeliger | 74f89fa | 2007-11-20 15:00:53 -0600 | [diff] [blame] | 26 | struct fb_var_screeninfo { |
| 27 | unsigned int xres; /* visible resolution */ |
| 28 | unsigned int yres; |
York Sun | a877880 | 2007-10-29 13:58:39 -0500 | [diff] [blame] | 29 | |
Jon Loeliger | 74f89fa | 2007-11-20 15:00:53 -0600 | [diff] [blame] | 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 | |
| 45 | struct 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; |
Jon Loeliger | 74f89fa | 2007-11-20 15:00:53 -0600 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | |
| 58 | extern char *fsl_fb_open(struct fb_info **info); |
Timur Tabi | e69e520 | 2010-08-31 19:56:43 -0500 | [diff] [blame^] | 59 | int fsl_diu_init(int xres, unsigned int pixel_format, int gamma_fix); |