Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 1 | #ifndef SH_MOBILE_LCDCFB_H |
| 2 | #define SH_MOBILE_LCDCFB_H |
| 3 | |
| 4 | #include <linux/completion.h> |
| 5 | #include <linux/fb.h> |
Guennadi Liakhovetski | dd21050 | 2010-09-14 14:48:54 +0000 | [diff] [blame] | 6 | #include <linux/mutex.h> |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 7 | #include <linux/wait.h> |
| 8 | |
| 9 | /* per-channel registers */ |
| 10 | enum { LDDCKPAT1R, LDDCKPAT2R, LDMT1R, LDMT2R, LDMT3R, LDDFR, LDSM1R, |
Damian Hobson-Garcia | 53b5031 | 2011-02-24 05:47:13 +0000 | [diff] [blame] | 11 | LDSM2R, LDSA1R, LDSA2R, LDMLSR, LDHCNR, LDHSYNR, LDVLNR, LDVSYNR, LDPMR, |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 12 | LDHAJR, |
| 13 | NR_CH_REGS }; |
| 14 | |
| 15 | #define PALETTE_NR 16 |
| 16 | |
| 17 | struct sh_mobile_lcdc_priv; |
| 18 | struct fb_info; |
Alexandre Courbot | 3b0fd9d | 2011-02-16 03:49:01 +0000 | [diff] [blame] | 19 | struct backlight_device; |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 20 | |
Laurent Pinchart | 9a217e3 | 2011-07-13 12:13:47 +0200 | [diff] [blame] | 21 | /* |
| 22 | * struct sh_mobile_lcdc_chan - LCDC display channel |
| 23 | * |
| 24 | * @base_addr_y: Frame buffer viewport base address (luma component) |
| 25 | * @base_addr_c: Frame buffer viewport base address (chroma component) |
| 26 | * @pitch: Frame buffer line pitch |
| 27 | */ |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 28 | struct sh_mobile_lcdc_chan { |
| 29 | struct sh_mobile_lcdc_priv *lcdc; |
| 30 | unsigned long *reg_offs; |
| 31 | unsigned long ldmt1r_value; |
| 32 | unsigned long enabled; /* ME and SE in LDCNT2R */ |
| 33 | struct sh_mobile_lcdc_chan_cfg cfg; |
| 34 | u32 pseudo_palette[PALETTE_NR]; |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 35 | struct fb_info *info; |
Alexandre Courbot | 3b0fd9d | 2011-02-16 03:49:01 +0000 | [diff] [blame] | 36 | struct backlight_device *bl; |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 37 | dma_addr_t dma_handle; |
| 38 | struct fb_deferred_io defio; |
| 39 | struct scatterlist *sglist; |
| 40 | unsigned long frame_end; |
| 41 | unsigned long pan_offset; |
| 42 | wait_queue_head_t frame_end_wait; |
| 43 | struct completion vsync_completion; |
Guennadi Liakhovetski | 1c120de | 2010-09-03 07:20:27 +0000 | [diff] [blame] | 44 | struct fb_var_screeninfo display_var; |
Guennadi Liakhovetski | dd21050 | 2010-09-14 14:48:54 +0000 | [diff] [blame] | 45 | int use_count; |
Alexandre Courbot | 8857b9a | 2011-02-23 08:36:30 +0000 | [diff] [blame] | 46 | int blank_status; |
Guennadi Liakhovetski | dd21050 | 2010-09-14 14:48:54 +0000 | [diff] [blame] | 47 | struct mutex open_lock; /* protects the use counter */ |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 48 | int meram_enabled; |
Laurent Pinchart | 9a217e3 | 2011-07-13 12:13:47 +0200 | [diff] [blame] | 49 | |
| 50 | unsigned long base_addr_y; |
| 51 | unsigned long base_addr_c; |
| 52 | unsigned int pitch; |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | #endif |