Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344641
b: refs/heads/master
c: 3f5ba55
h: refs/heads/master
i:
  344639: e4669a8
v: v3
  • Loading branch information
Tomi Valkeinen committed Nov 13, 2012
1 parent 944fecd commit bb55bb8
Show file tree
Hide file tree
Showing 44 changed files with 1,174 additions and 1,212 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c3dd225819112e56554162c6b37e61a31924e0c
refs/heads/master: 3f5ba55e8f3698432c65b0ef77e83d22d5f64a79
53 changes: 5 additions & 48 deletions trunk/arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,17 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
{ "dss_hdmi", "omapdss_hdmi", -1 },
};

static void __init omap4_tpd12s015_mux_pads(void)
static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
{
u32 reg;
u16 control_i2c_1;

omap_mux_init_signal("hdmi_cec",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_ddc_scl",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_ddc_sda",
OMAP_PIN_INPUT_PULLUP);
}

static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
{
u32 reg;
u16 control_i2c_1;

/*
* CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and
Expand Down Expand Up @@ -164,10 +161,8 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)

int __init omap_hdmi_init(enum omap_hdmi_flags flags)
{
if (cpu_is_omap44xx()) {
if (cpu_is_omap44xx())
omap4_hdmi_mux_pads(flags);
omap4_tpd12s015_mux_pads();
}

return 0;
}
Expand Down Expand Up @@ -289,54 +284,16 @@ static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
return ERR_PTR(r);
}

static enum omapdss_version __init omap_display_get_version(void)
{
if (cpu_is_omap24xx())
return OMAPDSS_VER_OMAP24xx;
else if (cpu_is_omap3630())
return OMAPDSS_VER_OMAP3630;
else if (cpu_is_omap34xx()) {
if (soc_is_am35xx()) {
return OMAPDSS_VER_AM35xx;
} else {
if (omap_rev() < OMAP3430_REV_ES3_0)
return OMAPDSS_VER_OMAP34xx_ES1;
else
return OMAPDSS_VER_OMAP34xx_ES3;
}
} else if (omap_rev() == OMAP4430_REV_ES1_0)
return OMAPDSS_VER_OMAP4430_ES1;
else if (omap_rev() == OMAP4430_REV_ES2_0 ||
omap_rev() == OMAP4430_REV_ES2_1 ||
omap_rev() == OMAP4430_REV_ES2_2)
return OMAPDSS_VER_OMAP4430_ES2;
else if (cpu_is_omap44xx())
return OMAPDSS_VER_OMAP4;
else if (soc_is_omap54xx())
return OMAPDSS_VER_OMAP5;
else
return OMAPDSS_VER_UNKNOWN;
}

int __init omap_display_init(struct omap_dss_board_info *board_data)
{
int r = 0;
struct platform_device *pdev;
int i, oh_count;
const struct omap_dss_hwmod_data *curr_dss_hwmod;
struct platform_device *dss_pdev;
enum omapdss_version ver;

/* create omapdss device */

ver = omap_display_get_version();

if (ver == OMAPDSS_VER_UNKNOWN) {
pr_err("DSS not supported on this SoC\n");
return -ENODEV;
}

board_data->version = ver;
board_data->dsi_enable_pads = omap_dsi_enable_pads;
board_data->dsi_disable_pads = omap_dsi_disable_pads;
board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count;
Expand Down
16 changes: 16 additions & 0 deletions trunk/arch/arm/mach-omap2/sdrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,19 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
sdrc_write_reg(l, SDRC_POWER);
omap2_sms_save_context();
}

void omap2_sms_write_rot_control(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_CONTROL(ctx));
}

void omap2_sms_write_rot_size(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_SIZE(ctx));
}

void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx)
{
sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx));
}

66 changes: 3 additions & 63 deletions trunk/arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,71 +29,11 @@
#include <linux/memblock.h>
#include <linux/io.h>
#include <linux/omapfb.h>
#include <linux/dma-mapping.h>

#include <mach/hardware.h>
#include <asm/mach/map.h>

#include <plat/cpu.h>

#ifdef CONFIG_OMAP2_VRFB

/*
* The first memory resource is the register region for VRFB,
* the rest are VRFB virtual memory areas for each VRFB context.
*/

static const struct resource omap2_vrfb_resources[] = {
DEFINE_RES_MEM_NAMED(0x68008000u, 0x40, "vrfb-regs"),
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
};

static const struct resource omap3_vrfb_resources[] = {
DEFINE_RES_MEM_NAMED(0x6C000180u, 0xc0, "vrfb-regs"),
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
DEFINE_RES_MEM_NAMED(0xe0000000u, 0x4000000, "vrfb-area-4"),
DEFINE_RES_MEM_NAMED(0xe4000000u, 0x4000000, "vrfb-area-5"),
DEFINE_RES_MEM_NAMED(0xe8000000u, 0x4000000, "vrfb-area-6"),
DEFINE_RES_MEM_NAMED(0xec000000u, 0x4000000, "vrfb-area-7"),
DEFINE_RES_MEM_NAMED(0xf0000000u, 0x4000000, "vrfb-area-8"),
DEFINE_RES_MEM_NAMED(0xf4000000u, 0x4000000, "vrfb-area-9"),
DEFINE_RES_MEM_NAMED(0xf8000000u, 0x4000000, "vrfb-area-10"),
DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
};

