diff options
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb.h')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index aa1b1d974276..f07dbbb08db1 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h | |||
@@ -73,6 +73,11 @@ struct omapfb_info { | |||
73 | bool mirror; | 73 | bool mirror; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct omapfb_display_data { | ||
77 | struct omap_dss_device *dssdev; | ||
78 | u8 bpp_override; | ||
79 | }; | ||
80 | |||
76 | struct omapfb2_device { | 81 | struct omapfb2_device { |
77 | struct device *dev; | 82 | struct device *dev; |
78 | struct mutex mtx; | 83 | struct mutex mtx; |
@@ -86,17 +91,11 @@ struct omapfb2_device { | |||
86 | struct omapfb2_mem_region regions[10]; | 91 | struct omapfb2_mem_region regions[10]; |
87 | 92 | ||
88 | unsigned num_displays; | 93 | unsigned num_displays; |
89 | struct omap_dss_device *displays[10]; | 94 | struct omapfb_display_data displays[10]; |
90 | unsigned num_overlays; | 95 | unsigned num_overlays; |
91 | struct omap_overlay *overlays[10]; | 96 | struct omap_overlay *overlays[10]; |
92 | unsigned num_managers; | 97 | unsigned num_managers; |
93 | struct omap_overlay_manager *managers[10]; | 98 | struct omap_overlay_manager *managers[10]; |
94 | |||
95 | unsigned num_bpp_overrides; | ||
96 | struct { | ||
97 | struct omap_dss_device *dssdev; | ||
98 | u8 bpp; | ||
99 | } bpp_overrides[10]; | ||
100 | }; | 99 | }; |
101 | 100 | ||
102 | struct omapfb_colormode { | 101 | struct omapfb_colormode { |
@@ -143,6 +142,19 @@ static inline struct omap_dss_device *fb2display(struct fb_info *fbi) | |||
143 | return NULL; | 142 | return NULL; |
144 | } | 143 | } |
145 | 144 | ||
145 | static inline struct omapfb_display_data *get_display_data( | ||
146 | struct omapfb2_device *fbdev, struct omap_dss_device *dssdev) | ||
147 | { | ||
148 | int i; | ||
149 | |||
150 | for (i = 0; i < fbdev->num_displays; ++i) | ||
151 | if (fbdev->displays[i].dssdev == dssdev) | ||
152 | return &fbdev->displays[i]; | ||
153 | |||
154 | /* This should never happen */ | ||
155 | BUG(); | ||
156 | } | ||
157 | |||
146 | static inline void omapfb_lock(struct omapfb2_device *fbdev) | 158 | static inline void omapfb_lock(struct omapfb2_device *fbdev) |
147 | { | 159 | { |
148 | mutex_lock(&fbdev->mtx); | 160 | mutex_lock(&fbdev->mtx); |