Root/
1 | #ifndef SH_MOBILE_LCDCFB_H |
2 | #define SH_MOBILE_LCDCFB_H |
3 | |
4 | #include <linux/completion.h> |
5 | #include <linux/fb.h> |
6 | #include <linux/mutex.h> |
7 | #include <linux/wait.h> |
8 | |
9 | /* per-channel registers */ |
10 | enum { LDDCKPAT1R, LDDCKPAT2R, LDMT1R, LDMT2R, LDMT3R, LDDFR, LDSM1R, |
11 | LDSM2R, LDSA1R, LDSA2R, LDMLSR, LDHCNR, LDHSYNR, LDVLNR, LDVSYNR, LDPMR, |
12 | LDHAJR, |
13 | NR_CH_REGS }; |
14 | |
15 | #define PALETTE_NR 16 |
16 | |
17 | struct backlight_device; |
18 | struct fb_info; |
19 | struct module; |
20 | struct sh_mobile_lcdc_chan; |
21 | struct sh_mobile_lcdc_entity; |
22 | struct sh_mobile_lcdc_format_info; |
23 | struct sh_mobile_lcdc_priv; |
24 | |
25 | #define SH_MOBILE_LCDC_DISPLAY_DISCONNECTED 0 |
26 | #define SH_MOBILE_LCDC_DISPLAY_CONNECTED 1 |
27 | |
28 | struct sh_mobile_lcdc_entity_ops { |
29 | /* Display */ |
30 | int (*display_on)(struct sh_mobile_lcdc_entity *entity); |
31 | void (*display_off)(struct sh_mobile_lcdc_entity *entity); |
32 | }; |
33 | |
34 | enum sh_mobile_lcdc_entity_event { |
35 | SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT, |
36 | SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT, |
37 | SH_MOBILE_LCDC_EVENT_DISPLAY_MODE, |
38 | }; |
39 | |
40 | struct sh_mobile_lcdc_entity { |
41 | struct module *owner; |
42 | const struct sh_mobile_lcdc_entity_ops *ops; |
43 | struct sh_mobile_lcdc_chan *lcdc; |
44 | struct fb_videomode def_mode; |
45 | }; |
46 | |
47 | /* |
48 | * struct sh_mobile_lcdc_chan - LCDC display channel |
49 | * |
50 | * @base_addr_y: Frame buffer viewport base address (luma component) |
51 | * @base_addr_c: Frame buffer viewport base address (chroma component) |
52 | * @pitch: Frame buffer line pitch |
53 | */ |
54 | struct sh_mobile_lcdc_chan { |
55 | struct sh_mobile_lcdc_priv *lcdc; |
56 | struct sh_mobile_lcdc_entity *tx_dev; |
57 | const struct sh_mobile_lcdc_chan_cfg *cfg; |
58 | |
59 | unsigned long *reg_offs; |
60 | unsigned long ldmt1r_value; |
61 | unsigned long enabled; /* ME and SE in LDCNT2R */ |
62 | void *meram; |
63 | |
64 | struct mutex open_lock; /* protects the use counter */ |
65 | int use_count; |
66 | |
67 | void *fb_mem; |
68 | unsigned long fb_size; |
69 | |
70 | dma_addr_t dma_handle; |
71 | unsigned long pan_offset; |
72 | |
73 | unsigned long frame_end; |
74 | wait_queue_head_t frame_end_wait; |
75 | struct completion vsync_completion; |
76 | |
77 | const struct sh_mobile_lcdc_format_info *format; |
78 | u32 colorspace; |
79 | unsigned int xres; |
80 | unsigned int xres_virtual; |
81 | unsigned int yres; |
82 | unsigned int yres_virtual; |
83 | unsigned int pitch; |
84 | |
85 | unsigned long base_addr_y; |
86 | unsigned long base_addr_c; |
87 | |
88 | int (*notify)(struct sh_mobile_lcdc_chan *ch, |
89 | enum sh_mobile_lcdc_entity_event event, |
90 | const struct fb_videomode *mode, |
91 | const struct fb_monspecs *monspec); |
92 | |
93 | /* Backlight */ |
94 | struct backlight_device *bl; |
95 | |
96 | /* FB */ |
97 | struct fb_info *info; |
98 | u32 pseudo_palette[PALETTE_NR]; |
99 | struct { |
100 | unsigned int width; |
101 | unsigned int height; |
102 | struct fb_videomode mode; |
103 | } display; |
104 | struct fb_deferred_io defio; |
105 | struct scatterlist *sglist; |
106 | int blank_status; |
107 | }; |
108 | |
109 | #endif |
110 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9