Skip to content

Commit

Permalink
OMAP: DSS2: omapfb driver
Browse files Browse the repository at this point in the history
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
  • Loading branch information
Tomi Valkeinen committed Dec 9, 2009
1 parent 3de7a1d commit b39a982
Show file tree
Hide file tree
Showing 11 changed files with 3,813 additions and 3 deletions.
47 changes: 46 additions & 1 deletion arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ static struct platform_device omap_fb_device = {
.num_resources = 0,
};

void omapfb_set_platform_data(struct omapfb_platform_data *data)
{
}

static inline int ranges_overlap(unsigned long start1, unsigned long size1,
unsigned long start2, unsigned long size2)
{
Expand Down Expand Up @@ -327,7 +331,33 @@ static inline int omap_init_fb(void)

arch_initcall(omap_init_fb);

#else
#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)

static u64 omap_fb_dma_mask = ~(u32)0;
static struct omapfb_platform_data omapfb_config;

static struct platform_device omap_fb_device = {
.name = "omapfb",
.id = -1,
.dev = {
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = ~(u32)0,
.platform_data = &omapfb_config,
},
.num_resources = 0,
};

void omapfb_set_platform_data(struct omapfb_platform_data *data)
{
omapfb_config = *data;
}

static inline int omap_init_fb(void)
{
return platform_device_register(&omap_fb_device);
}

arch_initcall(omap_init_fb);

void omapfb_reserve_sdram(void) {}
unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
Expand All @@ -339,5 +369,20 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
return 0;
}

#else

void omapfb_set_platform_data(struct omapfb_platform_data *data)
{
}

void omapfb_reserve_sdram(void) {}
unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long start_avail,
unsigned long size_avail)
{
return 0;
}

#endif
5 changes: 3 additions & 2 deletions drivers/video/omap/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config FB_OMAP
tristate "OMAP frame buffer support (EXPERIMENTAL)"
depends on FB && ARCH_OMAP
depends on FB && ARCH_OMAP && (OMAP2_DSS = "n")

select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down Expand Up @@ -72,7 +73,7 @@ config FB_OMAP_LCD_MIPID

config FB_OMAP_BOOTLOADER_INIT
bool "Check bootloader initialization"
depends on FB_OMAP
depends on FB_OMAP || FB_OMAP2
help
Say Y here if you want to enable checking if the bootloader has
already initialized the display controller. In this case the
Expand Down
1 change: 1 addition & 0 deletions drivers/video/omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ config OMAP2_VRFB
bool

source "drivers/video/omap2/dss/Kconfig"
source "drivers/video/omap2/omapfb/Kconfig"
1 change: 1 addition & 0 deletions drivers/video/omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ obj-$(CONFIG_OMAP2_VRAM) += vram.o
obj-$(CONFIG_OMAP2_VRFB) += vrfb.o

obj-y += dss/
obj-y += omapfb/
37 changes: 37 additions & 0 deletions drivers/video/omap2/omapfb/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
menuconfig FB_OMAP2
tristate "OMAP2/3 frame buffer support (EXPERIMENTAL)"
depends on FB && OMAP2_DSS

select OMAP2_VRAM
select OMAP2_VRFB
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
help
Frame buffer driver for OMAP2/3 based boards.

config FB_OMAP2_DEBUG_SUPPORT
bool "Debug support for OMAP2/3 FB"
default y
depends on FB_OMAP2
help
Support for debug output. You have to enable the actual printing
with debug module parameter.

config FB_OMAP2_FORCE_AUTO_UPDATE
bool "Force main display to automatic update mode"
depends on FB_OMAP2
help
Forces main display to automatic update mode (if possible),
and also enables tearsync (if possible). By default
displays that support manual update are started in manual
update mode.

config FB_OMAP2_NUM_FBS
int "Number of framebuffers"
range 1 10
default 3
depends on FB_OMAP2
help
Select the number of framebuffers created. OMAP2/3 has 3 overlays
so normally this would be 3.
2 changes: 2 additions & 0 deletions drivers/video/omap2/omapfb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_FB_OMAP2) += omapfb.o
omapfb-y := omapfb-main.o omapfb-sysfs.o omapfb-ioctl.o
Loading

0 comments on commit b39a982

Please sign in to comment.