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, |
| 11 | LDSM2R, LDSA1R, LDMLSR, LDHCNR, LDHSYNR, LDVLNR, LDVSYNR, LDPMR, |
| 12 | LDHAJR, |
| 13 | NR_CH_REGS }; |
| 14 | |
| 15 | #define PALETTE_NR 16 |
| 16 | |
| 17 | struct sh_mobile_lcdc_priv; |
| 18 | struct fb_info; |
| 19 | |
| 20 | struct sh_mobile_lcdc_chan { |
| 21 | struct sh_mobile_lcdc_priv *lcdc; |
| 22 | unsigned long *reg_offs; |
| 23 | unsigned long ldmt1r_value; |
| 24 | unsigned long enabled; /* ME and SE in LDCNT2R */ |
| 25 | struct sh_mobile_lcdc_chan_cfg cfg; |
| 26 | u32 pseudo_palette[PALETTE_NR]; |
| 27 | unsigned long saved_ch_regs[NR_CH_REGS]; |
| 28 | struct fb_info *info; |
| 29 | dma_addr_t dma_handle; |
| 30 | struct fb_deferred_io defio; |
| 31 | struct scatterlist *sglist; |
| 32 | unsigned long frame_end; |
| 33 | unsigned long pan_offset; |
| 34 | wait_queue_head_t frame_end_wait; |
| 35 | struct completion vsync_completion; |
Guennadi Liakhovetski | 1c120de | 2010-09-03 07:20:27 +0000 | [diff] [blame] | 36 | struct fb_var_screeninfo display_var; |
Guennadi Liakhovetski | dd21050 | 2010-09-14 14:48:54 +0000 | [diff] [blame] | 37 | int use_count; |
| 38 | struct mutex open_lock; /* protects the use counter */ |
Guennadi Liakhovetski | 6de9edd | 2010-09-03 07:20:23 +0000 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | #endif |