static void omap_dss_reset_bandwidth(void) { struct device *dss_dev; dss_dev = omap_hwmod_name_get_dev("dss_core"); if (IS_ERR_OR_NULL(dss_dev)) return; omap_pm_set_min_bus_tput(dss_dev, OCP_INITIATOR_AGENT, -1); }
/* * The value of HIGH_RES_TPUT corresponds to one dispc pipe layer of * 1920x1080x4(bpp)x60(Hz) = ~500000(MiB/s). We add another 100000 * for the other partial screen pipes. This is above the threshold for * selecting the higher OPP and L3 frequency, so it's "as fast" as we * can go so covers the higest supported resolution. */ #define HIGH_RES_TPUT 600000 /* MiB/s */ static void omap_dss_request_bandwidth(struct omap_dss_device *display) { struct device *dss_dev; if (display->panel.timings.x_res * display->panel.timings.y_res >= (1080 * 1920)) { dss_dev = omap_hwmod_name_get_dev("dss_core"); if (dss_dev) omap_pm_set_min_bus_tput(dss_dev, OCP_INITIATOR_AGENT, HIGH_RES_TPUT); else DSSDBG("Failed to set L3 bus speed\n"); } }
/** * omap4_opp_enable() - helper to enable the OPP * @oh_name: name of the hwmod device * @freq: frequency to enable */ static void __init omap4_opp_enable(const char *oh_name, unsigned long freq) { struct device *dev; int r; dev = omap_hwmod_name_get_dev(oh_name); if (IS_ERR(dev)) { pr_err("%s: no %s device, did not enable f=%ld\n", __func__, oh_name, freq); return; } r = opp_enable(dev, freq); if (r < 0) dev_err(dev, "%s: opp_enable failed(%d) f=%ld\n", __func__, r, freq); }
static int __init gc_init(void) { /* check if hardware is available */ if (!cpu_is_omap447x()) return 0; /* Initialize context mutex. */ mutex_init(&mtx); /* Initialize interrupt completion. */ init_completion(&g_gccoreint); g_bb2d_dev = omap_hwmod_name_get_dev("bb2d"); if (g_bb2d_dev == NULL) { GCPRINT(NULL, 0, GC_MOD_PREFIX "cannot find bb2d_fck.\n", __func__, __LINE__); goto fail; } /* Initialize the command buffer. */ if (cmdbuf_init() != GCERR_NONE) { GCPRINT(NULL, 0, GC_MOD_PREFIX "failed to initialize command buffer.\n", __func__, __LINE__); goto fail; } /* Create debugfs entry */ g_debugRoot = debugfs_create_dir("gcx", NULL); if (g_debugRoot) gc_debug_init(g_debugRoot); mutex_init(&g_maplock); #if defined(CONFIG_HAS_EARLYSUSPEND) register_early_suspend(&early_suspend_info); #endif return platform_driver_register(&plat_drv); fail: return -EINVAL; }