OMAP: DSS2: OMAPFB: Add support for switching memory regions

Separate the memory region from the framebuffer device a little bit.
It's now possible to select the memory region used by the framebuffer
device using the new mem_idx parameter of omapfb_plane_info. If the
mem_idx is specified it will be interpreted as an index into the
memory regions array, if it's not specified the framebuffer's index is
used instead. So by default each framebuffer keeps using it's own
memory region which preserves backwards compatibility.

This allows cloning the same memory region to several overlays and yet
each overlay can be controlled independently since they can be
associated with separate framebuffer devices.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
This commit is contained in:
Ville Syrjälä 2010-03-17 20:36:51 +02:00 committed by Tomi Valkeinen
parent 2ad0c50b84
commit 078ff546a8
5 changed files with 186 additions and 67 deletions

View file

@ -85,6 +85,9 @@
#define OMAPFB_MEMTYPE_SRAM 1
#define OMAPFB_MEMTYPE_MAX 1
#define OMAPFB_MEM_IDX_ENABLED 0x80
#define OMAPFB_MEM_IDX_MASK 0x7f
enum omapfb_color_format {
OMAPFB_COLOR_RGB565 = 0,
OMAPFB_COLOR_YUV422,
@ -136,7 +139,7 @@ struct omapfb_plane_info {
__u8 enabled;
__u8 channel_out;
__u8 mirror;
__u8 reserved1;
__u8 mem_idx;
__u32 out_width;
__u32 out_height;
__u32 reserved2[12];