Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
Browse files Browse the repository at this point in the history
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: DSS2: don't power off a panel twice
  OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3
  OMAP: DSS2: OMAPFB: make VRFB depends on OMAP2,3
  OMAP: DSS2: OMAPFB: Allow FB_OMAP2 to build without VRFB
  arm/omap: simplify conditional
  OMAP: DSS2: DSI: Remove extra iounmap in error path
  OMAP: DSS2: Use dss_features framework on DSS2 code
  OMAP: DSS2: Introduce dss_features files
  video/omap: remove mux.h include
  ARM: omap/fb: move get_fbmem_region() to .init.text
  ARM: omap/fb: move omapfb_reserve_sram to .init.text
  ARM: omap/fb: move omap_init_fb to .init.text
  OMAP: DSS2: OMAPFB: swap front and back porches for both hsync and vsync
  OMAP: DSS2: make filter coefficient tables human readable
  OMAP: DSS2: Add SPI dependency to Kconfig of ACX565AKM panel
  • Loading branch information
Linus Torvalds committed Oct 26, 2010
2 parents 4f68760 + 18016e3 commit 2c51895
Show file tree
Hide file tree
Showing 21 changed files with 475 additions and 228 deletions.
14 changes: 7 additions & 7 deletions arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int fbmem_region_reserved(unsigned long start, size_t size)
* Get the region_idx`th region from board config/ATAG and convert it to
* our internal format.
*/
static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
static int __init get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
{
const struct omap_fbmem_config *conf;
u32 paddr;
Expand Down Expand Up @@ -128,7 +128,7 @@ static int set_fbmem_region_type(struct omapfb_mem_region *rg, int mem_type,
* type = 0 && paddr = 0, a default don't care case maps to
* the SDRAM type.
*/
if (rg->type || (!rg->type && !rg->paddr))
if (rg->type || !rg->paddr)
return 0;
if (ranges_overlap(rg->paddr, rg->size, mem_start, mem_size)) {
rg->type = mem_type;
Expand Down Expand Up @@ -260,7 +260,7 @@ void __init omapfb_reserve_sdram_memblock(void)
* this point, since the driver built as a module would have problem with
* freeing / reallocating the regions.
*/
unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long pstart_avail,
Expand Down Expand Up @@ -334,7 +334,7 @@ void omapfb_set_ctrl_platform_data(void *data)
omapfb_config.ctrl_platform_data = data;
}

static inline int omap_init_fb(void)
static int __init omap_init_fb(void)
{
const struct omap_lcd_config *conf;

Expand Down Expand Up @@ -379,7 +379,7 @@ void omapfb_set_platform_data(struct omapfb_platform_data *data)
omapfb_config = *data;
}

static inline int omap_init_fb(void)
static int __init omap_init_fb(void)
{
return platform_device_register(&omap_fb_device);
}
Expand All @@ -390,7 +390,7 @@ void omapfb_reserve_sdram_memblock(void)
{
}

unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long start_avail,
Expand All @@ -409,7 +409,7 @@ void omapfb_reserve_sdram_memblock(void)
{
}

unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long start_avail,
Expand Down
31 changes: 0 additions & 31 deletions arch/arm/plat-omap/include/plat/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,37 +81,6 @@ enum omap_color_mode {
OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */

OMAP_DSS_COLOR_GFX_OMAP2 =
OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P,

OMAP_DSS_COLOR_VID_OMAP2 =
OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
OMAP_DSS_COLOR_UYVY,

OMAP_DSS_COLOR_GFX_OMAP3 =
OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,

OMAP_DSS_COLOR_VID1_OMAP3 =
OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,

OMAP_DSS_COLOR_VID2_OMAP3 =
OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
OMAP_DSS_COLOR_UYVY | OMAP_DSS_COLOR_ARGB32 |
OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
};

enum omap_lcd_display_type {
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/plat-omap/include/plat/vrfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct vrfb {
bool yuv_mode;
};

#ifdef CONFIG_OMAP2_VRFB
extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
Expand All @@ -47,4 +48,19 @@ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot);
extern void omap_vrfb_restore_context(void);

#else
static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; }
static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {}
static inline void omap_vrfb_adjust_size(u16 *width, u16 *height,
u8 bytespp) {}
static inline u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp)
{ return 0; }
static inline u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp)
{ return 0; }
static inline void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
u16 width, u16 height, unsigned bytespp, bool yuv_mode) {}
static inline int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot)
{ return 0; }
static inline void omap_vrfb_restore_context(void) {}
#endif
#endif /* __VRFB_H */
2 changes: 0 additions & 2 deletions drivers/video/omap/lcd_omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <linux/gpio.h>
#include <linux/i2c/twl.h>

#include <plat/mux.h>
#include <plat/mux.h>
#include <asm/mach-types.h>

#include "omapfb.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/omap2/displays/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ config PANEL_TPO_TD043MTEA1

config PANEL_ACX565AKM
tristate "ACX565AKM Panel"
depends on OMAP2_DSS_SDI
depends on OMAP2_DSS_SDI && SPI
select BACKLIGHT_CLASS_DEVICE
help
This is the LCD panel used on Nokia N900
Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)

dev_dbg(&dssdev->dev, "%s\n", __func__);

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

mutex_lock(&md->mutex);

r = omapdss_sdi_display_enable(dssdev);
Expand Down Expand Up @@ -644,6 +647,9 @@ static void acx_panel_power_off(struct omap_dss_device *dssdev)

dev_dbg(&dssdev->dev, "%s\n", __func__);

if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

mutex_lock(&md->mutex);

if (!md->enabled) {
Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ static int generic_panel_power_on(struct omap_dss_device *dssdev)
{
int r;

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
Expand All @@ -58,6 +61,9 @@ static int generic_panel_power_on(struct omap_dss_device *dssdev)

static void generic_panel_power_off(struct omap_dss_device *dssdev)
{
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

if (dssdev->platform_disable)
dssdev->platform_disable(dssdev);

Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ static int sharp_lq_panel_power_on(struct omap_dss_device *dssdev)
{
int r;

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
Expand All @@ -65,6 +68,9 @@ static int sharp_lq_panel_power_on(struct omap_dss_device *dssdev)

static void sharp_lq_panel_power_off(struct omap_dss_device *dssdev)
{
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

if (dssdev->platform_disable)
dssdev->platform_disable(dssdev);

Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev)
{
int r = 0;

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
Expand All @@ -157,6 +160,9 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev)

static void sharp_ls_power_off(struct omap_dss_device *dssdev)
{
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

if (dssdev->platform_disable)
dssdev->platform_disable(dssdev);

Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-toppoly-tdo35s.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ static int toppoly_tdo_panel_power_on(struct omap_dss_device *dssdev)
{
int r;

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
Expand All @@ -65,6 +68,9 @@ static int toppoly_tdo_panel_power_on(struct omap_dss_device *dssdev)

static void toppoly_tdo_panel_power_off(struct omap_dss_device *dssdev)
{
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

if (dssdev->platform_disable)
dssdev->platform_disable(dssdev);

Expand Down
6 changes: 6 additions & 0 deletions drivers/video/omap2/displays/panel-tpo-td043mtea1.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ static int tpo_td043_power_on(struct omap_dss_device *dssdev)
int nreset_gpio = dssdev->reset_gpio;
int r;

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;

r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
Expand Down Expand Up @@ -308,6 +311,9 @@ static void tpo_td043_power_off(struct omap_dss_device *dssdev)
struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
int nreset_gpio = dssdev->reset_gpio;

if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;

tpo_td043_write(tpo_td043->spi, 3,
TPO_R03_VAL_STANDBY | TPO_R03_EN_PWM);

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_OMAP2_DSS) += omapdss.o
omapdss-y := core.o dss.o dispc.o display.o manager.o overlay.o
omapdss-y := core.o dss.o dss_features.o dispc.o display.o manager.o overlay.o
omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
Expand Down
3 changes: 3 additions & 0 deletions drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <plat/clock.h>

#include "dss.h"
#include "dss_features.h"

static struct {
struct platform_device *pdev;
Expand Down Expand Up @@ -502,6 +503,8 @@ static int omap_dss_probe(struct platform_device *pdev)

core.pdev = pdev;

dss_features_init();

dss_init_overlay_managers(pdev);
dss_init_overlays(pdev);

Expand Down
Loading

0 comments on commit 2c51895

Please sign in to comment.