static void restore_all_ctx(void) { DSSDBG("restore context\n"); dss_clk_enable_all_no_ctx(); dss_restore_context(); dispc_restore_context(); #ifdef CONFIG_OMAP2_DSS_DSI dsi_restore_context(); #endif dss_clk_disable_all_no_ctx(); }
static void restore_all_ctx(void) { DSSDBG("restore context\n"); dss_clk_enable_all_no_ctx(); if (_omap_dss_wait_reset()) DSSERR("DSS not coming out of reset after sleep\n"); dss_restore_context(); dispc_restore_context(); #ifdef CONFIG_OMAP2_DSS_DSI dsi_restore_context(); #endif dss_clk_disable_all_no_ctx(); }
/* 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; }
static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_platform_data *pdata = pdev->dev.platform_data; int r; dss.pdev = pdev; r = get_dss_clocks(); if (r) goto fail0; dss_clk_enable_all_no_ctx(); dss.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", dss.ctx_id); r = dss_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(); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif #ifdef CONFIG_OMAP2_DSS_DSI r = dsi_init(); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } #endif } initialize_displays(pdata); r = initialize_sysfs(&pdev->dev); if (r) goto fail0; initialize_overlays(def_disp_name); 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 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; }