diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-04-30 12:13:14 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-07-01 12:01:14 +0300 |
commit | 065a40bd461d3709a2c36adf0ec383581cc692a7 (patch) | |
tree | 731e1547a4136ee5130823ae81b0060d736c892f /drivers/video/omap2/omapfb/omapfb.h | |
parent | 4a9a5e390cb57f12de77b94b07dccf14752157ad (diff) |
OMAP: DSS2: OMAPFB: Add struct to store per-display data
Create a new struct omapfb_display_data to contain omapfb's private
per-display data. Move the bpp override there.
This struct will be used to hold auto/manual update state of a display
in the following patches.
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 | 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 { bool mirror; }; +struct omapfb_display_data { + struct omap_dss_device *dssdev; + u8 bpp_override; +}; + struct omapfb2_device { struct device *dev; struct mutex mtx; @@ -86,17 +91,11 @@ struct omapfb2_device { struct omapfb2_mem_region regions[10]; unsigned num_displays; - struct omap_dss_device *displays[10]; + struct omapfb_display_data displays[10]; unsigned num_overlays; struct omap_overlay *overlays[10]; unsigned num_managers; struct omap_overlay_manager *managers[10]; - - unsigned num_bpp_overrides; - struct { - struct omap_dss_device *dssdev; - u8 bpp; - } bpp_overrides[10]; }; struct omapfb_colormode { @@ -143,6 +142,19 @@ static inline struct omap_dss_device *fb2display(struct fb_info *fbi) return NULL; } +static inline struct omapfb_display_data *get_display_data( + struct omapfb2_device *fbdev, struct omap_dss_device *dssdev) +{ + int i; + + for (i = 0; i < fbdev->num_displays; ++i) + if (fbdev->displays[i].dssdev == dssdev) + return &fbdev->displays[i]; + + /* This should never happen */ + BUG(); +} + static inline void omapfb_lock(struct omapfb2_device *fbdev) { mutex_lock(&fbdev->mtx); |