Commit c8d61d1b authored by Imre Deak's avatar Imre Deak Committed by Tony Lindgren

[PATCH] ARM: OMAP: FB support for OMAP2

included in this FB patch:
- OMAP2 support with overlay, colorkey handling
- the palmte patch posted by Romain Goyet. The palette loading is
  changed a bit, so that it works ok with other platforms as well.
- registering the FB device through plat-omap/devices.c instead of doing
  it from the driver itself. Boards have to specify the OMAP_TAG_LCD
  config in the related board-*.c with in order to have FB support.
- pixel clock divider calculation based on the panel->pixel_clock
  instead of the wired panel->pcd
- support for external controllers both on SOSSI (OMAP1) and
  RFBI (OMAP2), kudos to Juha for this
- removal of the OMAP1 2D gfx stuff, it didn't really improve the
  performance:(
- double buffering IOCTL API, as this can be done in a more standard
  way through FBIOPUT_VSCREENINFO
- update of the affected omap_*_defconfigs
- minor formatting changes and typo fixes

Still TODO:
- OMAP2 Rotation, scaling of video planes
- OMAP2 digit-out (aka tv-out)
- moving the frame buffer to an alternative locating (onchip SRAM)

I tested it with H2 and H4 but it might break on other OMAP1 boards as
there were changes also in the old parts.
parent c6358b2c
This diff is collapsed.
This diff is collapsed.
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.14-rc1-omap1
# Tue Oct 11 22:28:40 2005
# Linux kernel version: 2.6.14-rc4-omap1
# Tue Oct 18 17:58:50 2005
#
CONFIG_ARM=y
CONFIG_MMU=y
......@@ -139,6 +139,10 @@ CONFIG_CPU_TLB_V6=y
# Processor Features
#
CONFIG_ARM_THUMB=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
#
# Bus support
......@@ -264,7 +268,6 @@ CONFIG_TCP_CONG_BIC=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETFILTER_NETLINK is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -624,13 +627,38 @@ CONFIG_MENELAUS=y
#
# Graphics support
#
# CONFIG_FB is not set
CONFIG_FB=y
# CONFIG_FB_CFB_FILLRECT is not set
# CONFIG_FB_CFB_COPYAREA is not set
# CONFIG_FB_CFB_IMAGEBLIT is not set
CONFIG_FB_SOFT_CURSOR=y
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_OMAP=y
CONFIG_FB_OMAP_LCDC_INTERNAL=y
# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
# CONFIG_FB_VIRTUAL is not set
#
# Console display driver support
#
# CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Sound
......
This diff is collapsed.
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.14-rc4-omap1
# Wed Oct 12 15:10:00 2005
# Tue Oct 18 17:57:11 2005
#
CONFIG_ARM=y
CONFIG_MMU=y
......@@ -623,8 +623,8 @@ CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_OMAP=y
CONFIG_FB_OMAP_INTERNAL_LCDC=y
# CONFIG_FB_OMAP_EXTERNAL_LCDC is not set
CONFIG_FB_OMAP_LCDC_INTERNAL=y
# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
# CONFIG_FB_OMAP_DMA_TUNE is not set
CONFIG_FB_VIRTUAL=y
......
......@@ -162,10 +162,16 @@ static struct omap_uart_config h2_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config h2_lcd_config __initdata = {
.panel_name = "h2",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel h2_config[] = {
{ OMAP_TAG_USB, &h2_usb_config },
{ OMAP_TAG_MMC, &h2_mmc_config },
{ OMAP_TAG_UART, &h2_uart_config },
{ OMAP_TAG_LCD, &h2_lcd_config },
};
static void __init h2_init(void)
......
......@@ -170,10 +170,16 @@ static struct omap_uart_config h3_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config h3_lcd_config __initdata = {
.panel_name = "h3",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel h3_config[] = {
{ OMAP_TAG_USB, &h3_usb_config },
{ OMAP_TAG_MMC, &h3_mmc_config },
{ OMAP_TAG_UART, &h3_uart_config },
{ OMAP_TAG_LCD, &h3_lcd_config },
};
static void __init h3_init(void)
......
......@@ -199,6 +199,11 @@ static struct omap_usb_config innovator1510_usb_config __initdata = {
.register_dev = 1,
.pins[0] = 2,
};
static struct omap_lcd_config innovator1510_lcd_config __initdata = {
.panel_name = "inn1510",
.ctrl_name = "internal",
};
#endif
#ifdef CONFIG_ARCH_OMAP16XX
......@@ -216,6 +221,11 @@ static struct omap_usb_config h2_usb_config __initdata = {
.pins[1] = 3,
};
static struct omap_lcd_config innovator1610_lcd_config __initdata = {
.panel_name = "inn1610",
.ctrl_name = "internal",
};
#endif
static struct omap_mmc_config innovator_mmc_config __initdata = {
......@@ -234,6 +244,7 @@ static struct omap_uart_config innovator_uart_config __initdata = {
static struct omap_board_config_kernel innovator_config[] = {
{ OMAP_TAG_USB, NULL },
{ OMAP_TAG_LCD, NULL },
{ OMAP_TAG_MMC, &innovator_mmc_config },
{ OMAP_TAG_UART, &innovator_uart_config },
};
......@@ -252,12 +263,16 @@ static void __init innovator_init(void)
#endif
#ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap1510())
if (cpu_is_omap1510()) {
innovator_config[0].data = &innovator1510_usb_config;
innovator_config[1].data = &innovator1510_lcd_config;
}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
if (cpu_is_omap1610())
if (cpu_is_omap1610()) {
innovator_config[0].data = &h2_usb_config;
innovator_config[1].data = &innovator1610_lcd_config;
}
#endif
omap_board_config = innovator_config;
omap_board_config_size = ARRAY_SIZE(innovator_config);
......
......@@ -195,9 +195,15 @@ static struct omap_uart_config osk_uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
static struct omap_lcd_config osk_lcd_config __initdata = {
.panel_name = "osk",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel osk_config[] = {
{ OMAP_TAG_USB, &osk_usb_config },
{ OMAP_TAG_UART, &osk_uart_config },
{ OMAP_TAG_LCD, &osk_lcd_config },
};
#ifdef CONFIG_OMAP_OSK_MISTRAL
......
......@@ -53,9 +53,15 @@ static struct omap_mmc_config palmte_mmc_config __initdata = {
},
};
static struct omap_lcd_config palmte_lcd_config __initdata = {
.panel_name = "palmte",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel palmte_config[] = {
{ OMAP_TAG_USB, &palmte_usb_config },
{ OMAP_TAG_MMC, &palmte_mmc_config },
{ OMAP_TAG_LCD, &palmte_lcd_config },
};
static void __init omap_generic_init(void)
......
......@@ -114,8 +114,14 @@ static struct omap_uart_config perseus2_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1)),
};
static struct omap_lcd_config perseus2_lcd_config __initdata = {
.panel_name = "p2",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel perseus2_config[] = {
{ OMAP_TAG_UART, &perseus2_uart_config },
{ OMAP_TAG_LCD, &perseus2_lcd_config },
};
static void __init omap_perseus2_init(void)
......
......@@ -147,7 +147,7 @@ static struct omap_uart_config h4_uart_config __initdata = {
static struct omap_mmc_config h4_mmc_config __initdata = {
.mmc [0] = {
.enabled = 1,
.enabled = 1,
.wire4 = 1,
.wp_pin = -1,
.power_pin = -1,
......@@ -155,9 +155,15 @@ static struct omap_mmc_config h4_mmc_config __initdata = {
},
};
static struct omap_lcd_config h4_lcd_config __initdata = {
.panel_name = "h4",
.ctrl_name = "internal",
};
static struct omap_board_config_kernel h4_config[] = {
{ OMAP_TAG_UART, &h4_uart_config },
{ OMAP_TAG_MMC, &h4_mmc_config },
{ OMAP_TAG_LCD, &h4_lcd_config },
};
static void __init omap_h4_init(void)
......
......@@ -341,6 +341,42 @@ static void omap_init_rng(void)
static inline void omap_init_rng(void) {}
#endif
#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
static struct omap_lcd_config omap_fb_conf;
static u64 omap_fb_dma_mask = ~(u32)0;
static struct platform_device omap_fb_device = {
.name = "omapfb",
.id = -1,
.dev = {
.release = omap_nop_release,
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = ~(u32)0,
.platform_data = &omap_fb_conf,
},
.num_resources = 0,
};
static inline void omap_init_fb(void)
{
const struct omap_lcd_config *conf;
conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
if (conf == NULL)
return;
omap_fb_conf = *conf;
platform_device_register(&omap_fb_device);
}
#else
static inline void omap_init_fb(void) {}
#endif
/*
* This gets called after board-specific INIT_MACHINE, and initializes most
* on-chip peripherals accessible on this board (except for few like USB):
......
This diff is collapsed.
config FB_OMAP
tristate "OMAP frame buffer support (EXPERIMENTAL)"
depends on FB
select FB_SOFT_CURSOR
help
Frame buffer driver for OMAP based boards.
config FB_OMAP_LCDC_INTERNAL
bool "Internal LCD controller support"
depends on FB_OMAP
help
Say Y here, if you want to have support for the internal OMAP
LCD controller. If unsure, say Y.
config FB_OMAP_LCDC_EXTERNAL
bool "External LCD controller support"
depends on FB_OMAP
help
Say Y here, if you want to have support for boards with an
external LCD controller connected to the SoSSI/RFBI interface.
config FB_OMAP_MANUAL_UPDATE
bool "Default to manual update mode"
depends on FB_OMAP && FB_OMAP_LCDC_EXTERNAL
help
Say Y here, if your user-space applications are capable of
notifying the frame buffer driver when a change has occured in
the frame buffer content and thus a reload of the image data to
the external frame buffer is required. If unsure, say N.
config FB_OMAP_DMA_TUNE
bool "Set DMA SDRAM access priority high"
depends on FB_OMAP && ARCH_OMAP1
help
On systems in which video memory is in system memory
(SDRAM) this will speed up graphics DMA operations.
If you have such a system and want to use rotation
answer yes. Answer no if you have a dedicated video
memory, or don't use any of the accelerated features.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment