Commit 0f1493a6 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (126 commits)
  sh_mobile_meram: Safely disable MERAM operation when not initialized
  video: mb862xxfb: add support for L1 displaying
  video: mb862xx: add support for controller's I2C bus adapter
  video: mb862xxfb: relocate register space to get contiguous vram
  video: mb862xxfb: use pre-initialized configuration for PCI GDCs
  video: mb862xxfb: correct fix.smem_len field initialization
  video: s3c-fb: correct transparency checking in 32bpp
  video: s3c-fb: add gpio setup function to resume function
  fbdev/amifb: Remove superfluous alignment of frame buffer memory
  fbdev/amifb: Do not call panic() if there's not enough Chip RAM
  fbdev/amifb: Correct check for video memory size
  video: mb862xxfb: Require either FB_MB862XX_PCI_GDC or FB_MB862XX_LIME
  video: s3c-fb: add window variant information for S5P
  video: s3c-fb: add additional validate bpps
  video: s3c-fb: correct window osd size offset values
  udlfb: include prefetch.h explicitly
  drivers/video/s3c2410fb.c: Convert release_resource to release_mem_region
  drivers/video/sm501fb.c: Convert release_resource to release_mem_region
  drivers/video: Convert release_resource to release_mem_region
  video, udlfb: Fix two build warnings about 'ignoring return value'
  ...
