static int __init omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; core.pdev = pdev; dss_features_init(omapdss_get_version()); r = dss_initialize_debugfs(); if (r) goto err_debugfs; if (def_disp_name) core.default_display_name = def_disp_name; else if (pdata->default_display_name) core.default_display_name = pdata->default_display_name; else if (pdata->default_device) core.default_display_name = pdata->default_device->name; register_pm_notifier(&omap_dss_pm_notif_block); return 0; err_debugfs: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; int i; core.pdev = pdev; dss_features_init(); dss_apply_init(); dss_init_overlay_managers(pdev); dss_init_overlays(pdev); r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int skip_init = 0; int r; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); /* * FIX-ME: Replace with correct clk node when clk * framework is available */ if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto fail0; } dss_clk_enable_all_no_ctx(); core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); #ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT /* DISPC_CONTROL */ if (omap_readl(0x48050440) & 1) /* LCD enabled? */ skip_init = 1; #endif r = dss_init(skip_init); if (r) { DSSERR("Failed to initialize DSS\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_RFBI r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto fail0; } #endif r = dpi_init(); if (r) { DSSERR("Failed to initialize dpi\n"); goto fail0; } r = dispc_init(); if (r) { DSSERR("Failed to initialize dispc\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_VENC r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif } #ifdef CONFIG_OMAP2_DSS_DSI printk(KERN_INFO "dsi_init calling"); r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } if (cpu_is_omap44xx()) { printk(KERN_INFO "dsi2_init calling"); r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto fail0; } } #endif #ifdef CONFIG_OMAP2_DSS_HDMI r = hdmi_init(pdev, hdmi_code); if (r) { DSSERR("Failed to initialize hdmi\n"); goto fail0; } #endif #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) r = dss_initialize_debugfs(); if (r) goto fail0; #endif for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) DSSERR("device reg failed %d\n", i); if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } dss_clk_disable_all(); return 0; /* XXX fail correctly */ fail0: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; int i; core.pdev = pdev; dss_features_init(); dss_init_overlay_managers(pdev); dss_init_overlays(pdev); if (dss_has_feature(FEAT_OVL_WB)) dss_init_writeback(pdev); r = dss_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSS platform driver\n"); goto err_dss; } r = dispc_init_platform_driver(); if (r) { DSSERR("Failed to initialize dispc platform driver\n"); goto err_dispc; } r = rfbi_init_platform_driver(); if (r) { DSSERR("Failed to initialize rfbi platform driver\n"); goto err_rfbi; } r = venc_init_platform_driver(); if (r) { DSSERR("Failed to initialize venc platform driver\n"); goto err_venc; } r = dsi_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSI platform driver\n"); goto err_dsi; } r = hdmi_init_platform_driver(); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } } return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: hdmi_uninit_platform_driver(); err_hdmi: dsi_uninit_platform_driver(); err_dsi: venc_uninit_platform_driver(); err_venc: dispc_uninit_platform_driver(); err_dispc: rfbi_uninit_platform_driver(); err_rfbi: dss_uninit_platform_driver(); err_dss: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r = 0; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); #ifdef CONFIG_HAS_EARLYSUSPEND omap_pm_set_min_bus_tput(&pdev->dev, OCP_INITIATOR_AGENT, 166 * 1000 * 4); #endif if (cpu_is_omap44xx()) dss_init_writeback(pdev); /*Write back init*/ #ifdef HWMOD if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto err_clocks; } core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto err_rfbi; } r = dpi_init(pdev); if (r) { DSSERR("Failed to initialize dpi\n"); goto err_dpi; } r = dispc_init(pdev); if (r) { DSSERR("Failed to initialize dispc\n"); goto err_dispc; } r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto err_venc; } if (cpu_is_omap34xx()) { r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto err_sdi; } } if (!cpu_is_omap24xx()) { r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto err_dsi1; } if (cpu_is_omap44xx()) { r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto err_dsi2; } } } #ifdef CONFIG_OMAP2_DSS_HDMI r = hdmi_init(pdev); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } #endif #endif r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } #ifdef HWMOD dss_clk_disable_all(); #endif return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: #ifdef HWMOD #ifdef CONFIG_OMAP2_DSS_HDMI hdmi_exit(); err_hdmi: #endif if (cpu_is_omap44xx()) dsi2_exit(); err_dsi2: if (!cpu_is_omap24xx()) dsi_exit(); err_dsi1: if (cpu_is_omap34xx()) sdi_exit(); err_sdi: venc_exit(); err_venc: dispc_exit(); err_dispc: dpi_exit(); err_dpi: rfbi_exit(); err_rfbi: dss_exit(); err_dss: dss_clk_disable_all_no_ctx(); dss_put_clocks(); err_clocks: #endif return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; int i; #ifdef CONFIG_MACH_OMAP4_BOWSER_SUBTYPE_JEM static int first_boot = 1; struct clk *iclk; #endif core.pdev = pdev; dss_features_init(); dss_init_overlay_managers(pdev); dss_init_overlays(pdev); if (dss_has_feature(FEAT_OVL_WB)) dss_init_writeback(pdev); r = dss_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSS platform driver\n"); goto err_dss; } r = dispc_init_platform_driver(); if (r) { DSSERR("Failed to initialize dispc platform driver\n"); goto err_dispc; } r = rfbi_init_platform_driver(); if (r) { DSSERR("Failed to initialize rfbi platform driver\n"); goto err_rfbi; } r = venc_init_platform_driver(); if (r) { DSSERR("Failed to initialize venc platform driver\n"); goto err_venc; } r = dsi_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSI platform driver\n"); goto err_dsi; } r = hdmi_init_platform_driver(); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } } #ifdef CONFIG_MACH_OMAP4_BOWSER_SUBTYPE_JEM if (unlikely(first_boot != 0)) { iclk = clk_get(NULL, "ick"); if (!IS_ERR(iclk)) { clk_disable(iclk); clk_put(iclk); } first_boot = 0; } #endif return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: hdmi_uninit_platform_driver(); err_hdmi: dsi_uninit_platform_driver(); err_dsi: venc_uninit_platform_driver(); err_venc: dispc_uninit_platform_driver(); err_dispc: rfbi_uninit_platform_driver(); err_rfbi: dss_uninit_platform_driver(); err_dss: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r; int i; core.pdev = pdev; dss_features_init(); dss_init_overlay_managers(pdev); dss_init_overlays(pdev); r = dss_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSS platform driver\n"); goto err_dss; } /* keep clocks enabled to prevent context saves/restores during init */ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK); r = rfbi_init_platform_driver(); if (r) { DSSERR("Failed to initialize rfbi platform driver\n"); goto err_rfbi; } r = dispc_init_platform_driver(); if (r) { DSSERR("Failed to initialize dispc platform driver\n"); goto err_dispc; } r = venc_init_platform_driver(); if (r) { DSSERR("Failed to initialize venc platform driver\n"); goto err_venc; } r = dsi_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSI platform driver\n"); goto err_dsi; } r = hdmi_init_platform_driver(); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK); return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: hdmi_uninit_platform_driver(); err_hdmi: dsi_uninit_platform_driver(); err_dsi: venc_uninit_platform_driver(); err_venc: dispc_uninit_platform_driver(); err_dispc: rfbi_uninit_platform_driver(); err_rfbi: dss_uninit_platform_driver(); err_dss: return r; }
static int __init omap_dss_register_drivers(void) { int r; r = platform_driver_probe(&omap_dss_driver, omap_dss_probe); if (r) return r; r = dss_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSS platform driver\n"); goto err_dss; } r = dispc_init_platform_driver(); if (r) { DSSERR("Failed to initialize dispc platform driver\n"); goto err_dispc; } r = dpi_init_platform_driver(); if (r) { DSSERR("Failed to initialize dpi platform driver\n"); goto err_dpi; } r = sdi_init_platform_driver(); if (r) { DSSERR("Failed to initialize sdi platform driver\n"); goto err_sdi; } r = rfbi_init_platform_driver(); if (r) { DSSERR("Failed to initialize rfbi platform driver\n"); goto err_rfbi; } r = venc_init_platform_driver(); if (r) { DSSERR("Failed to initialize venc platform driver\n"); goto err_venc; } r = dsi_init_platform_driver(); if (r) { DSSERR("Failed to initialize DSI platform driver\n"); goto err_dsi; } r = hdmi_init_platform_driver(); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } r = dss_initialize_debugfs(); if (r) goto err_debugfs; return 0; err_debugfs: err_hdmi: dsi_uninit_platform_driver(); err_dsi: venc_uninit_platform_driver(); err_venc: rfbi_uninit_platform_driver(); err_rfbi: sdi_uninit_platform_driver(); err_sdi: dpi_uninit_platform_driver(); err_dpi: dispc_uninit_platform_driver(); err_dispc: dss_uninit_platform_driver(); err_dss: platform_driver_unregister(&omap_dss_driver); return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int skip_init = 0; int r; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); r = dss_get_clocks(); if (r) goto fail0; dss_clk_enable_all_no_ctx(); core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); #ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT /* DISPC_CONTROL */ skip_init = 1; if (pdata->default_device->phy.dsi.xfer_mode == OMAP_DSI_XFER_VIDEO_MODE) skip_init = 0; #endif r = dss_init(skip_init); if (r) { DSSERR("Failed to initialize DSS\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_RFBI r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto fail0; } #endif r = dpi_init(); if (r) { DSSERR("Failed to initialize dpi\n"); goto fail0; } r = dispc_init(); if (r) { DSSERR("Failed to initialize dispc\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_VENC r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif #ifdef CONFIG_OMAP2_DSS_DSI r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } #endif } #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) r = dss_initialize_debugfs(); if (r) goto fail0; #endif for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) DSSERR("device reg failed %d\n", i); if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } dss_clk_disable_all(); return 0; /* XXX fail correctly */ fail0: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r = 0; int i; core.pdev = pdev; core.pdata = pdev->dev.platform_data; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); if (cpu_is_omap44xx()) dss_init_writeback(pdev); /*Write back init*/ #ifdef HWMOD if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto err_clocks; } core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto err_rfbi; } r = dpi_init(pdev); if (r) { DSSERR("Failed to initialize dpi\n"); goto err_dpi; } r = dispc_init(pdev); if (r) { DSSERR("Failed to initialize dispc\n"); goto err_dispc; } r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto err_venc; } if (cpu_is_omap34xx()) { r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto err_sdi; } } if (!cpu_is_omap24xx()) { r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto err_dsi1; } if (cpu_is_omap44xx()) { r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto err_dsi2; } } } // == 2011.05.31 === [email protected] START #ifdef CONFIG_OMAP2_DSS_HDMI // TEDCHO_HDMI #if defined(CONFIG_PRODUCT_LGE_HUB) || defined(CONFIG_PRODUCT_LGE_JUSTIN) #else r = hdmi_init(pdev, hdmi_code, hdmi_mode); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } #endif #endif #endif // == 2011.05.31 === [email protected] END r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } #ifdef HWMOD dss_clk_disable_all(); #endif return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: #ifdef HWMOD #ifdef CONFIG_OMAP2_DSS_HDMI hdmi_exit(); err_hdmi: #endif if (cpu_is_omap44xx()) dsi2_exit(); err_dsi2: if (!cpu_is_omap24xx()) dsi_exit(); err_dsi1: if (cpu_is_omap34xx()) sdi_exit(); err_sdi: venc_exit(); err_venc: dispc_exit(); err_dispc: dpi_exit(); err_dpi: rfbi_exit(); err_rfbi: dss_exit(); err_dss: dss_clk_disable_all_no_ctx(); dss_put_clocks(); err_clocks: #endif return r; }