sh_mobile_hdmi: Use sh_mobile_lcdc_entity::channel to access fb_info
[deliverable/linux.git] / drivers / video / sh_mobile_lcdcfb.h
CommitLineData
6de9edd5
GL
1#ifndef SH_MOBILE_LCDCFB_H
2#define SH_MOBILE_LCDCFB_H
3
4#include <linux/completion.h>
5#include <linux/fb.h>
dd210503 6#include <linux/mutex.h>
6de9edd5
GL
7#include <linux/wait.h>
8
9/* per-channel registers */
10enum { LDDCKPAT1R, LDDCKPAT2R, LDMT1R, LDMT2R, LDMT3R, LDDFR, LDSM1R,
53b50314 11 LDSM2R, LDSA1R, LDSA2R, LDMLSR, LDHCNR, LDHSYNR, LDVLNR, LDVSYNR, LDPMR,
6de9edd5
GL
12 LDHAJR,
13 NR_CH_REGS };
14
15#define PALETTE_NR 16
16
3b0fd9d7 17struct backlight_device;
d2ccdc80
LP
18struct fb_info;
19struct module;
20struct sh_mobile_lcdc_entity;
21struct sh_mobile_lcdc_priv;
e34d0bbb 22struct sh_mobile_lcdc_chan;
d2ccdc80
LP
23
24struct sh_mobile_lcdc_entity_ops {
25 /* Display */
26 int (*display_on)(struct sh_mobile_lcdc_entity *entity,
27 struct fb_info *info);
28 void (*display_off)(struct sh_mobile_lcdc_entity *entity);
29};
30
31struct sh_mobile_lcdc_entity {
32 struct module *owner;
33 const struct sh_mobile_lcdc_entity_ops *ops;
e34d0bbb 34 struct sh_mobile_lcdc_chan *lcdc;
d2ccdc80 35};
6de9edd5 36
9a217e34
LP
37/*
38 * struct sh_mobile_lcdc_chan - LCDC display channel
39 *
40 * @base_addr_y: Frame buffer viewport base address (luma component)
41 * @base_addr_c: Frame buffer viewport base address (chroma component)
42 * @pitch: Frame buffer line pitch
43 */
6de9edd5
GL
44struct sh_mobile_lcdc_chan {
45 struct sh_mobile_lcdc_priv *lcdc;
9a2985e7
LP
46 struct sh_mobile_lcdc_entity *tx_dev;
47
6de9edd5
GL
48 unsigned long *reg_offs;
49 unsigned long ldmt1r_value;
50 unsigned long enabled; /* ME and SE in LDCNT2R */
51 struct sh_mobile_lcdc_chan_cfg cfg;
52 u32 pseudo_palette[PALETTE_NR];
6de9edd5 53 struct fb_info *info;
3b0fd9d7 54 struct backlight_device *bl;
6de9edd5
GL
55 dma_addr_t dma_handle;
56 struct fb_deferred_io defio;
57 struct scatterlist *sglist;
58 unsigned long frame_end;
59 unsigned long pan_offset;
60 wait_queue_head_t frame_end_wait;
61 struct completion vsync_completion;
1c120deb 62 struct fb_var_screeninfo display_var;
dd210503 63 int use_count;
8857b9aa 64 int blank_status;
dd210503 65 struct mutex open_lock; /* protects the use counter */
7caa4342 66 int meram_enabled;
9a217e34
LP
67
68 unsigned long base_addr_y;
69 unsigned long base_addr_c;
70 unsigned int pitch;
6de9edd5
GL
71};
72
73#endif
This page took 0.090658 seconds and 5 git commands to generate.