diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-04-30 09:55:12 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-07-01 05:01:14 -0400 |
commit | 27cc213ea7dde929692df46a64c8d8ef74663e48 (patch) | |
tree | e500ad95bb76864878966aeaafa29ed5ef330ef1 /drivers/video/omap2/omapfb/omapfb.h | |
parent | 065a40bd461d3709a2c36adf0ec383581cc692a7 (diff) |
OMAP: DSS2: OMAPFB: Implement auto-update mode
Implement auto-update mode for manual-update displays. omapfb driver
uses a delayed work to update the display with a constant rate.
The update mode can be changed via OMAPFB_SET_UPDATE_MODE ioctl, which
previously called omapdss but is now handled inside omapfb, and a new
sysfs file, "update_mode".
The update interval is by default 20 times per second, but can be
changed via "auto_update_freq" module parameter. There is also a new
module parameter "auto_update", which will make omapfb start manual
update displays in auto-update mode.
This auto-update mode can be used for testing if the userspace does not
support manual update displays properly. However, it is a very
inefficient solution, and should be considered more as a hack for
testing than something that could be used as a long term solution.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb.h')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index f07dbbb08db1..fdf0edeccf4e 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h | |||
@@ -74,8 +74,12 @@ struct omapfb_info { | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct omapfb_display_data { | 76 | struct omapfb_display_data { |
77 | struct omapfb2_device *fbdev; | ||
77 | struct omap_dss_device *dssdev; | 78 | struct omap_dss_device *dssdev; |
78 | u8 bpp_override; | 79 | u8 bpp_override; |
80 | enum omapfb_update_mode update_mode; | ||
81 | bool auto_update_work_enabled; | ||
82 | struct delayed_work auto_update_work; | ||
79 | }; | 83 | }; |
80 | 84 | ||
81 | struct omapfb2_device { | 85 | struct omapfb2_device { |
@@ -96,6 +100,8 @@ struct omapfb2_device { | |||
96 | struct omap_overlay *overlays[10]; | 100 | struct omap_overlay *overlays[10]; |
97 | unsigned num_managers; | 101 | unsigned num_managers; |
98 | struct omap_overlay_manager *managers[10]; | 102 | struct omap_overlay_manager *managers[10]; |
103 | |||
104 | struct workqueue_struct *auto_update_wq; | ||
99 | }; | 105 | }; |
100 | 106 | ||
101 | struct omapfb_colormode { | 107 | struct omapfb_colormode { |
@@ -127,6 +133,13 @@ int dss_mode_to_fb_mode(enum omap_color_mode dssmode, | |||
127 | 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, |
128 | u16 posx, u16 posy, u16 outw, u16 outh); | 134 | u16 posx, u16 posy, u16 outw, u16 outh); |
129 | 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 | |||
130 | /* find the display connected to this fb, if any */ | 143 | /* find the display connected to this fb, if any */ |
131 | static inline struct omap_dss_device *fb2display(struct fb_info *fbi) | 144 | static inline struct omap_dss_device *fb2display(struct fb_info *fbi) |
132 | { | 145 | { |