static int __init omap_init_vrfb(void)
{
struct platform_device *pdev;
const struct resource *res;
unsigned int num_res;

if (cpu_is_omap24xx()) {
res = omap2_vrfb_resources;
num_res = ARRAY_SIZE(omap2_vrfb_resources);
} else if (cpu_is_omap34xx()) {
res = omap3_vrfb_resources;
num_res = ARRAY_SIZE(omap3_vrfb_resources);
} else {
return 0;
}

pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
res, num_res, NULL, 0);

if (IS_ERR(pdev))
return PTR_ERR(pdev);
else
return 0;
}

arch_initcall(omap_init_vrfb);
#endif

#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)

static bool omapfb_lcd_configured;
Expand All @@ -106,7 +46,7 @@ static struct platform_device omap_fb_device = {
.id = -1,
.dev = {
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = ~(u32)0,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &omapfb_config,
},
.num_resources = 0,
Expand Down Expand Up @@ -142,7 +82,7 @@ static struct platform_device omap_fb_device = {
.id = -1,
.dev = {
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = ~(u32)0,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &omapfb_config,
},
.num_resources = 0,
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/sdrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
/* SMS register offsets - read/write with sms_{read,write}_reg() */

#define SMS_SYSCONFIG 0x010
#define SMS_ROT_CONTROL(context) (0x180 + 0x10 * context)
#define SMS_ROT_SIZE(context) (0x184 + 0x10 * context)
#define SMS_ROT_PHYSICAL_BA(context) (0x188 + 0x10 * context)
/* REVISIT: fill in other SMS registers here */


Expand Down Expand Up @@ -134,6 +137,10 @@ int omap2_sdrc_get_params(unsigned long r,
void omap2_sms_save_context(void);
void omap2_sms_restore_context(void);

void omap2_sms_write_rot_control(u32 val, unsigned ctx);
void omap2_sms_write_rot_size(u32 val, unsigned ctx);
void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx);

#ifdef CONFIG_ARCH_OMAP2

struct memory_timings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct vrfb {
};

#ifdef CONFIG_OMAP2_VRFB
extern bool omap_vrfb_supported(void);
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 @@ -50,7 +49,6 @@ extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot);
extern void omap_vrfb_restore_context(void);

#else
static inline bool omap_vrfb_supported(void) { return false; }
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,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include <plat/cpu.h>
#include <plat/dma.h>
#include <video/omapvrfb.h>
#include <plat/vrfb.h>
#include <video/omapdss.h>

#include "omap_voutlib.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_vout_vrfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <media/v4l2-device.h>

#include <plat/dma.h>
#include <video/omapvrfb.h>
#include <plat/vrfb.h>

#include "omap_voutdef.h"
#include "omap_voutlib.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/platform/omap/omap_voutdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define OMAP_VOUTDEF_H

#include <video/omapdss.h>
#include <video/omapvrfb.h>
#include <plat/vrfb.h>

#define YUYV_BPP 2
#define RGB565_BPP 2
Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/video/omap2/displays/panel-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,27 @@ static void acx_panel_disable(struct omap_dss_device *dssdev)
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static int acx_panel_suspend(struct omap_dss_device *dssdev)
{
dev_dbg(&dssdev->dev, "%s\n", __func__);
acx_panel_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
return 0;
}

static int acx_panel_resume(struct omap_dss_device *dssdev)
{
int r;

dev_dbg(&dssdev->dev, "%s\n", __func__);
r = acx_panel_power_on(dssdev);
if (r)
return r;

dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return 0;
}

static void acx_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
Expand All @@ -731,6 +752,8 @@ static struct omap_dss_driver acx_panel_driver = {

.enable = acx_panel_enable,
.disable = acx_panel_disable,
.suspend = acx_panel_suspend,
.resume = acx_panel_resume,

.set_timings = acx_panel_set_timings,
.check_timings = acx_panel_check_timings,
Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/video/omap2/displays/panel-generic-dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,40 @@ static void generic_dpi_panel_disable(struct omap_dss_device *dssdev)
mutex_unlock(&drv_data->lock);
}

static int generic_dpi_panel_suspend(struct omap_dss_device *dssdev)
{
struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);

mutex_lock(&drv_data->lock);

generic_dpi_panel_power_off(dssdev);

dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;

mutex_unlock(&drv_data->lock);

return 0;
}

static int generic_dpi_panel_resume(struct omap_dss_device *dssdev)
{
struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);
int r;

mutex_lock(&drv_data->lock);

r = generic_dpi_panel_power_on(dssdev);
if (r)
goto err;

dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

err:
mutex_unlock(&drv_data->lock);

return r;
}

static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
Expand Down Expand Up @@ -735,6 +769,8 @@ static struct omap_dss_driver dpi_driver = {

.enable = generic_dpi_panel_enable,
.disable = generic_dpi_panel_disable,
.suspend = generic_dpi_panel_suspend,
.resume = generic_dpi_panel_resume,

.set_timings = generic_dpi_panel_set_timings,
.get_timings = generic_dpi_panel_get_timings,
Expand Down
Loading

0 comments on commit bb55bb8

Please sign in to comment.