diff --git a/[refs] b/[refs] index 946caf705cb3..30703659bde3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: da6c56873927418aba585038e5c4d3d72a4d9b6c +refs/heads/master: 33366d0e8be06b980784c732ebace26de08e6679 diff --git a/trunk/arch/arm/mach-omap2/display.c b/trunk/arch/arm/mach-omap2/display.c index 1011995f150a..28f508724a56 100644 --- a/trunk/arch/arm/mach-omap2/display.c +++ b/trunk/arch/arm/mach-omap2/display.c @@ -284,6 +284,35 @@ 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; @@ -291,9 +320,18 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) 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; diff --git a/trunk/drivers/video/omap2/dss/Kconfig b/trunk/drivers/video/omap2/dss/Kconfig index 7052487495cd..80f5390aa136 100644 --- a/trunk/drivers/video/omap2/dss/Kconfig +++ b/trunk/drivers/video/omap2/dss/Kconfig @@ -18,26 +18,16 @@ config OMAP2_VRAM_SIZE You can also set this with "vram=" kernel argument, or in the board file. -config OMAP2_DSS_DEBUG - bool "Debug support" - default n - help - This enables printing of debug messages. Alternatively, debug messages - can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting - appropriate flags in /dynamic_debug/control. - -config OMAP2_DSS_DEBUGFS - bool "Debugfs filesystem support" - depends on DEBUG_FS - default n +config OMAP2_DSS_DEBUG_SUPPORT + bool "Debug support" + default y help - This enables debugfs for OMAPDSS at /omapdss. This enables - querying about clock configuration and register configuration of dss, - dispc, dsi, hdmi and rfbi. + This enables debug messages. You need to enable printing + with 'debug' module parameter. config OMAP2_DSS_COLLECT_IRQ_STATS bool "Collect DSS IRQ statistics" - depends on OMAP2_DSS_DEBUGFS + depends on OMAP2_DSS_DEBUG_SUPPORT default n help Collect DSS IRQ statistics, printable via debugfs. diff --git a/trunk/drivers/video/omap2/dss/Makefile b/trunk/drivers/video/omap2/dss/Makefile index 40701910f737..4549869bfe1a 100644 --- a/trunk/drivers/video/omap2/dss/Makefile +++ b/trunk/drivers/video/omap2/dss/Makefile @@ -8,4 +8,3 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ hdmi_panel.o ti_hdmi_4xxx_ip.o -ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/trunk/drivers/video/omap2/dss/apply.c b/trunk/drivers/video/omap2/dss/apply.c index e923d9f90ee6..19d66f471b4b 100644 --- a/trunk/drivers/video/omap2/dss/apply.c +++ b/trunk/drivers/video/omap2/dss/apply.c @@ -573,7 +573,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl) struct mgr_priv_data *mp; int r; - DSSDBG("writing ovl %d regs", ovl->id); + DSSDBGF("%d", ovl->id); if (!op->enabled || !op->info_dirty) return; @@ -608,7 +608,7 @@ static void dss_ovl_write_regs_extra(struct omap_overlay *ovl) struct ovl_priv_data *op = get_ovl_priv(ovl); struct mgr_priv_data *mp; - DSSDBG("writing ovl %d regs extra", ovl->id); + DSSDBGF("%d", ovl->id); if (!op->extra_info_dirty) return; @@ -632,7 +632,7 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr) struct mgr_priv_data *mp = get_mgr_priv(mgr); struct omap_overlay *ovl; - DSSDBG("writing mgr %d regs", mgr->id); + DSSDBGF("%d", mgr->id); if (!mp->enabled) return; @@ -658,7 +658,7 @@ static void dss_mgr_write_regs_extra(struct omap_overlay_manager *mgr) { struct mgr_priv_data *mp = get_mgr_priv(mgr); - DSSDBG("writing mgr %d regs extra", mgr->id); + DSSDBGF("%d", mgr->id); if (!mp->extra_info_dirty) return; diff --git a/trunk/drivers/video/omap2/dss/core.c b/trunk/drivers/video/omap2/dss/core.c index d1ed2b4a5a2e..d94ef9e31a35 100644 --- a/trunk/drivers/video/omap2/dss/core.c +++ b/trunk/drivers/video/omap2/dss/core.c @@ -53,6 +53,11 @@ static char *def_disp_name; module_param_named(def_disp, def_disp_name, charp, 0); MODULE_PARM_DESC(def_disp, "default display name"); +#ifdef DEBUG +bool dss_debug; +module_param_named(debug, dss_debug, bool, 0644); +#endif + const char *dss_get_default_display_name(void) { return core.default_display_name; @@ -117,7 +122,7 @@ void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask) { struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; - if (!board_data->dsi_disable_pads) + if (!board_data->dsi_enable_pads) return; return board_data->dsi_disable_pads(dsi_id, lane_mask); @@ -133,7 +138,7 @@ int dss_set_min_bus_tput(struct device *dev, unsigned long tput) return 0; } -#if defined(CONFIG_OMAP2_DSS_DEBUGFS) +#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) static int dss_debug_show(struct seq_file *s, void *unused) { void (*func)(struct seq_file *) = s->private; @@ -188,7 +193,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) return 0; } -#else /* CONFIG_OMAP2_DSS_DEBUGFS */ +#else /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ static inline int dss_initialize_debugfs(void) { return 0; @@ -200,7 +205,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) { return 0; } -#endif /* CONFIG_OMAP2_DSS_DEBUGFS */ +#endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ /* PLATFORM DEVICE */ static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d) @@ -232,7 +237,7 @@ static int __init omap_dss_probe(struct platform_device *pdev) core.pdev = pdev; - dss_features_init(); + dss_features_init(pdata->version); dss_apply_init(); diff --git a/trunk/drivers/video/omap2/dss/dispc.c b/trunk/drivers/video/omap2/dss/dispc.c index 7456000f6999..c32ec4ae8b4d 100644 --- a/trunk/drivers/video/omap2/dss/dispc.c +++ b/trunk/drivers/video/omap2/dss/dispc.c @@ -36,8 +36,7 @@ #include #include #include - -#include +#include #include