parents 023bc8e7 087faf77
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/dma.h> #include <plat/dma.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/gpmc-smc91x.h> #include <plat/gpmc-smc91x.h>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/mmc.h> #include <plat/mmc.h>
#include <plat/omap4-keypad.h> #include <plat/omap4-keypad.h>
#include <plat/display.h> #include <video/omapdss.h>
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
...@@ -680,6 +680,15 @@ static struct omap_dss_device sdp4430_hdmi_device = { ...@@ -680,6 +680,15 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.name = "hdmi", .name = "hdmi",
.driver_name = "hdmi_panel", .driver_name = "hdmi_panel",
.type = OMAP_DISPLAY_TYPE_HDMI, .type = OMAP_DISPLAY_TYPE_HDMI,
.clocks = {
.dispc = {
.dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
},
.hdmi = {
.regn = 15,
.regm2 = 1,
},
},
.platform_enable = sdp4430_panel_enable_hdmi, .platform_enable = sdp4430_panel_enable_hdmi,
.platform_disable = sdp4430_panel_disable_hdmi, .platform_disable = sdp4430_panel_disable_hdmi,
.channel = OMAP_DSS_CHANNEL_DIGIT, .channel = OMAP_DSS_CHANNEL_DIGIT,
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include "mux.h" #include "mux.h"
#include "control.h" #include "control.h"
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <mach/hardware.h> #include <mach/hardware.h>
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <linux/input/matrix_keypad.h> #include <linux/input/matrix_keypad.h>
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/onenand.h> #include <plat/onenand.h>
#include "mux.h" #include "mux.h"
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/usb.h> #include <plat/usb.h>
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include "mux.h" #include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/nand.h> #include <plat/nand.h>
#include "mux.h" #include "mux.h"
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <linux/input/matrix_keypad.h> #include <linux/input/matrix_keypad.h>
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/mmc.h> #include <plat/mmc.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include "timer-gp.h" #include "timer-gp.h"
#include "hsmmc.h" #include "hsmmc.h"
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <mach/hardware.h> #include <mach/hardware.h>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/vram.h> #include <plat/vram.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/display.h> #include <video/omapdss.h>
#define LCD_PANEL_RESET_GPIO_PROD 96 #define LCD_PANEL_RESET_GPIO_PROD 96
#define LCD_PANEL_RESET_GPIO_PILOT 55 #define LCD_PANEL_RESET_GPIO_PILOT 55
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/err.h> #include <linux/err.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/omap_hwmod.h> #include <plat/omap_hwmod.h>
#include <plat/omap_device.h> #include <plat/omap_device.h>
...@@ -56,37 +56,58 @@ static bool opt_clock_available(const char *clk_role) ...@@ -56,37 +56,58 @@ static bool opt_clock_available(const char *clk_role)
return false; return false;
} }
struct omap_dss_hwmod_data {
const char *oh_name;
const char *dev_name;
const int id;
};
static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initdata = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
{ "dss_venc", "omapdss_venc", -1 },
};
static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
{ "dss_venc", "omapdss_venc", -1 },
{ "dss_dsi1", "omapdss_dsi1", -1 },
};
static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
{ "dss_venc", "omapdss_venc", -1 },
{ "dss_dsi1", "omapdss_dsi1", -1 },
{ "dss_dsi2", "omapdss_dsi2", -1 },
{ "dss_hdmi", "omapdss_hdmi", -1 },
};
int __init omap_display_init(struct omap_dss_board_info *board_data) int __init omap_display_init(struct omap_dss_board_info *board_data)
{ {
int r = 0; int r = 0;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct omap_device *od;
int i; int i, oh_count;
struct omap_display_platform_data pdata; struct omap_display_platform_data pdata;
const struct omap_dss_hwmod_data *curr_dss_hwmod;
/*
* omap: valid DSS hwmod names
* omap2,3,4: dss_core, dss_dispc, dss_rfbi, dss_venc
* omap3,4: dss_dsi1
* omap4: dss_dsi2, dss_hdmi
*/
char *oh_name[] = { "dss_core", "dss_dispc", "dss_rfbi", "dss_venc",
"dss_dsi1", "dss_dsi2", "dss_hdmi" };
char *dev_name[] = { "omapdss_dss", "omapdss_dispc", "omapdss_rfbi",
"omapdss_venc", "omapdss_dsi1", "omapdss_dsi2",
"omapdss_hdmi" };
int oh_count;
memset(&pdata, 0, sizeof(pdata)); memset(&pdata, 0, sizeof(pdata));
if (cpu_is_omap24xx()) if (cpu_is_omap24xx()) {
oh_count = ARRAY_SIZE(oh_name) - 3; curr_dss_hwmod = omap2_dss_hwmod_data;
/* last 3 hwmod dev in oh_name are not available for omap2 */ oh_count = ARRAY_SIZE(omap2_dss_hwmod_data);
else if (cpu_is_omap44xx()) } else if (cpu_is_omap34xx()) {
oh_count = ARRAY_SIZE(oh_name); curr_dss_hwmod = omap3_dss_hwmod_data;
else oh_count = ARRAY_SIZE(omap3_dss_hwmod_data);
oh_count = ARRAY_SIZE(oh_name) - 2; } else {
/* last 2 hwmod dev in oh_name are not available for omap3 */ curr_dss_hwmod = omap4_dss_hwmod_data;
oh_count = ARRAY_SIZE(omap4_dss_hwmod_data);
}
/* opt_clks are always associated with dss hwmod */ /* opt_clks are always associated with dss hwmod */
oh_core = omap_hwmod_lookup("dss_core"); oh_core = omap_hwmod_lookup("dss_core");
...@@ -100,19 +121,21 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -100,19 +121,21 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
pdata.opt_clock_available = opt_clock_available; pdata.opt_clock_available = opt_clock_available;
for (i = 0; i < oh_count; i++) { for (i = 0; i < oh_count; i++) {
oh = omap_hwmod_lookup(oh_name[i]); oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name);
if (!oh) { if (!oh) {
pr_err("Could not look up %s\n", oh_name[i]); pr_err("Could not look up %s\n",
curr_dss_hwmod[i].oh_name);
return -ENODEV; return -ENODEV;
} }
od = omap_device_build(dev_name[i], -1, oh, &pdata, od = omap_device_build(curr_dss_hwmod[i].dev_name,
curr_dss_hwmod[i].id, oh, &pdata,
sizeof(struct omap_display_platform_data), sizeof(struct omap_display_platform_data),
omap_dss_latency, omap_dss_latency,
ARRAY_SIZE(omap_dss_latency), 0); ARRAY_SIZE(omap_dss_latency), 0);
if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n", if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n",
oh_name[i])) curr_dss_hwmod[i].oh_name))
return -ENODEV; return -ENODEV;
} }
omap_display_device.dev.platform_data = board_data; omap_display_device.dev.platform_data = board_data;
......
/* /*
* Defines for zoom boards * Defines for zoom boards
*/ */
#include <plat/display.h> #include <video/omapdss.h>
#define ZOOM_NAND_CS 0 #define ZOOM_NAND_CS 0
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include <plat/dma.h> #include <plat/dma.h>
#include <plat/vram.h> #include <plat/vram.h>
#include <plat/vrfb.h> #include <plat/vrfb.h>
#include <plat/display.h> #include <video/omapdss.h>
#include "omap_voutlib.h" #include "omap_voutlib.h"
#include "omap_voutdef.h" #include "omap_voutdef.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef OMAP_VOUTDEF_H #ifndef OMAP_VOUTDEF_H
#define OMAP_VOUTDEF_H #define OMAP_VOUTDEF_H
#include <plat/display.h> #include <video/omapdss.h>
#define YUYV_BPP 2 #define YUYV_BPP 2
#define RGB565_BPP 2 #define RGB565_BPP 2
......
...@@ -1460,6 +1460,14 @@ config FB_S3 ...@@ -1460,6 +1460,14 @@ config FB_S3
---help--- ---help---
Driver for graphics boards with S3 Trio / S3 Virge chip. Driver for graphics boards with S3 Trio / S3 Virge chip.
config FB_S3_DDC
bool "DDC for S3 support"
depends on FB_S3
select FB_DDC
default y
help
Say Y here if you want DDC support for your S3 graphics card.
config FB_SAVAGE config FB_SAVAGE
tristate "S3 Savage support" tristate "S3 Savage support"
depends on FB && PCI && EXPERIMENTAL depends on FB && PCI && EXPERIMENTAL
...@@ -1983,6 +1991,18 @@ config FB_SH_MOBILE_HDMI ...@@ -1983,6 +1991,18 @@ config FB_SH_MOBILE_HDMI
---help--- ---help---
Driver for the on-chip SH-Mobile HDMI controller. Driver for the on-chip SH-Mobile HDMI controller.
config FB_SH_MOBILE_MERAM
tristate "SuperH Mobile MERAM read ahead support for LCDC"
depends on FB_SH_MOBILE_LCDC
default y
---help---
Enable MERAM support for the SH-Mobile LCD controller.
This will allow for caching of the framebuffer to provide more
reliable access under heavy main memory bus traffic situations.
Up to 4 memory channels can be configured, allowing 4 RGB or
2 YCbCr framebuffers to be configured.
config FB_TMIO config FB_TMIO
tristate "Toshiba Mobile IO FrameBuffer support" tristate "Toshiba Mobile IO FrameBuffer support"
depends on FB && MFD_CORE depends on FB && MFD_CORE
...@@ -2246,29 +2266,43 @@ config FB_METRONOME ...@@ -2246,29 +2266,43 @@ config FB_METRONOME
config FB_MB862XX config FB_MB862XX
tristate "Fujitsu MB862xx GDC support" tristate "Fujitsu MB862xx GDC support"
depends on FB depends on FB
depends on PCI || (OF && PPC)
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
---help--- ---help---
Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers. Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers.
choice
prompt "GDC variant"
depends on FB_MB862XX
config FB_MB862XX_PCI_GDC config FB_MB862XX_PCI_GDC
bool "Carmine/Coral-P(A) GDC" bool "Carmine/Coral-P(A) GDC"
depends on PCI && FB_MB862XX depends on PCI
---help--- ---help---
This enables framebuffer support for Fujitsu Carmine/Coral-P(A) This enables framebuffer support for Fujitsu Carmine/Coral-P(A)
PCI graphics controller devices. PCI graphics controller devices.
config FB_MB862XX_LIME config FB_MB862XX_LIME
bool "Lime GDC" bool "Lime GDC"
depends on FB_MB862XX depends on OF && PPC
depends on OF && !FB_MB862XX_PCI_GDC
depends on PPC
select FB_FOREIGN_ENDIAN select FB_FOREIGN_ENDIAN
select FB_LITTLE_ENDIAN select FB_LITTLE_ENDIAN
---help--- ---help---
Framebuffer support for Fujitsu Lime GDC on host CPU bus. Framebuffer support for Fujitsu Lime GDC on host CPU bus.
endchoice
config FB_MB862XX_I2C
bool "Support I2C bus on MB862XX GDC"
depends on FB_MB862XX && I2C
default y
help
Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter
driver to support accessing I2C devices on controller's I2C bus.
These are usually some video decoder chips.
config FB_EP93XX config FB_EP93XX
tristate "EP93XX frame buffer support" tristate "EP93XX frame buffer support"
depends on FB && ARCH_EP93XX depends on FB && ARCH_EP93XX
......
...@@ -130,6 +130,7 @@ obj-$(CONFIG_FB_UDL) += udlfb.o ...@@ -130,6 +130,7 @@ obj-$(CONFIG_FB_UDL) += udlfb.o
obj-$(CONFIG_FB_XILINX) += xilinxfb.o obj-$(CONFIG_FB_XILINX) += xilinxfb.o
obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o
obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o
obj-$(CONFIG_FB_SH_MOBILE_MERAM) += sh_mobile_meram.o
obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o
obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_FB_OMAP) += omap/
obj-y += omap2/ obj-y += omap2/
......
...@@ -2224,22 +2224,23 @@ static int amifb_ioctl(struct fb_info *info, ...@@ -2224,22 +2224,23 @@ static int amifb_ioctl(struct fb_info *info,
* Allocate, Clear and Align a Block of Chip Memory * Allocate, Clear and Align a Block of Chip Memory
*/ */
static u_long unaligned_chipptr = 0; static void *aligned_chipptr;
static inline u_long __init chipalloc(u_long size) static inline u_long __init chipalloc(u_long size)
{ {
size += PAGE_SIZE-1; aligned_chipptr = amiga_chip_alloc(size, "amifb [RAM]");
if (!(unaligned_chipptr = (u_long)amiga_chip_alloc(size, if (!aligned_chipptr) {
"amifb [RAM]"))) pr_err("amifb: No Chip RAM for frame buffer");
panic("No Chip RAM for frame buffer"); return 0;
memset((void *)unaligned_chipptr, 0, size); }
return PAGE_ALIGN(unaligned_chipptr); memset(aligned_chipptr, 0, size);
return (u_long)aligned_chipptr;
} }
static inline void chipfree(void) static inline void chipfree(void)
{ {
if (unaligned_chipptr) if (aligned_chipptr)
amiga_chip_free((void *)unaligned_chipptr); amiga_chip_free(aligned_chipptr);
} }
...@@ -2295,7 +2296,7 @@ static int __init amifb_probe(struct platform_device *pdev) ...@@ -2295,7 +2296,7 @@ static int __init amifb_probe(struct platform_device *pdev)
defmode = amiga_vblank == 50 ? DEFMODE_PAL defmode = amiga_vblank == 50 ? DEFMODE_PAL
: DEFMODE_NTSC; : DEFMODE_NTSC;
if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT > if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
VIDEOMEMSIZE_ECS_1M) VIDEOMEMSIZE_ECS_2M)
fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_2M; fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_2M;
else else
fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_1M; fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_1M;
...@@ -2312,7 +2313,7 @@ static int __init amifb_probe(struct platform_device *pdev) ...@@ -2312,7 +2313,7 @@ static int __init amifb_probe(struct platform_device *pdev)
maxfmode = TAG_FMODE_4; maxfmode = TAG_FMODE_4;
defmode = DEFMODE_AGA; defmode = DEFMODE_AGA;
if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT > if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
VIDEOMEMSIZE_AGA_1M) VIDEOMEMSIZE_AGA_2M)
fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_2M; fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_2M;
else else
fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_1M; fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_1M;
...@@ -2385,6 +2386,10 @@ static int __init amifb_probe(struct platform_device *pdev) ...@@ -2385,6 +2386,10 @@ static int __init amifb_probe(struct platform_device *pdev)
DUMMYSPRITEMEMSIZE+ DUMMYSPRITEMEMSIZE+
COPINITSIZE+ COPINITSIZE+
4*COPLISTSIZE); 4*COPLISTSIZE);
if (!chipptr) {
err = -ENOMEM;
goto amifb_error;
}
assignchunk(videomemory, u_long, chipptr, fb_info.fix.smem_len); assignchunk(videomemory, u_long, chipptr, fb_info.fix.smem_len);
assignchunk(spritememory, u_long, chipptr, SPRITEMEMSIZE); assignchunk(spritememory, u_long, chipptr, SPRITEMEMSIZE);
......
...@@ -899,7 +899,7 @@ static struct fb_ops da8xx_fb_ops = { ...@@ -899,7 +899,7 @@ static struct fb_ops da8xx_fb_ops = {
.fb_blank = cfb_blank, .fb_blank = cfb_blank,
}; };
static int __init fb_probe(struct platform_device *device) static int __devinit fb_probe(struct platform_device *device)
{ {
struct da8xx_lcdc_platform_data *fb_pdata = struct da8xx_lcdc_platform_data *fb_pdata =
device->dev.platform_data; device->dev.platform_data;
...@@ -1165,7 +1165,7 @@ static int fb_resume(struct platform_device *dev) ...@@ -1165,7 +1165,7 @@ static int fb_resume(struct platform_device *dev)
static struct platform_driver da8xx_fb_driver = { static struct platform_driver da8xx_fb_driver = {
.probe = fb_probe, .probe = fb_probe,
.remove = fb_remove, .remove = __devexit_p(fb_remove),
.suspend = fb_suspend, .suspend = fb_suspend,
.resume = fb_resume, .resume = fb_resume,
.driver = { .driver = {
......
...@@ -242,9 +242,9 @@ static int set_system(const struct dmi_system_id *id) ...@@ -242,9 +242,9 @@ static int set_system(const struct dmi_system_id *id)
return 0; return 0;
} }
printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p " printk(KERN_INFO "efifb: dmi detected %s - framebuffer at 0x%08x "
"(%dx%d, stride %d)\n", id->ident, "(%dx%d, stride %d)\n", id->ident,
(void *)screen_info.lfb_base, screen_info.lfb_width, screen_info.lfb_base, screen_info.lfb_width,
screen_info.lfb_height, screen_info.lfb_linelength); screen_info.lfb_height, screen_info.lfb_linelength);
......
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
# Makefile for the MB862xx framebuffer driver # Makefile for the MB862xx framebuffer driver
# #
obj-$(CONFIG_FB_MB862XX) := mb862xxfb.o mb862xxfb_accel.o obj-$(CONFIG_FB_MB862XX) += mb862xxfb.o
mb862xxfb-y := mb862xxfbdrv.o mb862xxfb_accel.o
mb862xxfb-$(CONFIG_FB_MB862XX_I2C) += mb862xx-i2c.o
/*
* Coral-P(A)/Lime I2C adapter driver
*
* (C) 2011 DENX Software Engineering, Anatolij Gustschin <agust@denx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/fb.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include "mb862xxfb.h"
#include "mb862xx_reg.h"
static int mb862xx_i2c_wait_event(struct i2c_adapter *adap)
{
struct mb862xxfb_par *par = adap->algo_data;
u32 reg;
do {
udelay(1);
reg = inreg(i2c, GC_I2C_BCR);
if (reg & (I2C_INT | I2C_BER))
break;
} while (1);
return (reg & I2C_BER) ? 0 : 1;
}
static int mb862xx_i2c_do_address(struct i2c_adapter *adap, int addr)
{
struct mb862xxfb_par *par = adap->algo_data;
outreg(i2c, GC_I2C_DAR, addr);
outreg(i2c, GC_I2C_CCR, I2C_CLOCK_AND_ENABLE);
outreg(i2c, GC_I2C_BCR, par->i2c_rs ? I2C_REPEATED_START : I2C_START);
if (!mb862xx_i2c_wait_event(adap))
return -EIO;
par->i2c_rs = !(inreg(i2c, GC_I2C_BSR) & I2C_LRB);
return par->i2c_rs;
}
static int mb862xx_i2c_write_byte(struct i2c_adapter *adap, u8 byte)
{
struct mb862xxfb_par *par = adap->algo_data;
outreg(i2c, GC_I2C_DAR, byte);
outreg(i2c, GC_I2C_BCR, I2C_START);
if (!mb862xx_i2c_wait_event(adap))
return -EIO;
return !(inreg(i2c, GC_I2C_BSR) & I2C_LRB);
}
static int mb862xx_i2c_read_byte(struct i2c_adapter *adap, u8 *byte, int last)
{
struct mb862xxfb_par *par = adap->algo_data;
outreg(i2c, GC_I2C_BCR, I2C_START | (last ? 0 : I2C_ACK));
if (!mb862xx_i2c_wait_event(adap))
return 0;
*byte = inreg(i2c, GC_I2C_DAR);
return 1;
}
void mb862xx_i2c_stop(struct i2c_adapter *adap)
{
struct mb862xxfb_par *par = adap->algo_data;
outreg(i2c, GC_I2C_BCR, I2C_STOP);
outreg(i2c, GC_I2C_CCR, I2C_DISABLE);
par->i2c_rs = 0;
}
static int mb862xx_i2c_read(struct i2c_adapter *adap, struct i2c_msg *m)
{
int i, ret = 0;
int last = m->len - 1;
for (i = 0; i < m->len; i++) {
if (!mb862xx_i2c_read_byte(adap, &m->buf[i], i == last)) {
ret = -EIO;
break;
}
}
return ret;
}
static int mb862xx_i2c_write(struct i2c_adapter *adap, struct i2c_msg *m)
{
int i, ret = 0;
for (i = 0; i < m->len; i++) {
if (!mb862xx_i2c_write_byte(adap, m->buf[i])) {
ret = -EIO;
break;
}
}
return ret;
}
static int mb862xx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num)
{
struct mb862xxfb_par *par = adap->algo_data;
struct i2c_msg *m;
int addr;
int i = 0, err = 0;
dev_dbg(par->dev, "%s: %d msgs\n", __func__, num);
for (i = 0; i < num; i++) {
m = &msgs[i];
if (!m->len) {
dev_dbg(par->dev, "%s: null msgs\n", __func__);
continue;
}
addr = m->addr;
if (m->flags & I2C_M_RD)
addr |= 1;
err = mb862xx_i2c_do_address(adap, addr);
if (err < 0)
break;
if (m->flags & I2C_M_RD)
err = mb862xx_i2c_read(adap, m);
else
err = mb862xx_i2c_write(adap, m);
}
if (i)
mb862xx_i2c_stop(adap);
return (err < 0) ? err : i;
}
static u32 mb862xx_func(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_BYTE_DATA;
}
static const struct i2c_algorithm mb862xx_algo = {
.master_xfer = mb862xx_xfer,
.functionality = mb862xx_func,
};
static struct i2c_adapter mb862xx_i2c_adapter = {
.name = "MB862xx I2C adapter",
.algo = &mb862xx_algo,
.owner = THIS_MODULE,
};
int mb862xx_i2c_init(struct mb862xxfb_par *par)
{
int ret;
mb862xx_i2c_adapter.algo_data = par;
par->adap = &mb862xx_i2c_adapter;
ret = i2c_add_adapter(par->adap);
if (ret < 0) {
dev_err(par->dev, "failed to add %s\n",
mb862xx_i2c_adapter.name);
}
return ret;
}
void mb862xx_i2c_exit(struct mb862xxfb_par *par)
{
if (par->adap) {
i2c_del_adapter(par->adap);
par->adap = NULL;
}
}
...@@ -5,11 +5,8 @@ ...@@ -5,11 +5,8 @@
#ifndef _MB862XX_REG_H #ifndef _MB862XX_REG_H
#define _MB862XX_REG_H #define _MB862XX_REG_H
#ifdef MB862XX_MMIO_BOTTOM
#define MB862XX_MMIO_BASE 0x03fc0000
#else
#define MB862XX_MMIO_BASE 0x01fc0000 #define MB862XX_MMIO_BASE 0x01fc0000
#endif #define MB862XX_MMIO_HIGH_BASE 0x03fc0000
#define MB862XX_I2C_BASE 0x0000c000 #define MB862XX_I2C_BASE 0x0000c000
#define MB862XX_DISP_BASE 0x00010000 #define MB862XX_DISP_BASE 0x00010000
#define MB862XX_CAP_BASE 0x00018000 #define MB862XX_CAP_BASE 0x00018000
...@@ -23,6 +20,7 @@ ...@@ -23,6 +20,7 @@
#define GC_IMASK 0x00000024 #define GC_IMASK 0x00000024
#define GC_SRST 0x0000002c #define GC_SRST 0x0000002c
#define GC_CCF 0x00000038 #define GC_CCF 0x00000038
#define GC_RSW 0x0000005c
#define GC_CID 0x000000f0 #define GC_CID 0x000000f0
#define GC_REVISION 0x00000084 #define GC_REVISION 0x00000084
...@@ -53,10 +51,16 @@ ...@@ -53,10 +51,16 @@
#define GC_L0OA0 0x00000024 #define GC_L0OA0 0x00000024
#define GC_L0DA0 0x00000028 #define GC_L0DA0 0x00000028
#define GC_L0DY_L0DX 0x0000002c #define GC_L0DY_L0DX 0x0000002c
#define GC_L1M 0x00000030
#define GC_L1DA 0x00000034
#define GC_DCM1 0x00000100 #define GC_DCM1 0x00000100
#define GC_L0EM 0x00000110 #define GC_L0EM 0x00000110
#define GC_L0WY_L0WX 0x00000114 #define GC_L0WY_L0WX 0x00000114
#define GC_L0WH_L0WW 0x00000118 #define GC_L0WH_L0WW 0x00000118
#define GC_L1EM 0x00000120
#define GC_L1WY_L1WX 0x00000124
#define GC_L1WH_L1WW 0x00000128
#define GC_DLS 0x00000180
#define GC_DCM2 0x00000104 #define GC_DCM2 0x00000104
#define GC_DCM3 0x00000108 #define GC_DCM3 0x00000108
#define GC_CPM_CUTC 0x000000a0 #define GC_CPM_CUTC 0x000000a0
...@@ -68,6 +72,11 @@ ...@@ -68,6 +72,11 @@
#define GC_CPM_CEN0 0x00100000 #define GC_CPM_CEN0 0x00100000
#define GC_CPM_CEN1 0x00200000 #define GC_CPM_CEN1 0x00200000
#define GC_DCM1_DEN 0x80000000
#define GC_DCM1_L1E 0x00020000
#define GC_L1M_16 0x80000000
#define GC_L1M_YC 0x40000000
#define GC_L1M_CS 0x20000000
#define GC_DCM01_ESY 0x00000004 #define GC_DCM01_ESY 0x00000004
#define GC_DCM01_SC 0x00003f00 #define GC_DCM01_SC 0x00003f00
...@@ -79,9 +88,50 @@ ...@@ -79,9 +88,50 @@
#define GC_L0M_L0C_16 0x80000000 #define GC_L0M_L0C_16 0x80000000
#define GC_L0EM_L0EC_24 0x40000000 #define GC_L0EM_L0EC_24 0x40000000
#define GC_L0M_L0W_UNIT 64 #define GC_L0M_L0W_UNIT 64
#define GC_L1EM_DM 0x02000000
#define GC_DISP_REFCLK_400 400 #define GC_DISP_REFCLK_400 400
/* I2C */
#define GC_I2C_BSR 0x00000000 /* BSR */
#define GC_I2C_BCR 0x00000004 /* BCR */
#define GC_I2C_CCR 0x00000008 /* CCR */
#define GC_I2C_ADR 0x0000000C /* ADR */
#define GC_I2C_DAR 0x00000010 /* DAR */
#define I2C_DISABLE 0x00000000
#define I2C_STOP 0x00000000
#define I2C_START 0x00000010
#define I2C_REPEATED_START 0x00000030
#define I2C_CLOCK_AND_ENABLE 0x0000003f
#define I2C_READY 0x01
#define I2C_INT 0x01
#define I2C_INTE 0x02
#define I2C_ACK 0x08
#define I2C_BER 0x80
#define I2C_BEIE 0x40
#define I2C_TRX 0x80
#define I2C_LRB 0x10
/* Capture registers and bits */
#define GC_CAP_VCM 0x00000000
#define GC_CAP_CSC 0x00000004
#define GC_CAP_VCS 0x00000008
#define GC_CAP_CBM 0x00000010
#define GC_CAP_CBOA 0x00000014
#define GC_CAP_CBLA 0x00000018
#define GC_CAP_IMG_START 0x0000001C
#define GC_CAP_IMG_END 0x00000020
#define GC_CAP_CMSS 0x00000048
#define GC_CAP_CMDS 0x0000004C
#define GC_VCM_VIE 0x80000000
#define GC_VCM_CM 0x03000000
#define GC_VCM_VS_PAL 0x00000002
#define GC_CBM_OO 0x80000000
#define GC_CBM_HRV 0x00000010
#define GC_CBM_CBST 0x00000001
/* Carmine specific */ /* Carmine specific */
#define MB86297_DRAW_BASE 0x00020000 #define MB86297_DRAW_BASE 0x00020000
#define MB86297_DISP0_BASE 0x00100000 #define MB86297_DISP0_BASE 0x00100000
......
#ifndef __MB862XX_H__ #ifndef __MB862XX_H__
#define __MB862XX_H__ #define __MB862XX_H__
struct mb862xx_l1_cfg {
unsigned short sx;
unsigned short sy;
unsigned short sw;
unsigned short sh;
unsigned short dx;
unsigned short dy;
unsigned short dw;
unsigned short dh;
int mirror;
};
#define MB862XX_BASE 'M'
#define MB862XX_L1_GET_CFG _IOR(MB862XX_BASE, 0, struct mb862xx_l1_cfg*)
#define MB862XX_L1_SET_CFG _IOW(MB862XX_BASE, 1, struct mb862xx_l1_cfg*)
#define MB862XX_L1_ENABLE _IOW(MB862XX_BASE, 2, int)
#define MB862XX_L1_CAP_CTL _IOW(MB862XX_BASE, 3, int)
#ifdef __KERNEL__
#define PCI_VENDOR_ID_FUJITSU_LIMITED 0x10cf #define PCI_VENDOR_ID_FUJITSU_LIMITED 0x10cf
#define PCI_DEVICE_ID_FUJITSU_CORALP 0x2019 #define PCI_DEVICE_ID_FUJITSU_CORALP 0x2019
#define PCI_DEVICE_ID_FUJITSU_CORALPA 0x201e #define PCI_DEVICE_ID_FUJITSU_CORALPA 0x201e
...@@ -38,6 +58,8 @@ struct mb862xxfb_par { ...@@ -38,6 +58,8 @@ struct mb862xxfb_par {
void __iomem *mmio_base; /* remapped registers */ void __iomem *mmio_base; /* remapped registers */
size_t mapped_vram; /* length of remapped vram */ size_t mapped_vram; /* length of remapped vram */
size_t mmio_len; /* length of register region */ size_t mmio_len; /* length of register region */
unsigned long cap_buf; /* capture buffers offset */
size_t cap_len; /* length of capture buffers */
void __iomem *host; /* relocatable reg. bases */ void __iomem *host; /* relocatable reg. bases */
void __iomem *i2c; void __iomem *i2c;
...@@ -57,11 +79,23 @@ struct mb862xxfb_par { ...@@ -57,11 +79,23 @@ struct mb862xxfb_par {
unsigned int refclk; /* disp. reference clock */ unsigned int refclk; /* disp. reference clock */
struct mb862xx_gc_mode *gc_mode; /* GDC mode init data */ struct mb862xx_gc_mode *gc_mode; /* GDC mode init data */
int pre_init; /* don't init display if 1 */ int pre_init; /* don't init display if 1 */
struct i2c_adapter *adap; /* GDC I2C bus adapter */
int i2c_rs;
struct mb862xx_l1_cfg l1_cfg;
int l1_stride;
u32 pseudo_palette[16]; u32 pseudo_palette[16];
}; };
extern void mb862xxfb_init_accel(struct fb_info *info, int xres); extern void mb862xxfb_init_accel(struct fb_info *info, int xres);
#ifdef CONFIG_FB_MB862XX_I2C
extern int mb862xx_i2c_init(struct mb862xxfb_par *par);
extern void mb862xx_i2c_exit(struct mb862xxfb_par *par);
#else
static inline int mb862xx_i2c_init(struct mb862xxfb_par *par) { return 0; }
static inline void mb862xx_i2c_exit(struct mb862xxfb_par *par) { }
#endif
#if defined(CONFIG_FB_MB862XX_LIME) && defined(CONFIG_FB_MB862XX_PCI_GDC) #if defined(CONFIG_FB_MB862XX_LIME) && defined(CONFIG_FB_MB862XX_PCI_GDC)
#error "Select Lime GDC or CoralP/Carmine support, but not both together" #error "Select Lime GDC or CoralP/Carmine support, but not both together"
...@@ -82,4 +116,6 @@ extern void mb862xxfb_init_accel(struct fb_info *info, int xres); ...@@ -82,4 +116,6 @@ extern void mb862xxfb_init_accel(struct fb_info *info, int xres);
#define pack(a, b) (((a) << 16) | (b)) #define pack(a, b) (((a) << 16) | (b))
#endif /* __KERNEL__ */
#endif #endif
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define NR_PALETTE 256 #define NR_PALETTE 256
#define MB862XX_MEM_SIZE 0x1000000 #define MB862XX_MEM_SIZE 0x1000000
#define CORALP_MEM_SIZE 0x4000000 #define CORALP_MEM_SIZE 0x2000000
#define CARMINE_MEM_SIZE 0x8000000 #define CARMINE_MEM_SIZE 0x8000000
#define DRV_NAME "mb862xxfb" #define DRV_NAME "mb862xxfb"
...@@ -309,6 +309,97 @@ static int mb862xxfb_blank(int mode, struct fb_info *fbi) ...@@ -309,6 +309,97 @@ static int mb862xxfb_blank(int mode, struct fb_info *fbi)
return 0; return 0;
} }
static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned int cmd,
unsigned long arg)
{
struct mb862xxfb_par *par = fbi->par;
struct mb862xx_l1_cfg *l1_cfg = &par->l1_cfg;
void __user *argp = (void __user *)arg;
int *enable;
u32 l1em = 0;
switch (cmd) {
case MB862XX_L1_GET_CFG:
if (copy_to_user(argp, l1_cfg, sizeof(*l1_cfg)))
return -EFAULT;
break;
case MB862XX_L1_SET_CFG:
if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
return -EFAULT;
if ((l1_cfg->sw >= l1_cfg->dw) && (l1_cfg->sh >= l1_cfg->dh)) {
/* downscaling */
outreg(cap, GC_CAP_CSC,
pack((l1_cfg->sh << 11) / l1_cfg->dh,
(l1_cfg->sw << 11) / l1_cfg->dw));
l1em = inreg(disp, GC_L1EM);
l1em &= ~GC_L1EM_DM;
} else if ((l1_cfg->sw <= l1_cfg->dw) &&
(l1_cfg->sh <= l1_cfg->dh)) {
/* upscaling */
outreg(cap, GC_CAP_CSC,
pack((l1_cfg->sh << 11) / l1_cfg->dh,
(l1_cfg->sw << 11) / l1_cfg->dw));
outreg(cap, GC_CAP_CMSS,
pack(l1_cfg->sw >> 1, l1_cfg->sh));
outreg(cap, GC_CAP_CMDS,
pack(l1_cfg->dw >> 1, l1_cfg->dh));
l1em = inreg(disp, GC_L1EM);
l1em |= GC_L1EM_DM;
}
if (l1_cfg->mirror) {
outreg(cap, GC_CAP_CBM,
inreg(cap, GC_CAP_CBM) | GC_CBM_HRV);
l1em |= l1_cfg->dw * 2 - 8;
} else {
outreg(cap, GC_CAP_CBM,
inreg(cap, GC_CAP_CBM) & ~GC_CBM_HRV);
l1em &= 0xffff0000;
}
outreg(disp, GC_L1EM, l1em);
break;
case MB862XX_L1_ENABLE:
enable = (int *)arg;
if (*enable) {
outreg(disp, GC_L1DA, par->cap_buf);
outreg(cap, GC_CAP_IMG_START,
pack(l1_cfg->sy >> 1, l1_cfg->sx));
outreg(cap, GC_CAP_IMG_END,
pack(l1_cfg->sh, l1_cfg->sw));
outreg(disp, GC_L1M, GC_L1M_16 | GC_L1M_YC | GC_L1M_CS |
(par->l1_stride << 16));
outreg(disp, GC_L1WY_L1WX,
pack(l1_cfg->dy, l1_cfg->dx));
outreg(disp, GC_L1WH_L1WW,
pack(l1_cfg->dh - 1, l1_cfg->dw));
outreg(disp, GC_DLS, 1);
outreg(cap, GC_CAP_VCM,
GC_VCM_VIE | GC_VCM_CM | GC_VCM_VS_PAL);
outreg(disp, GC_DCM1, inreg(disp, GC_DCM1) |
GC_DCM1_DEN | GC_DCM1_L1E);
} else {
outreg(cap, GC_CAP_VCM,
inreg(cap, GC_CAP_VCM) & ~GC_VCM_VIE);
outreg(disp, GC_DCM1,
inreg(disp, GC_DCM1) & ~GC_DCM1_L1E);
}
break;
case MB862XX_L1_CAP_CTL:
enable = (int *)arg;
if (*enable) {
outreg(cap, GC_CAP_VCM,
inreg(cap, GC_CAP_VCM) | GC_VCM_VIE);
} else {
outreg(cap, GC_CAP_VCM,
inreg(cap, GC_CAP_VCM) & ~GC_VCM_VIE);
}
break;
default:
return -EINVAL;
}
return 0;
}
/* framebuffer ops */ /* framebuffer ops */
static struct fb_ops mb862xxfb_ops = { static struct fb_ops mb862xxfb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -320,6 +411,7 @@ static struct fb_ops mb862xxfb_ops = { ...@@ -320,6 +411,7 @@ static struct fb_ops mb862xxfb_ops = {
.fb_fillrect = cfb_fillrect, .fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea, .fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_ioctl = mb862xxfb_ioctl,
}; };
/* initialize fb_info data */ /* initialize fb_info data */
...@@ -328,6 +420,7 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) ...@@ -328,6 +420,7 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
struct mb862xxfb_par *par = fbi->par; struct mb862xxfb_par *par = fbi->par;
struct mb862xx_gc_mode *mode = par->gc_mode; struct mb862xx_gc_mode *mode = par->gc_mode;
unsigned long reg; unsigned long reg;
int stride;
fbi->fbops = &mb862xxfb_ops; fbi->fbops = &mb862xxfb_ops;
fbi->pseudo_palette = par->pseudo_palette; fbi->pseudo_palette = par->pseudo_palette;
...@@ -336,7 +429,6 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) ...@@ -336,7 +429,6 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
strcpy(fbi->fix.id, DRV_NAME); strcpy(fbi->fix.id, DRV_NAME);
fbi->fix.smem_start = (unsigned long)par->fb_base_phys; fbi->fix.smem_start = (unsigned long)par->fb_base_phys;
fbi->fix.smem_len = par->mapped_vram;
fbi->fix.mmio_start = (unsigned long)par->mmio_base_phys; fbi->fix.mmio_start = (unsigned long)par->mmio_base_phys;
fbi->fix.mmio_len = par->mmio_len; fbi->fix.mmio_len = par->mmio_len;
fbi->fix.accel = FB_ACCEL_NONE; fbi->fix.accel = FB_ACCEL_NONE;
...@@ -420,6 +512,28 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) ...@@ -420,6 +512,28 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
fbi->fix.line_length = (fbi->var.xres_virtual * fbi->fix.line_length = (fbi->var.xres_virtual *
fbi->var.bits_per_pixel) / 8; fbi->var.bits_per_pixel) / 8;
fbi->fix.smem_len = fbi->fix.line_length * fbi->var.yres_virtual;
/*
* reserve space for capture buffers and two cursors
* at the end of vram: 720x576 * 2 * 2.2 + 64x64 * 16.
*/
par->cap_buf = par->mapped_vram - 0x1bd800 - 0x10000;
par->cap_len = 0x1bd800;
par->l1_cfg.sx = 0;
par->l1_cfg.sy = 0;
par->l1_cfg.sw = 720;
par->l1_cfg.sh = 576;
par->l1_cfg.dx = 0;
par->l1_cfg.dy = 0;
par->l1_cfg.dw = 720;
par->l1_cfg.dh = 576;
stride = par->l1_cfg.sw * (fbi->var.bits_per_pixel / 8);
par->l1_stride = stride / 64 + ((stride % 64) ? 1 : 0);
outreg(cap, GC_CAP_CBM, GC_CBM_OO | GC_CBM_CBST |
(par->l1_stride << 16));
outreg(cap, GC_CAP_CBOA, par->cap_buf);
outreg(cap, GC_CAP_CBLA, par->cap_buf + par->cap_len);
return 0; return 0;
} }
...@@ -742,22 +856,38 @@ static int coralp_init(struct mb862xxfb_par *par) ...@@ -742,22 +856,38 @@ static int coralp_init(struct mb862xxfb_par *par)
par->refclk = GC_DISP_REFCLK_400; par->refclk = GC_DISP_REFCLK_400;
if (par->mapped_vram >= 0x2000000) {
/* relocate gdc registers space */
writel(1, par->fb_base + MB862XX_MMIO_BASE + GC_RSW);
udelay(1); /* wait at least 20 bus cycles */
}
ver = inreg(host, GC_CID); ver = inreg(host, GC_CID);
cn = (ver & GC_CID_CNAME_MSK) >> 8; cn = (ver & GC_CID_CNAME_MSK) >> 8;
ver = ver & GC_CID_VERSION_MSK; ver = ver & GC_CID_VERSION_MSK;
if (cn == 3) { if (cn == 3) {
unsigned long reg;
dev_info(par->dev, "Fujitsu Coral-%s GDC Rev.%d found\n",\ dev_info(par->dev, "Fujitsu Coral-%s GDC Rev.%d found\n",\
(ver == 6) ? "P" : (ver == 8) ? "PA" : "?", (ver == 6) ? "P" : (ver == 8) ? "PA" : "?",
par->pdev->revision); par->pdev->revision);
reg = inreg(disp, GC_DCM1);
if (reg & GC_DCM01_DEN && reg & GC_DCM01_L0E)
par->pre_init = 1;
if (!par->pre_init) {
outreg(host, GC_CCF, GC_CCF_CGE_166 | GC_CCF_COT_133); outreg(host, GC_CCF, GC_CCF_CGE_166 | GC_CCF_COT_133);
udelay(200); udelay(200);
outreg(host, GC_MMR, GC_MMR_CORALP_EVB_VAL); outreg(host, GC_MMR, GC_MMR_CORALP_EVB_VAL);
udelay(10); udelay(10);
}
/* Clear interrupt status */ /* Clear interrupt status */
outreg(host, GC_IST, 0); outreg(host, GC_IST, 0);
} else { } else {
return -ENODEV; return -ENODEV;
} }
mb862xx_i2c_init(par);
return 0; return 0;
} }
...@@ -899,7 +1029,13 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, ...@@ -899,7 +1029,13 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
case PCI_DEVICE_ID_FUJITSU_CORALPA: case PCI_DEVICE_ID_FUJITSU_CORALPA:
par->fb_base_phys = pci_resource_start(par->pdev, 0); par->fb_base_phys = pci_resource_start(par->pdev, 0);
par->mapped_vram = CORALP_MEM_SIZE; par->mapped_vram = CORALP_MEM_SIZE;
par->mmio_base_phys = par->fb_base_phys + MB862XX_MMIO_BASE; if (par->mapped_vram >= 0x2000000) {
par->mmio_base_phys = par->fb_base_phys +
MB862XX_MMIO_HIGH_BASE;
} else {
par->mmio_base_phys = par->fb_base_phys +
MB862XX_MMIO_BASE;
}
par->mmio_len = MB862XX_MMIO_SIZE; par->mmio_len = MB862XX_MMIO_SIZE;
par->type = BT_CORALP; par->type = BT_CORALP;
break; break;
...@@ -1009,6 +1145,8 @@ static void __devexit mb862xx_pci_remove(struct pci_dev *pdev) ...@@ -1009,6 +1145,8 @@ static void __devexit mb862xx_pci_remove(struct pci_dev *pdev)
outreg(host, GC_IMASK, 0); outreg(host, GC_IMASK, 0);
} }
mb862xx_i2c_exit(par);
device_remove_file(&pdev->dev, &dev_attr_dispregs); device_remove_file(&pdev->dev, &dev_attr_dispregs);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
......
...@@ -922,14 +922,14 @@ static int get_dss_clocks(void) ...@@ -922,14 +922,14 @@ static int get_dss_clocks(void)
return PTR_ERR(dispc.dss_ick); return PTR_ERR(dispc.dss_ick);
} }
dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck"); dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "fck");
if (IS_ERR(dispc.dss1_fck)) { if (IS_ERR(dispc.dss1_fck)) {
dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
clk_put(dispc.dss_ick); clk_put(dispc.dss_ick);
return PTR_ERR(dispc.dss1_fck); return PTR_ERR(dispc.dss1_fck);
} }
dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck"); dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_clk");
if (IS_ERR(dispc.dss_54m_fck)) { if (IS_ERR(dispc.dss_54m_fck)) {
dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
clk_put(dispc.dss_ick); clk_put(dispc.dss_ick);
......
...@@ -90,7 +90,7 @@ static void omapdss_release(struct device *dev) ...@@ -90,7 +90,7 @@ static void omapdss_release(struct device *dev)
/* dummy device for clocks */ /* dummy device for clocks */
static struct platform_device omapdss_device = { static struct platform_device omapdss_device = {
.name = "omapdss", .name = "omapdss_dss",
.id = -1, .id = -1,
.dev = { .dev = {
.release = omapdss_release, .release = omapdss_release,
......
...@@ -90,7 +90,7 @@ static int rfbi_get_clocks(void) ...@@ -90,7 +90,7 @@ static int rfbi_get_clocks(void)
return PTR_ERR(rfbi.dss_ick); return PTR_ERR(rfbi.dss_ick);
} }
rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck"); rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "fck");
if (IS_ERR(rfbi.dss1_fck)) { if (IS_ERR(rfbi.dss1_fck)) {
dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
clk_put(rfbi.dss_ick); clk_put(rfbi.dss_ick);
......
obj-$(CONFIG_OMAP2_VRAM) += vram.o obj-$(CONFIG_OMAP2_VRAM) += vram.o
obj-$(CONFIG_OMAP2_VRFB) += vrfb.o obj-$(CONFIG_OMAP2_VRFB) += vrfb.o
obj-y += dss/ obj-$(CONFIG_OMAP2_DSS) += dss/
obj-y += omapfb/ obj-$(CONFIG_FB_OMAP2) += omapfb/
obj-y += displays/ obj-y += displays/
...@@ -3,6 +3,7 @@ menu "OMAP2/3 Display Device Drivers" ...@@ -3,6 +3,7 @@ menu "OMAP2/3 Display Device Drivers"
config PANEL_GENERIC_DPI config PANEL_GENERIC_DPI
tristate "Generic DPI Panel" tristate "Generic DPI Panel"
depends on OMAP2_DSS_DPI
help help
Generic DPI panel driver. Generic DPI panel driver.
Supports DVI output for Beagle and OMAP3 SDP. Supports DVI output for Beagle and OMAP3 SDP.
...@@ -11,20 +12,20 @@ config PANEL_GENERIC_DPI ...@@ -11,20 +12,20 @@ config PANEL_GENERIC_DPI
config PANEL_LGPHILIPS_LB035Q02 config PANEL_LGPHILIPS_LB035Q02
tristate "LG.Philips LB035Q02 LCD Panel" tristate "LG.Philips LB035Q02 LCD Panel"
depends on OMAP2_DSS && SPI depends on OMAP2_DSS_DPI && SPI
help help
LCD Panel used on the Gumstix Overo Palo35 LCD Panel used on the Gumstix Overo Palo35
config PANEL_SHARP_LS037V7DW01 config PANEL_SHARP_LS037V7DW01
tristate "Sharp LS037V7DW01 LCD Panel" tristate "Sharp LS037V7DW01 LCD Panel"
depends on OMAP2_DSS depends on OMAP2_DSS_DPI
select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_CLASS_DEVICE
help help
LCD Panel used in TI's SDP3430 and EVM boards LCD Panel used in TI's SDP3430 and EVM boards
config PANEL_NEC_NL8048HL11_01B config PANEL_NEC_NL8048HL11_01B
tristate "NEC NL8048HL11-01B Panel" tristate "NEC NL8048HL11-01B Panel"
depends on OMAP2_DSS depends on OMAP2_DSS_DPI
help help
This NEC NL8048HL11-01B panel is TFT LCD This NEC NL8048HL11-01B panel is TFT LCD
used in the Zoom2/3/3630 sdp boards. used in the Zoom2/3/3630 sdp boards.
...@@ -37,7 +38,7 @@ config PANEL_TAAL ...@@ -37,7 +38,7 @@ config PANEL_TAAL
config PANEL_TPO_TD043MTEA1 config PANEL_TPO_TD043MTEA1
tristate "TPO TD043MTEA1 LCD Panel" tristate "TPO TD043MTEA1 LCD Panel"
depends on OMAP2_DSS && SPI depends on OMAP2_DSS_DPI && SPI
help help
LCD Panel used in OMAP3 Pandora LCD Panel used in OMAP3 Pandora
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <linux/backlight.h> #include <linux/backlight.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <plat/display.h> #include <video/omapdss.h>
#define MIPID_CMD_READ_DISP_ID 0x04 #define MIPID_CMD_READ_DISP_ID 0x04
#define MIPID_CMD_READ_RED 0x06 #define MIPID_CMD_READ_RED 0x06
......
...@@ -33,8 +33,9 @@ ...@@ -33,8 +33,9 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <video/omapdss.h>
#include <plat/panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
struct panel_config { struct panel_config {
struct omap_video_timings timings; struct omap_video_timings timings;
...@@ -181,6 +182,56 @@ static struct panel_config generic_dpi_panels[] = { ...@@ -181,6 +182,56 @@ static struct panel_config generic_dpi_panels[] = {
.power_off_delay = 0, .power_off_delay = 0,
.name = "samsung_lte430wq_f0c", .name = "samsung_lte430wq_f0c",
}, },
/* Seiko 70WVW1TZ3Z3 */
{
{
.x_res = 800,
.y_res = 480,
.pixel_clock = 33000,
.hsw = 128,
.hfp = 10,
.hbp = 10,
.vsw = 2,
.vfp = 4,
.vbp = 11,
},
.acbi = 0x0,
.acb = 0x0,
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
OMAP_DSS_LCD_IHS,
.power_on_delay = 0,
.power_off_delay = 0,
.name = "seiko_70wvw1tz3",
},
/* Powertip PH480272T */
{
{
.x_res = 480,
.y_res = 272,
.pixel_clock = 9000,
.hsw = 40,
.hfp = 2,
.hbp = 2,
.vsw = 10,
.vfp = 2,
.vbp = 2,
},
.acbi = 0x0,
.acb = 0x0,
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
.power_on_delay = 0,
.power_off_delay = 0,
.name = "powertip_ph480272t",
},
}; };
struct panel_drv_data { struct panel_drv_data {
...@@ -285,7 +336,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) ...@@ -285,7 +336,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev)
return 0; return 0;
} }
static void generic_dpi_panel_remove(struct omap_dss_device *dssdev) static void __exit generic_dpi_panel_remove(struct omap_dss_device *dssdev)
{ {
struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);
...@@ -358,7 +409,7 @@ static int generic_dpi_panel_check_timings(struct omap_dss_device *dssdev, ...@@ -358,7 +409,7 @@ static int generic_dpi_panel_check_timings(struct omap_dss_device *dssdev,
static struct omap_dss_driver dpi_driver = { static struct omap_dss_driver dpi_driver = {
.probe = generic_dpi_panel_probe, .probe = generic_dpi_panel_probe,
.remove = generic_dpi_panel_remove, .remove = __exit_p(generic_dpi_panel_remove),
.enable = generic_dpi_panel_enable, .enable = generic_dpi_panel_enable,
.disable = generic_dpi_panel_disable, .disable = generic_dpi_panel_disable,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <plat/display.h> #include <video/omapdss.h>
struct lb035q02_data { struct lb035q02_data {
struct mutex lock; struct mutex lock;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/backlight.h> #include <linux/backlight.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <plat/display.h> #include <video/omapdss.h>
#define LCD_XRES 800 #define LCD_XRES 800
#define LCD_YRES 480 #define LCD_YRES 480
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <plat/display.h> #include <video/omapdss.h>
struct sharp_data { struct sharp_data {
struct backlight_device *bl; struct backlight_device *bl;
...@@ -120,7 +120,7 @@ static int sharp_ls_panel_probe(struct omap_dss_device *dssdev) ...@@ -120,7 +120,7 @@ static int sharp_ls_panel_probe(struct omap_dss_device *dssdev)
return 0; return 0;
} }
static void sharp_ls_panel_remove(struct omap_dss_device *dssdev) static void __exit sharp_ls_panel_remove(struct omap_dss_device *dssdev)
{ {
struct sharp_data *sd = dev_get_drvdata(&dssdev->dev); struct sharp_data *sd = dev_get_drvdata(&dssdev->dev);
struct backlight_device *bl = sd->bl; struct backlight_device *bl = sd->bl;
...@@ -205,7 +205,7 @@ static int sharp_ls_panel_resume(struct omap_dss_device *dssdev) ...@@ -205,7 +205,7 @@ static int sharp_ls_panel_resume(struct omap_dss_device *dssdev)
static struct omap_dss_driver sharp_ls_driver = { static struct omap_dss_driver sharp_ls_driver = {
.probe = sharp_ls_panel_probe, .probe = sharp_ls_panel_probe,
.remove = sharp_ls_panel_remove, .remove = __exit_p(sharp_ls_panel_remove),
.enable = sharp_ls_panel_enable, .enable = sharp_ls_panel_enable,
.disable = sharp_ls_panel_disable, .disable = sharp_ls_panel_disable,
......
This diff is collapsed.
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <plat/display.h> #include <video/omapdss.h>
#define TPO_R02_MODE(x) ((x) & 7) #define TPO_R02_MODE(x) ((x) & 7)
#define TPO_R02_MODE_800x480 7 #define TPO_R02_MODE_800x480 7
...@@ -144,13 +144,15 @@ static ssize_t tpo_td043_vmirror_store(struct device *dev, ...@@ -144,13 +144,15 @@ static ssize_t tpo_td043_vmirror_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count) struct device_attribute *attr, const char *buf, size_t count)
{ {
struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dev); struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dev);
long val; int val;
int ret; int ret;
ret = strict_strtol(buf, 0, &val); ret = kstrtoint(buf, 0, &val);
if (ret < 0) if (ret < 0)
return ret; return ret;
val = !!val;
ret = tpo_td043_write_mirror(tpo_td043->spi, tpo_td043->hmirror, val); ret = tpo_td043_write_mirror(tpo_td043->spi, tpo_td043->hmirror, val);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -175,7 +177,7 @@ static ssize_t tpo_td043_mode_store(struct device *dev, ...@@ -175,7 +177,7 @@ static ssize_t tpo_td043_mode_store(struct device *dev,
long val; long val;
int ret; int ret;
ret = strict_strtol(buf, 0, &val); ret = kstrtol(buf, 0, &val);
if (ret != 0 || val & ~7) if (ret != 0 || val & ~7)
return -EINVAL; return -EINVAL;
......
...@@ -80,7 +80,7 @@ config OMAP2_DSS_SDI ...@@ -80,7 +80,7 @@ config OMAP2_DSS_SDI
config OMAP2_DSS_DSI config OMAP2_DSS_DSI
bool "DSI support" bool "DSI support"
depends on ARCH_OMAP3 depends on ARCH_OMAP3 || ARCH_OMAP4
default n default n
help help
MIPI DSI (Display Serial Interface) support. MIPI DSI (Display Serial Interface) support.
...@@ -90,14 +90,6 @@ config OMAP2_DSS_DSI ...@@ -90,14 +90,6 @@ config OMAP2_DSS_DSI
See http://www.mipi.org/ for DSI spesifications. See http://www.mipi.org/ for DSI spesifications.
config OMAP2_DSS_USE_DSI_PLL
bool "Use DSI PLL for PCLK (EXPERIMENTAL)"
default n
depends on OMAP2_DSS_DSI
help
Use DSI PLL to generate pixel clock. Currently only for DPI output.
DSI PLL can be used to generate higher and more precise pixel clocks.
config OMAP2_DSS_FAKE_VSYNC config OMAP2_DSS_FAKE_VSYNC
bool "Fake VSYNC irq from manual update displays" bool "Fake VSYNC irq from manual update displays"
default n default n
...@@ -125,4 +117,27 @@ config OMAP2_DSS_MIN_FCK_PER_PCK ...@@ -125,4 +117,27 @@ config OMAP2_DSS_MIN_FCK_PER_PCK
Max FCK is 173MHz, so this doesn't work if your PCK Max FCK is 173MHz, so this doesn't work if your PCK
is very high. is very high.
config OMAP2_DSS_SLEEP_BEFORE_RESET
bool "Sleep 50ms before DSS reset"
default y
help
For some unknown reason we may get SYNC_LOST errors from the display
subsystem at initialization time if we don't sleep before resetting
the DSS. See the source (dss.c) for more comments.
However, 50ms is quite long time to sleep, and with some
configurations the SYNC_LOST may never happen, so the sleep can
be disabled here.
config OMAP2_DSS_SLEEP_AFTER_VENC_RESET
bool "Sleep 20ms after VENC reset"
default y
help
There is a 20ms sleep after VENC reset which seemed to fix the
reset. The reason for the bug is unclear, and it's also unclear
on what platforms this happens.
This option enables the sleep, and is enabled by default. You can
disable the sleep if it doesn't cause problems on your platform.
endif endif
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <plat/display.h> #include <video/omapdss.h>
#include "dss.h" #include "dss.h"
#include "dss_features.h" #include "dss_features.h"
...@@ -54,6 +54,9 @@ unsigned int dss_debug; ...@@ -54,6 +54,9 @@ unsigned int dss_debug;
module_param_named(debug, dss_debug, bool, 0644); module_param_named(debug, dss_debug, bool, 0644);
#endif #endif
static int omap_dss_register_device(struct omap_dss_device *);
static void omap_dss_unregister_device(struct omap_dss_device *);
/* REGULATORS */ /* REGULATORS */
struct regulator *dss_get_vdds_dsi(void) struct regulator *dss_get_vdds_dsi(void)
...@@ -124,8 +127,7 @@ static int dss_initialize_debugfs(void) ...@@ -124,8 +127,7 @@ static int dss_initialize_debugfs(void)
#endif #endif
#if defined(CONFIG_OMAP2_DSS_DSI) && defined(CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS) #if defined(CONFIG_OMAP2_DSS_DSI) && defined(CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS)
debugfs_create_file("dsi_irq", S_IRUGO, dss_debugfs_dir, dsi_create_debugfs_files_irq(dss_debugfs_dir, &dss_debug_fops);
&dsi_dump_irqs, &dss_debug_fops);
#endif #endif
debugfs_create_file("dss", S_IRUGO, dss_debugfs_dir, debugfs_create_file("dss", S_IRUGO, dss_debugfs_dir,
...@@ -137,8 +139,7 @@ static int dss_initialize_debugfs(void) ...@@ -137,8 +139,7 @@ static int dss_initialize_debugfs(void)
&rfbi_dump_regs, &dss_debug_fops); &rfbi_dump_regs, &dss_debug_fops);
#endif #endif
#ifdef CONFIG_OMAP2_DSS_DSI #ifdef CONFIG_OMAP2_DSS_DSI
debugfs_create_file("dsi", S_IRUGO, dss_debugfs_dir, dsi_create_debugfs_files_reg(dss_debugfs_dir, &dss_debug_fops);
&dsi_dump_regs, &dss_debug_fops);
#endif #endif
#ifdef CONFIG_OMAP2_DSS_VENC #ifdef CONFIG_OMAP2_DSS_VENC
debugfs_create_file("venc", S_IRUGO, dss_debugfs_dir, debugfs_create_file("venc", S_IRUGO, dss_debugfs_dir,
...@@ -480,7 +481,7 @@ static void omap_dss_dev_release(struct device *dev) ...@@ -480,7 +481,7 @@ static void omap_dss_dev_release(struct device *dev)
reset_device(dev, 0); reset_device(dev, 0);
} }
int omap_dss_register_device(struct omap_dss_device *dssdev) static int omap_dss_register_device(struct omap_dss_device *dssdev)
{ {
static int dev_num; static int dev_num;
...@@ -494,7 +495,7 @@ int omap_dss_register_device(struct omap_dss_device *dssdev) ...@@ -494,7 +495,7 @@ int omap_dss_register_device(struct omap_dss_device *dssdev)
return device_register(&dssdev->dev); return device_register(&dssdev->dev);
} }
void omap_dss_unregister_device(struct omap_dss_device *dssdev) static void omap_dss_unregister_device(struct omap_dss_device *dssdev)
{ {
device_unregister(&dssdev->dev); device_unregister(&dssdev->dev);
} }
......
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.
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#define MAX_DSS_MANAGERS 3 #define MAX_DSS_MANAGERS 3
#define MAX_DSS_OVERLAYS 3 #define MAX_DSS_OVERLAYS 3
#define MAX_DSS_LCD_MANAGERS 2 #define MAX_DSS_LCD_MANAGERS 2
#define MAX_NUM_DSI 2
/* DSS has feature id */ /* DSS has feature id */
enum dss_feat_id { enum dss_feat_id {
...@@ -40,6 +41,16 @@ enum dss_feat_id { ...@@ -40,6 +41,16 @@ enum dss_feat_id {
/* Independent core clk divider */ /* Independent core clk divider */
FEAT_CORE_CLK_DIV = 1 << 11, FEAT_CORE_CLK_DIV = 1 << 11,
FEAT_LCD_CLK_SRC = 1 << 12, FEAT_LCD_CLK_SRC = 1 << 12,
/* DSI-PLL power command 0x3 is not working */
FEAT_DSI_PLL_PWR_BUG = 1 << 13,
FEAT_DSI_PLL_FREQSEL = 1 << 14,
FEAT_DSI_DCS_CMD_CONFIG_VC = 1 << 15,
FEAT_DSI_VC_OCP_WIDTH = 1 << 16,
FEAT_DSI_REVERSE_TXCLKESC = 1 << 17,
FEAT_DSI_GNQ = 1 << 18,
FEAT_HDMI_CTS_SWMODE = 1 << 19,
FEAT_HANDLE_UV_SEPARATE = 1 << 20,
FEAT_ATTR2 = 1 << 21,
}; };
/* DSS register field id */ /* DSS register field id */
...@@ -77,7 +88,7 @@ enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel ...@@ -77,7 +88,7 @@ enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel
enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
bool dss_feat_color_mode_supported(enum omap_plane plane, bool dss_feat_color_mode_supported(enum omap_plane plane,
enum omap_color_mode color_mode); enum omap_color_mode color_mode);
const char *dss_feat_get_clk_source_name(enum dss_clk_source id); const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id);
bool dss_has_feature(enum dss_feat_id id); bool dss_has_feature(enum dss_feat_id id);
void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end);
......
This diff is collapsed.
This diff is collapsed.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/module.h> #include <linux/module.h>
#include <plat/display.h> #include <video/omapdss.h>
#include "dss.h" #include "dss.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <plat/display.h> #include <video/omapdss.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include "dss.h" #include "dss.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -29,13 +29,15 @@ ...@@ -29,13 +29,15 @@
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <plat/display.h> #include <video/omapdss.h>
#ifdef DEBUG #ifdef DEBUG
extern unsigned int omapfb_debug; extern unsigned int omapfb_debug;
#define DBG(format, ...) \ #define DBG(format, ...) \
do { \
if (omapfb_debug) \ if (omapfb_debug) \
printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__) printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__); \
} while (0)
#else #else
#define DBG(format, ...) #define DBG(format, ...)
#endif #endif
......
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