aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-11 00:55:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-11 00:55:17 -0500
commitaa2cf420593b67cc93de7a3f675b2a88eba0505f (patch)
treedfb3c73a8a3987c3b3ba08083f379ebc90942e03 /drivers/video/omap
parentd71cb81af3817193bc605de061da0499934263a6 (diff)
parent178ff4c9175db447f93b7343954b1d44707c881b (diff)
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: MAINTAINERS: Add OMAP2/3 DSS and OMAPFB maintainer OMAP: SDP: Enable DSS2 for OMAP3 SDP board OMAP: DSS2: Taal DSI command mode panel driver OMAP: DSS2: Add generic and Sharp panel drivers OMAP: DSS2: omapfb driver OMAP: DSS2: DSI driver OMAP: DSS2: SDI driver OMAP: DSS2: RFBI driver OMAP: DSS2: Video encoder driver OMAP: DSS2: DPI driver OMAP: DSS2: DISPC OMAP: DSS2: Add more core files OMAP: DSS2: Display Subsystem Driver core OMAP: DSS2: Documentation for DSS2 OMAP: Add support for VRFB rotation engine OMAP: Add VRAM manager OMAP: OMAPFB: add omapdss device OMAP: OMAPFB: split omapfb.h OMAP2: Add funcs for writing SMS_ROT_* registers
Diffstat (limited to 'drivers/video/omap')
-rw-r--r--drivers/video/omap/Kconfig5
-rw-r--r--drivers/video/omap/blizzard.c2
-rw-r--r--drivers/video/omap/dispc.c21
-rw-r--r--drivers/video/omap/hwa742.c3
-rw-r--r--drivers/video/omap/lcd_2430sdp.c3
-rw-r--r--drivers/video/omap/lcd_ams_delta.c3
-rw-r--r--drivers/video/omap/lcd_apollon.c3
-rw-r--r--drivers/video/omap/lcd_h3.c2
-rw-r--r--drivers/video/omap/lcd_h4.c2
-rw-r--r--drivers/video/omap/lcd_htcherald.c2
-rw-r--r--drivers/video/omap/lcd_inn1510.c2
-rw-r--r--drivers/video/omap/lcd_inn1610.c2
-rw-r--r--drivers/video/omap/lcd_ldp.c3
-rw-r--r--drivers/video/omap/lcd_mipid.c3
-rw-r--r--drivers/video/omap/lcd_omap2evm.c3
-rw-r--r--drivers/video/omap/lcd_omap3beagle.c4
-rw-r--r--drivers/video/omap/lcd_omap3evm.c3
-rw-r--r--drivers/video/omap/lcd_osk.c2
-rw-r--r--drivers/video/omap/lcd_overo.c3
-rw-r--r--drivers/video/omap/lcd_palmte.c2
-rw-r--r--drivers/video/omap/lcd_palmtt.c2
-rw-r--r--drivers/video/omap/lcd_palmz71.c2
-rw-r--r--drivers/video/omap/lcdc.c3
-rw-r--r--drivers/video/omap/omapfb.h227
-rw-r--r--drivers/video/omap/omapfb_main.c2
-rw-r--r--drivers/video/omap/rfbi.c3
-rw-r--r--drivers/video/omap/sossi.c3
27 files changed, 284 insertions, 31 deletions
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig
index 551e3e9c4cbe..455c6055325d 100644
--- a/drivers/video/omap/Kconfig
+++ b/drivers/video/omap/Kconfig
@@ -1,6 +1,7 @@
1config FB_OMAP 1config FB_OMAP
2 tristate "OMAP frame buffer support (EXPERIMENTAL)" 2 tristate "OMAP frame buffer support (EXPERIMENTAL)"
3 depends on FB && ARCH_OMAP 3 depends on FB && ARCH_OMAP && (OMAP2_DSS = "n")
4
4 select FB_CFB_FILLRECT 5 select FB_CFB_FILLRECT
5 select FB_CFB_COPYAREA 6 select FB_CFB_COPYAREA
6 select FB_CFB_IMAGEBLIT 7 select FB_CFB_IMAGEBLIT
@@ -72,7 +73,7 @@ config FB_OMAP_LCD_MIPID
72 73
73config FB_OMAP_BOOTLOADER_INIT 74config FB_OMAP_BOOTLOADER_INIT
74 bool "Check bootloader initialization" 75 bool "Check bootloader initialization"
75 depends on FB_OMAP 76 depends on FB_OMAP || FB_OMAP2
76 help 77 help
77 Say Y here if you want to enable checking if the bootloader has 78 Say Y here if you want to enable checking if the bootloader has
78 already initialized the display controller. In this case the 79 already initialized the display controller. In this case the
diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
index f5d75f22cef9..2ffb34af4c59 100644
--- a/drivers/video/omap/blizzard.c
+++ b/drivers/video/omap/blizzard.c
@@ -27,9 +27,9 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <plat/dma.h> 29#include <plat/dma.h>
30#include <plat/omapfb.h>
31#include <plat/blizzard.h> 30#include <plat/blizzard.h>
32 31
32#include "omapfb.h"
33#include "dispc.h" 33#include "dispc.h"
34 34
35#define MODULE_NAME "blizzard" 35#define MODULE_NAME "blizzard"
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 7c833db4f9b7..c7c6455f1fa8 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -24,11 +24,12 @@
24#include <linux/vmalloc.h> 24#include <linux/vmalloc.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/platform_device.h>
27 28
28#include <plat/sram.h> 29#include <plat/sram.h>
29#include <plat/omapfb.h>
30#include <plat/board.h> 30#include <plat/board.h>
31 31
32#include "omapfb.h"
32#include "dispc.h" 33#include "dispc.h"
33 34
34#define MODULE_NAME "dispc" 35#define MODULE_NAME "dispc"
@@ -188,6 +189,11 @@ static struct {
188 struct omapfb_color_key color_key; 189 struct omapfb_color_key color_key;
189} dispc; 190} dispc;
190 191
192static struct platform_device omapdss_device = {
193 .name = "omapdss",
194 .id = -1,
195};
196
191static void enable_lcd_clocks(int enable); 197static void enable_lcd_clocks(int enable);
192 198
193static void inline dispc_write_reg(int idx, u32 val) 199static void inline dispc_write_reg(int idx, u32 val)
@@ -914,20 +920,20 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
914 920
915static int get_dss_clocks(void) 921static int get_dss_clocks(void)
916{ 922{
917 dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick"); 923 dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
918 if (IS_ERR(dispc.dss_ick)) { 924 if (IS_ERR(dispc.dss_ick)) {
919 dev_err(dispc.fbdev->dev, "can't get ick\n"); 925 dev_err(dispc.fbdev->dev, "can't get ick\n");
920 return PTR_ERR(dispc.dss_ick); 926 return PTR_ERR(dispc.dss_ick);
921 } 927 }
922 928
923 dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck"); 929 dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
924 if (IS_ERR(dispc.dss1_fck)) { 930 if (IS_ERR(dispc.dss1_fck)) {
925 dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); 931 dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
926 clk_put(dispc.dss_ick); 932 clk_put(dispc.dss_ick);
927 return PTR_ERR(dispc.dss1_fck); 933 return PTR_ERR(dispc.dss1_fck);
928 } 934 }
929 935
930 dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck"); 936 dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
931 if (IS_ERR(dispc.dss_54m_fck)) { 937 if (IS_ERR(dispc.dss_54m_fck)) {
932 dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); 938 dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
933 clk_put(dispc.dss_ick); 939 clk_put(dispc.dss_ick);
@@ -1379,6 +1385,12 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
1379 int skip_init = 0; 1385 int skip_init = 0;
1380 int i; 1386 int i;
1381 1387
1388 r = platform_device_register(&omapdss_device);
1389 if (r) {
1390 dev_err(fbdev->dev, "can't register omapdss device\n");
1391 return r;
1392 }
1393
1382 memset(&dispc, 0, sizeof(dispc)); 1394 memset(&dispc, 0, sizeof(dispc));
1383 1395
1384 dispc.base = ioremap(DISPC_BASE, SZ_1K); 1396 dispc.base = ioremap(DISPC_BASE, SZ_1K);
@@ -1522,6 +1534,7 @@ static void omap_dispc_cleanup(void)
1522 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); 1534 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
1523 put_dss_clocks(); 1535 put_dss_clocks();
1524 iounmap(dispc.base); 1536 iounmap(dispc.base);
1537 platform_device_unregister(&omapdss_device);
1525} 1538}
1526 1539
1527const struct lcd_ctrl omap2_int_ctrl = { 1540const struct lcd_ctrl omap2_int_ctrl = {
diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c
index 17a975e4c9c9..0016f77cd13f 100644
--- a/drivers/video/omap/hwa742.c
+++ b/drivers/video/omap/hwa742.c
@@ -25,10 +25,11 @@
25#include <linux/fb.h> 25#include <linux/fb.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/interrupt.h>
28 29
29#include <plat/dma.h> 30#include <plat/dma.h>
30#include <plat/omapfb.h>
31#include <plat/hwa742.h> 31#include <plat/hwa742.h>
32#include "omapfb.h"
32 33
33#define HWA742_REV_CODE_REG 0x0 34#define HWA742_REV_CODE_REG 0x0
34#define HWA742_CONFIG_REG 0x2 35#define HWA742_CONFIG_REG 0x2
diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c
index fea7feee0b77..760645d9dbb6 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -28,9 +28,10 @@
28#include <linux/i2c/twl4030.h> 28#include <linux/i2c/twl4030.h>
29 29
30#include <plat/mux.h> 30#include <plat/mux.h>
31#include <plat/omapfb.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33 32
33#include "omapfb.h"
34
34#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 35#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
35#define SDP2430_LCD_PANEL_ENABLE_GPIO 154 36#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
36#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24 37#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24
diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c
index b3973ebd1b0f..567db6ac32c8 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -27,7 +27,8 @@
27 27
28#include <plat/board-ams-delta.h> 28#include <plat/board-ams-delta.h>
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <plat/omapfb.h> 30
31#include "omapfb.h"
31 32
32#define AMS_DELTA_DEFAULT_CONTRAST 112 33#define AMS_DELTA_DEFAULT_CONTRAST 112
33 34
diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c
index 4c5cefc5153b..2be94eb3bbf5 100644
--- a/drivers/video/omap/lcd_apollon.c
+++ b/drivers/video/omap/lcd_apollon.c
@@ -26,7 +26,8 @@
26 26
27#include <mach/gpio.h> 27#include <mach/gpio.h>
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h> 29
30#include "omapfb.h"
30 31
31/* #define USE_35INCH_LCD 1 */ 32/* #define USE_35INCH_LCD 1 */
32 33
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index 240b4fb10741..8df688748b5a 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -24,7 +24,7 @@
24#include <linux/i2c/tps65010.h> 24#include <linux/i2c/tps65010.h>
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29#define MODULE_NAME "omapfb-lcd_h3" 29#define MODULE_NAME "omapfb-lcd_h3"
30 30
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c
index 720625da1f4e..03a06a982750 100644
--- a/drivers/video/omap/lcd_h4.c
+++ b/drivers/video/omap/lcd_h4.c
@@ -22,7 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <plat/omapfb.h> 25#include "omapfb.h"
26 26
27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
28{ 28{
diff --git a/drivers/video/omap/lcd_htcherald.c b/drivers/video/omap/lcd_htcherald.c
index 2e0c81ea7483..a9007c5d1fad 100644
--- a/drivers/video/omap/lcd_htcherald.c
+++ b/drivers/video/omap/lcd_htcherald.c
@@ -29,7 +29,7 @@
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31 31
32#include <plat/omapfb.h> 32#include "omapfb.h"
33 33
34static int htcherald_panel_init(struct lcd_panel *panel, 34static int htcherald_panel_init(struct lcd_panel *panel,
35 struct omapfb_device *fbdev) 35 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
index aafe9b497e2d..3271f1643b26 100644
--- a/drivers/video/omap/lcd_inn1510.c
+++ b/drivers/video/omap/lcd_inn1510.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <plat/fpga.h> 26#include <plat/fpga.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int innovator1510_panel_init(struct lcd_panel *panel, 29static int innovator1510_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index 0de338264a8a..9fff86f67bde 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -23,7 +23,7 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <mach/gpio.h> 25#include <mach/gpio.h>
26#include <plat/omapfb.h> 26#include "omapfb.h"
27 27
28#define MODULE_NAME "omapfb-lcd_h3" 28#define MODULE_NAME "omapfb-lcd_h3"
29 29
diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c
index 6a260dfdadc5..5bb7f6f14601 100644
--- a/drivers/video/omap/lcd_ldp.c
+++ b/drivers/video/omap/lcd_ldp.c
@@ -28,9 +28,10 @@
28 28
29#include <mach/gpio.h> 29#include <mach/gpio.h>
30#include <plat/mux.h> 30#include <plat/mux.h>
31#include <plat/omapfb.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33 32
33#include "omapfb.h"
34
34#define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES) 35#define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES)
35#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) 36#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
36 37
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
index 8f3e2b4bb4f3..abe1c76a3257 100644
--- a/drivers/video/omap/lcd_mipid.c
+++ b/drivers/video/omap/lcd_mipid.c
@@ -23,9 +23,10 @@
23#include <linux/workqueue.h> 23#include <linux/workqueue.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25 25
26#include <plat/omapfb.h>
27#include <plat/lcd_mipid.h> 26#include <plat/lcd_mipid.h>
28 27
28#include "omapfb.h"
29
29#define MIPID_MODULE_NAME "lcd_mipid" 30#define MIPID_MODULE_NAME "lcd_mipid"
30 31
31#define MIPID_CMD_READ_DISP_ID 0x04 32#define MIPID_CMD_READ_DISP_ID 0x04
diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c
index e1a38abca3e7..006c2fe7360e 100644
--- a/drivers/video/omap/lcd_omap2evm.c
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -27,9 +27,10 @@
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl4030.h>
28 28
29#include <plat/mux.h> 29#include <plat/mux.h>
30#include <plat/omapfb.h>
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32 31
32#include "omapfb.h"
33
33#define LCD_PANEL_ENABLE_GPIO 154 34#define LCD_PANEL_ENABLE_GPIO 154
34#define LCD_PANEL_LR 128 35#define LCD_PANEL_LR 128
35#define LCD_PANEL_UD 129 36#define LCD_PANEL_UD 129
diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c
index ccec084ed647..fc503d8f3c24 100644
--- a/drivers/video/omap/lcd_omap3beagle.c
+++ b/drivers/video/omap/lcd_omap3beagle.c
@@ -26,9 +26,11 @@
26#include <linux/i2c/twl4030.h> 26#include <linux/i2c/twl4030.h>
27 27
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h> 29#include <plat/mux.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31 31
32#include "omapfb.h"
33
32#define LCD_PANEL_ENABLE_GPIO 170 34#define LCD_PANEL_ENABLE_GPIO 170
33 35
34static int omap3beagle_panel_init(struct lcd_panel *panel, 36static int omap3beagle_panel_init(struct lcd_panel *panel,
diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 556eb31db24c..ae2edc4081a8 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -26,9 +26,10 @@
26#include <linux/i2c/twl4030.h> 26#include <linux/i2c/twl4030.h>
27 27
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h>
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31 30
31#include "omapfb.h"
32
32#define LCD_PANEL_ENABLE_GPIO 153 33#define LCD_PANEL_ENABLE_GPIO 153
33#define LCD_PANEL_LR 2 34#define LCD_PANEL_LR 2
34#define LCD_PANEL_UD 3 35#define LCD_PANEL_UD 3
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index bb21d7dca39e..b87e8b83f29c 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -25,7 +25,7 @@
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/mux.h> 27#include <plat/mux.h>
28#include <plat/omapfb.h> 28#include "omapfb.h"
29 29
30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
31{ 31{
diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c
index b0f86e514cde..56ee192e9ee2 100644
--- a/drivers/video/omap/lcd_overo.c
+++ b/drivers/video/omap/lcd_overo.c
@@ -25,9 +25,10 @@
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/mux.h> 27#include <plat/mux.h>
28#include <plat/omapfb.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30 29
30#include "omapfb.h"
31
31#define LCD_ENABLE 144 32#define LCD_ENABLE 144
32 33
33static int overo_panel_init(struct lcd_panel *panel, 34static int overo_panel_init(struct lcd_panel *panel,
diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
index d30289603ce8..4cb301750d02 100644
--- a/drivers/video/omap/lcd_palmte.c
+++ b/drivers/video/omap/lcd_palmte.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <plat/fpga.h> 26#include <plat/fpga.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int palmte_panel_init(struct lcd_panel *panel, 29static int palmte_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c
index 557424fb6df1..ff0e6d7ab3a2 100644
--- a/drivers/video/omap/lcd_palmtt.c
+++ b/drivers/video/omap/lcd_palmtt.c
@@ -30,7 +30,7 @@ GPIO13 - screen blanking
30#include <linux/io.h> 30#include <linux/io.h>
31 31
32#include <mach/gpio.h> 32#include <mach/gpio.h>
33#include <plat/omapfb.h> 33#include "omapfb.h"
34 34
35static int palmtt_panel_init(struct lcd_panel *panel, 35static int palmtt_panel_init(struct lcd_panel *panel,
36 struct omapfb_device *fbdev) 36 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video/omap/lcd_palmz71.c
index 5f4b5b2c1f41..2334e56536bc 100644
--- a/drivers/video/omap/lcd_palmz71.c
+++ b/drivers/video/omap/lcd_palmz71.c
@@ -24,7 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int palmz71_panel_init(struct lcd_panel *panel, 29static int palmz71_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
index 5f32cafbf74c..b831e1df629e 100644
--- a/drivers/video/omap/lcdc.c
+++ b/drivers/video/omap/lcdc.c
@@ -30,10 +30,11 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31 31
32#include <plat/dma.h> 32#include <plat/dma.h>
33#include <plat/omapfb.h>
34 33
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
36 35
36#include "omapfb.h"
37
37#include "lcdc.h" 38#include "lcdc.h"
38 39
39#define MODULE_NAME "lcdc" 40#define MODULE_NAME "lcdc"
diff --git a/drivers/video/omap/omapfb.h b/drivers/video/omap/omapfb.h
new file mode 100644
index 000000000000..46e4714014e8
--- /dev/null
+++ b/drivers/video/omap/omapfb.h
@@ -0,0 +1,227 @@
1/*
2 * File: drivers/video/omap/omapfb.h
3 *
4 * Framebuffer driver for TI OMAP boards
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __OMAPFB_H
25#define __OMAPFB_H
26
27#include <linux/fb.h>
28#include <linux/mutex.h>
29#include <linux/omapfb.h>
30
31#define OMAPFB_EVENT_READY 1
32#define OMAPFB_EVENT_DISABLED 2
33
34#define OMAP_LCDC_INV_VSYNC 0x0001
35#define OMAP_LCDC_INV_HSYNC 0x0002
36#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
37#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
38#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
39#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
40
41#define OMAP_LCDC_SIGNAL_MASK 0x003f
42
43#define OMAP_LCDC_PANEL_TFT 0x0100
44
45#define OMAPFB_PLANE_XRES_MIN 8
46#define OMAPFB_PLANE_YRES_MIN 8
47
48struct omapfb_device;
49
50struct lcd_panel {
51 const char *name;
52 int config; /* TFT/STN, signal inversion */
53 int bpp; /* Pixel format in fb mem */
54 int data_lines; /* Lines on LCD HW interface */
55
56 int x_res, y_res;
57 int pixel_clock; /* In kHz */
58 int hsw; /* Horizontal synchronization
59 pulse width */
60 int hfp; /* Horizontal front porch */
61 int hbp; /* Horizontal back porch */
62 int vsw; /* Vertical synchronization
63 pulse width */
64 int vfp; /* Vertical front porch */
65 int vbp; /* Vertical back porch */
66 int acb; /* ac-bias pin frequency */
67 int pcd; /* pixel clock divider.
68 Obsolete use pixel_clock instead */
69
70 int (*init) (struct lcd_panel *panel,
71 struct omapfb_device *fbdev);
72 void (*cleanup) (struct lcd_panel *panel);
73 int (*enable) (struct lcd_panel *panel);
74 void (*disable) (struct lcd_panel *panel);
75 unsigned long (*get_caps) (struct lcd_panel *panel);
76 int (*set_bklight_level)(struct lcd_panel *panel,
77 unsigned int level);
78 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
79 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
80 int (*run_test) (struct lcd_panel *panel, int test_num);
81};
82
83struct extif_timings {
84 int cs_on_time;
85 int cs_off_time;
86 int we_on_time;
87 int we_off_time;
88 int re_on_time;
89 int re_off_time;
90 int we_cycle_time;
91 int re_cycle_time;
92 int cs_pulse_width;
93 int access_time;
94
95 int clk_div;
96
97 u32 tim[5]; /* set by extif->convert_timings */
98
99 int converted;
100};
101
102struct lcd_ctrl_extif {
103 int (*init) (struct omapfb_device *fbdev);
104 void (*cleanup) (void);
105 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
106 unsigned long (*get_max_tx_rate)(void);
107 int (*convert_timings) (struct extif_timings *timings);
108 void (*set_timings) (const struct extif_timings *timings);
109 void (*set_bits_per_cycle)(int bpc);
110 void (*write_command) (const void *buf, unsigned int len);
111 void (*read_data) (void *buf, unsigned int len);
112 void (*write_data) (const void *buf, unsigned int len);
113 void (*transfer_area) (int width, int height,
114 void (callback)(void *data), void *data);
115 int (*setup_tearsync) (unsigned pin_cnt,
116 unsigned hs_pulse_time, unsigned vs_pulse_time,
117 int hs_pol_inv, int vs_pol_inv, int div);
118 int (*enable_tearsync) (int enable, unsigned line);
119
120 unsigned long max_transmit_size;
121};
122
123struct omapfb_notifier_block {
124 struct notifier_block nb;
125 void *data;
126 int plane_idx;
127};
128
129typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
130 unsigned long event,
131 void *fbi);
132
133struct lcd_ctrl {
134 const char *name;
135 void *data;
136
137 int (*init) (struct omapfb_device *fbdev,
138 int ext_mode,
139 struct omapfb_mem_desc *req_md);
140 void (*cleanup) (void);
141 void (*bind_client) (struct omapfb_notifier_block *nb);
142 void (*get_caps) (int plane, struct omapfb_caps *caps);
143 int (*set_update_mode)(enum omapfb_update_mode mode);
144 enum omapfb_update_mode (*get_update_mode)(void);
145 int (*setup_plane) (int plane, int channel_out,
146 unsigned long offset,
147 int screen_width,
148 int pos_x, int pos_y, int width,
149 int height, int color_mode);
150 int (*set_rotate) (int angle);
151 int (*setup_mem) (int plane, size_t size,
152 int mem_type, unsigned long *paddr);
153 int (*mmap) (struct fb_info *info,
154 struct vm_area_struct *vma);
155 int (*set_scale) (int plane,
156 int orig_width, int orig_height,
157 int out_width, int out_height);
158 int (*enable_plane) (int plane, int enable);
159 int (*update_window) (struct fb_info *fbi,
160 struct omapfb_update_window *win,
161 void (*callback)(void *),
162 void *callback_data);
163 void (*sync) (void);
164 void (*suspend) (void);
165 void (*resume) (void);
166 int (*run_test) (int test_num);
167 int (*setcolreg) (u_int regno, u16 red, u16 green,
168 u16 blue, u16 transp,
169 int update_hw_mem);
170 int (*set_color_key) (struct omapfb_color_key *ck);
171 int (*get_color_key) (struct omapfb_color_key *ck);
172};
173
174enum omapfb_state {
175 OMAPFB_DISABLED = 0,
176 OMAPFB_SUSPENDED = 99,
177 OMAPFB_ACTIVE = 100
178};
179
180struct omapfb_plane_struct {
181 int idx;
182 struct omapfb_plane_info info;
183 enum omapfb_color_format color_mode;
184 struct omapfb_device *fbdev;
185};
186
187struct omapfb_device {
188 int state;
189 int ext_lcdc; /* Using external
190 LCD controller */
191 struct mutex rqueue_mutex;
192
193 int palette_size;
194 u32 pseudo_palette[17];
195
196 struct lcd_panel *panel; /* LCD panel */
197 const struct lcd_ctrl *ctrl; /* LCD controller */
198 const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
199 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
200 interface */
201 struct device *dev;
202 struct fb_var_screeninfo new_var; /* for mode changes */
203
204 struct omapfb_mem_desc mem_desc;
205 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
206};
207
208#ifdef CONFIG_ARCH_OMAP1
209extern struct lcd_ctrl omap1_lcd_ctrl;
210#else
211extern struct lcd_ctrl omap2_disp_ctrl;
212#endif
213
214extern void omapfb_register_panel(struct lcd_panel *panel);
215extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
216extern void omapfb_notify_clients(struct omapfb_device *fbdev,
217 unsigned long event);
218extern int omapfb_register_client(struct omapfb_notifier_block *nb,
219 omapfb_notifier_callback_t callback,
220 void *callback_data);
221extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
222extern int omapfb_update_window_async(struct fb_info *fbi,
223 struct omapfb_update_window *win,
224 void (*callback)(void *),
225 void *callback_data);
226
227#endif /* __OMAPFB_H */
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f900a43db8d7..c7f59a5ccdbc 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -29,8 +29,8 @@
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30 30
31#include <plat/dma.h> 31#include <plat/dma.h>
32#include <plat/omapfb.h>
33 32
33#include "omapfb.h"
34#include "lcdc.h" 34#include "lcdc.h"
35#include "dispc.h" 35#include "dispc.h"
36 36
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
index c90fa39486b4..fed7b1bda19c 100644
--- a/drivers/video/omap/rfbi.c
+++ b/drivers/video/omap/rfbi.c
@@ -27,8 +27,7 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <plat/omapfb.h> 30#include "omapfb.h"
31
32#include "dispc.h" 31#include "dispc.h"
33 32
34/* To work around an RFBI transfer rate limitation */ 33/* To work around an RFBI transfer rate limitation */
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
index 79dc84f09713..8fb7c708f563 100644
--- a/drivers/video/omap/sossi.c
+++ b/drivers/video/omap/sossi.c
@@ -23,10 +23,11 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/interrupt.h>
26 27
27#include <plat/dma.h> 28#include <plat/dma.h>
28#include <plat/omapfb.h>
29 29
30#include "omapfb.h"
30#include "lcdc.h" 31#include "lcdc.h"
31 32
32#define MODULE_NAME "omapfb-sossi" 33#define MODULE_NAME "omapfb-sossi"