diff options
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb.h')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb.h | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index aa1b1d974276..fdf0edeccf4e 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h | |||
@@ -73,6 +73,15 @@ struct omapfb_info { | |||
73 | bool mirror; | 73 | bool mirror; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct omapfb_display_data { | ||
77 | struct omapfb2_device *fbdev; | ||
78 | struct omap_dss_device *dssdev; | ||
79 | u8 bpp_override; | ||
80 | enum omapfb_update_mode update_mode; | ||
81 | bool auto_update_work_enabled; | ||
82 | struct delayed_work auto_update_work; | ||
83 | }; | ||
84 | |||
76 | struct omapfb2_device { | 85 | struct omapfb2_device { |
77 | struct device *dev; | 86 | struct device *dev; |
78 | struct mutex mtx; | 87 | struct mutex mtx; |
@@ -86,17 +95,13 @@ struct omapfb2_device { | |||
86 | struct omapfb2_mem_region regions[10]; | 95 | struct omapfb2_mem_region regions[10]; |
87 | 96 | ||
88 | unsigned num_displays; | 97 | unsigned num_displays; |
89 | struct omap_dss_device *displays[10]; | 98 | struct omapfb_display_data displays[10]; |
90 | unsigned num_overlays; | 99 | unsigned num_overlays; |
91 | struct omap_overlay *overlays[10]; | 100 | struct omap_overlay *overlays[10]; |
92 | unsigned num_managers; | 101 | unsigned num_managers; |
93 | struct omap_overlay_manager *managers[10]; | 102 | struct omap_overlay_manager *managers[10]; |
94 | 103 | ||
95 | unsigned num_bpp_overrides; | 104 | struct workqueue_struct *auto_update_wq; |
96 | struct { | ||
97 | struct omap_dss_device *dssdev; | ||
98 | u8 bpp; | ||
99 | } bpp_overrides[10]; | ||
100 | }; | 105 | }; |
101 | 106 | ||
102 | struct omapfb_colormode { | 107 | struct omapfb_colormode { |
@@ -128,6 +133,13 @@ int dss_mode_to_fb_mode(enum omap_color_mode dssmode, | |||
128 | int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, | 133 | int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, |
129 | u16 posx, u16 posy, u16 outw, u16 outh); | 134 | u16 posx, u16 posy, u16 outw, u16 outh); |
130 | 135 | ||
136 | void omapfb_start_auto_update(struct omapfb2_device *fbdev, | ||
137 | struct omap_dss_device *display); | ||
138 | void omapfb_stop_auto_update(struct omapfb2_device *fbdev, | ||
139 | struct omap_dss_device *display); | ||
140 | int omapfb_get_update_mode(struct fb_info *fbi, enum omapfb_update_mode *mode); | ||
141 | int omapfb_set_update_mode(struct fb_info *fbi, enum omapfb_update_mode mode); | ||
142 | |||
131 | /* find the display connected to this fb, if any */ | 143 | /* find the display connected to this fb, if any */ |
132 | static inline struct omap_dss_device *fb2display(struct fb_info *fbi) | 144 | static inline struct omap_dss_device *fb2display(struct fb_info *fbi) |
133 | { | 145 | { |
@@ -143,6 +155,19 @@ static inline struct omap_dss_device *fb2display(struct fb_info *fbi) | |||
143 | return NULL; | 155 | return NULL; |
144 | } | 156 | } |
145 | 157 | ||
158 | static inline struct omapfb_display_data *get_display_data( | ||
159 | struct omapfb2_device *fbdev, struct omap_dss_device *dssdev) | ||
160 | { | ||
161 | int i; | ||
162 | |||
163 | for (i = 0; i < fbdev->num_displays; ++i) | ||
164 | if (fbdev->displays[i].dssdev == dssdev) | ||
165 | return &fbdev->displays[i]; | ||
166 | |||
167 | /* This should never happen */ | ||
168 | BUG(); | ||
169 | } | ||
170 | |||
146 | static inline void omapfb_lock(struct omapfb2_device *fbdev) | 171 | static inline void omapfb_lock(struct omapfb2_device *fbdev) |
147 | { | 172 | { |
148 | mutex_lock(&fbdev->mtx); | 173 | mutex_lock(&fbdev->mtx); |