• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pm_qos_add_request函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pm_qos_add_request函数的典型用法代码示例。如果您正苦于以下问题:C++ pm_qos_add_request函数的具体用法?C++ pm_qos_add_request怎么用?C++ pm_qos_add_request使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pm_qos_add_request函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gpu_pm_qos_command

static int gpu_pm_qos_command(struct exynos_context *platform, gpu_pmqos_state state)
{
#ifdef CONFIG_BUS_DEVFREQ
	switch (state) {
	case GPU_CONTROL_PM_QOS_INIT:
		pm_qos_add_request(&exynos5_g3d_mif_qos, PM_QOS_BUS_THROUGHPUT, 0);
		pm_qos_add_request(&exynos5_g3d_int_qos, PM_QOS_DEVICE_THROUGHPUT, 0);
		pm_qos_add_request(&exynos5_g3d_cpu_qos, PM_QOS_KFC_FREQ_MIN, 0);
		break;
	case GPU_CONTROL_PM_QOS_DEINIT:
		pm_qos_remove_request(&exynos5_g3d_mif_qos);
		pm_qos_remove_request(&exynos5_g3d_int_qos);
		pm_qos_remove_request(&exynos5_g3d_cpu_qos);
		break;
	case GPU_CONTROL_PM_QOS_SET:
		if (platform->step < 0)
			return -1;
		pm_qos_update_request(&exynos5_g3d_mif_qos, platform->table[platform->step].mem_freq);
		pm_qos_update_request(&exynos5_g3d_int_qos, platform->table[platform->step].int_freq);
		pm_qos_update_request(&exynos5_g3d_cpu_qos, platform->table[platform->step].cpu_freq);
		break;
	case GPU_CONTROL_PM_QOS_RESET:
		pm_qos_update_request(&exynos5_g3d_mif_qos, 0);
		pm_qos_update_request(&exynos5_g3d_int_qos, 0);
		pm_qos_update_request(&exynos5_g3d_cpu_qos, 0);
	default:
		break;
	}
#endif /* CONFIG_BUS_DEVFREQ */
	return 0;
}
开发者ID:cm-3470,项目名称:android_kernel_samsung_degaslte,代码行数:31,代码来源:gpu_control.c


示例2: proactive_pm_qos_command

int proactive_pm_qos_command(struct exynos_context *platform, gpu_pmqos_state state)
{
	DVFS_ASSERT(platform);

	if (!platform->devfreq_status)
		return 0;

	switch (state) {
		case GPU_CONTROL_PM_QOS_INIT:
			pm_qos_add_request(&proactive_mif_min_qos, PM_QOS_BUS_THROUGHPUT, 0);
			pm_qos_add_request(&proactive_apollo_min_qos, PM_QOS_CLUSTER0_FREQ_MIN, 0);
			pm_qos_add_request(&proactive_atlas_min_qos, PM_QOS_CLUSTER1_FREQ_MIN, 0);
			if (!platform->pmqos_int_disable)
				pm_qos_add_request(&proactive_int_min_qos, PM_QOS_DEVICE_THROUGHPUT, 0);
			break;
		case GPU_CONTROL_PM_QOS_DEINIT:
			pm_qos_remove_request(&proactive_mif_min_qos);
			pm_qos_remove_request(&proactive_apollo_min_qos);
			pm_qos_remove_request(&proactive_atlas_min_qos);
			if (!platform->pmqos_int_disable)
				pm_qos_remove_request(&proactive_int_min_qos);
			break;
		case GPU_CONTROL_PM_QOS_RESET:
			pm_qos_update_request(&proactive_mif_min_qos, 0);
			pm_qos_update_request(&proactive_apollo_min_qos, 0);
			pm_qos_update_request(&proactive_atlas_min_qos, 0);
		default:
			break;
	}

	return 0;
}
开发者ID:HRTKernel,项目名称:Hacker_Kernel_SM-G92X_MM_Beta,代码行数:32,代码来源:gpu_pmqos.c


示例3: gpio_key_set_dvfs_lock

static void gpio_key_set_dvfs_lock(struct gpio_button_data *bdata,
					uint32_t on)
{
	mutex_lock(&bdata->key_dvfs_lock);
	if (on == 0) {
		if (bdata->key_dvfs_lock_status) {
			schedule_delayed_work(&bdata->key_work_dvfs_off,
				msecs_to_jiffies(TOUCH_BOOSTER_OFF_TIME));
		}
	} else if (on == 1) {
		cancel_delayed_work(&bdata->key_work_dvfs_off);
		if (!bdata->key_dvfs_lock_status) {
			pm_qos_add_request(&bdata->key_cpu_qos, PM_QOS_CPU_FREQ_MIN, 600000); /* CPU KFC 1.2GHz */
			pm_qos_add_request(&bdata->key_mif_qos, PM_QOS_BUS_THROUGHPUT, 800000); /* MIF 800MHz */
			pm_qos_add_request(&bdata->key_int_qos, PM_QOS_DEVICE_THROUGHPUT, 200000); /* INT 200MHz */

			schedule_delayed_work(&bdata->key_work_dvfs_chg,
							msecs_to_jiffies(TOUCH_BOOSTER_CHG_TIME));

			bdata->key_dvfs_lock_status = true;
			printk(KERN_DEBUG "[key] DVFS On\n");
		}
	} else if (on == 2) {
		if (bdata->key_dvfs_lock_status) {
			cancel_delayed_work(&bdata->key_work_dvfs_off);
			cancel_delayed_work(&bdata->key_work_dvfs_chg);
			schedule_work(&bdata->key_work_dvfs_off.work);
		}
	}
	mutex_unlock(&bdata->key_dvfs_lock);
}
开发者ID:cyaniris,项目名称:sgs4duos_kernel,代码行数:31,代码来源:gpio_keys.c


示例4: rmnet_usb_freq_request

static void rmnet_usb_freq_request(void)
{
	pr_info("%s\n", __func__);
	if ( rmnet_usb_wq == NULL ) {
		rmnet_usb_wq = create_singlethread_workqueue("rmnet_usb_freq");
		pr_info("%s: create_singlethread_workqueue=[0x%p]\n", __func__, rmnet_usb_wq);
	}

	if ( rmnet_usb_freq_enable_work_init == 0 ) {
		INIT_DELAYED_WORK(&rmnet_usb_freq_enable_work, rmnet_usb_freq_enable_work_func);
		pr_info("%s: INIT_WORK: rmnet_usb_freq_enable_work\n", __func__);
		rmnet_usb_freq_enable_work_init = 1;
	}

	if ( rmnet_usb_freq_disable_work_init == 0 ) {
		INIT_DELAYED_WORK(&rmnet_usb_freq_disable_work, rmnet_usb_freq_disable_work_func);
		rmnet_usb_freq_disable_work_init = 1;
	}

	if ( rmnet_usb_req_freq_active == 0 ) {
		pr_info("%s: pm_qos_add_request: freq", __func__);
		pm_qos_add_request(&rmnet_usb_req_freq, PM_QOS_CPU_FREQ_MIN, (s32)PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE);
		rmnet_usb_req_freq_active = 1;
	}

	if ( rmnet_usb_req_cpus_active == 0 ) {
		pr_info("%s: pm_qos_add_request: cpus", __func__);
		pm_qos_add_request(&rmnet_usb_req_cpus, PM_QOS_MIN_ONLINE_CPUS, (s32)PM_QOS_MIN_ONLINE_CPUS_DEFAULT_VALUE);
		rmnet_usb_req_cpus_active = 1;
	}

}
开发者ID:SimonSickle,项目名称:android_kernel_htc_evitareul,代码行数:32,代码来源:rmnet_usb_data.c


示例5: acipc_init

/* acipc_init is used to register interrupt call-back function */
int acipc_init(u32 lpm_qos)
{
	wakeup_source_init(&acipc_wakeup, "acipc_wakeup");

	/* we do not check any return value */
	acipc_event_bind(ACIPC_MODEM_DDR_UPDATE_REQ, acipc_cb_event_notify,
		       ACIPC_CB_NORMAL, NULL);

	acipc_event_bind(ACIPC_IPM, acipc_cb_block_cpuidle_axi,
		       ACIPC_CB_NORMAL, NULL);

	pm_qos_cpuidle_block_axi = lpm_qos;
	pm_qos_add_request(&cp_block_cpuidle_axi, PM_QOS_CPUIDLE_BLOCK,
		PM_QOS_CPUIDLE_BLOCK_DEFAULT_VALUE);

#ifdef CONFIG_DDR_DEVFREQ
	pm_qos_add_request(&modem_ddr_cons, PM_QOS_DDR_DEVFREQ_MIN,
		PM_QOS_DEFAULT_VALUE);
	INIT_WORK(&acipc_modem_ddr_freq_update,
		acipc_modem_ddr_freq_update_handler);
	acipc_wq = alloc_workqueue("ACIPC_WQ", WQ_HIGHPRI, 0);
#endif

	return 0;
}
开发者ID:acorn-marvell,项目名称:brillo_pxa_kernel,代码行数:26,代码来源:acipcd.c


示例6: fimg2d_pm_qos_add

void fimg2d_pm_qos_add(struct fimg2d_control *ctrl)
{
#if defined(CONFIG_ARM_EXYNOS_IKS_CPUFREQ) || \
	defined(CONFIG_ARM_EXYNOS_MP_CPUFREQ) || \
	defined(CONFIG_FIMG2D_USE_BUS_DEVFREQ)
	struct fimg2d_platdata *pdata;

#ifdef CONFIG_OF
	pdata = ctrl->pdata;
#else
	pdata = to_fimg2d_plat(ctrl->dev);
#endif
#endif

#if defined CONFIG_ARM_EXYNOS_IKS_CPUFREQ
	pm_qos_add_request(&ctrl->exynos5_g2d_cpu_qos,
			PM_QOS_CPU_FREQ_MIN, 0);
#elif defined CONFIG_ARM_EXYNOS_MP_CPUFREQ
	pm_qos_add_request(&ctrl->exynos5_g2d_cpu_qos,
			PM_QOS_CPU_FREQ_MIN, 0);
	pm_qos_add_request(&ctrl->exynos5_g2d_kfc_qos,
			PM_QOS_KFC_FREQ_MIN, 0);
#endif

#ifdef CONFIG_FIMG2D_USE_BUS_DEVFREQ
	pm_qos_add_request(&ctrl->exynos5_g2d_mif_qos,
			PM_QOS_BUS_THROUGHPUT, 0);
	pm_qos_add_request(&ctrl->exynos5_g2d_int_qos,
			PM_QOS_DEVICE_THROUGHPUT, 0);
#endif
}
开发者ID:Fevax,项目名称:kernel_samsung_exynos5422,代码行数:31,代码来源:fimg2d_drv.c


示例7: fimg2d_pm_qos_add_bus

void fimg2d_pm_qos_add_bus(struct fimg2d_control *ctrl)
{
	pm_qos_add_request(&ctrl->exynos5_g2d_mif_qos,
				PM_QOS_BUS_THROUGHPUT, 0);
	pm_qos_add_request(&ctrl->exynos5_g2d_int_qos,
				PM_QOS_DEVICE_THROUGHPUT, 0);
}
开发者ID:ShedrockN4,项目名称:wiliteneo,代码行数:7,代码来源:fimg2d_drv.c


示例8: modem_kfc_qos_init

static int __init modem_kfc_qos_init(void)
{
	pm_qos_add_request(&dl_kfc_num_qos, PM_QOS_KFC_NUM_MIN, 0);
	pm_qos_add_request(&dl_kfc_freq_qos, PM_QOS_KFC_FREQ_MIN, 0);

	return 0;
}
开发者ID:qkdang,项目名称:m462,代码行数:7,代码来源:nezha_hsic_serial.c


示例9: pwrctrl_dfs_init

int pwrctrl_dfs_init(void)
{
    void __iomem *reg_addr;
    struct acpufreqinfo *p_freqinfo;

    reg_addr = (void __iomem *)HISI_VA_ADDRESS(SOC_PERI_SCTRL_SC_RESERVED8_ADDR(SOC_PERI_SCTRL_BASE_ADDR));
    g_dfs_data_addr = ioremap(ACPU_DFS_FREQ_ADDR, ACPU_DFS_FREQ_ADDR_SIZE);

    p_freqinfo = (struct acpufreqinfo *)g_dfs_data_addr;
    p_freqinfo->dfs_flag = 0;
    p_freqinfo->dfs_acpu_freq = 0;
    p_freqinfo->dfs_temp_freq = 0;

    g_stPwcSwitch = (ST_PWC_SWITCH_STRU *)(reg_addr);

	dt_insmod_buslow();
	dt_insmod_bus_dfs();
	if(!dt_insmod_dvfs()){g_adfs_module = 1;}

    wake_lock_init(&acpu_freq_lock,WAKE_LOCK_SUSPEND,"acpu_freq_lock");

    ddr_min_req.pm_qos_class = 0;
    ddr_max_req.pm_qos_class = 0;
    pm_qos_add_request(&ddr_min_req, DFS_QOS_ID_DDR_MINFREQ, QOS_DDR_MIN_DEFAULT_VALUE + 2);
    pm_qos_add_request(&ddr_max_req, DFS_QOS_ID_DDR_MAXFREQ, QOS_DDR_MAX_DEFAULT_VALUE - 2);

    return RET_OK;
}
开发者ID:magnusjjj,项目名称:android_kernel_huawei_rle,代码行数:28,代码来源:hi6xxx-power-dfs.c


示例10: tegra_auto_hotplug_debug_init

static int __init tegra_auto_hotplug_debug_init(void)
{
    if (!tegra3_cpu_lock)
        return -ENOENT;

    hp_debugfs_root = debugfs_create_dir("tegra_hotplug", NULL);
    if (!hp_debugfs_root)
        return -ENOMEM;

    pm_qos_add_request(&min_cpu_req, PM_QOS_MIN_ONLINE_CPUS,
                       PM_QOS_DEFAULT_VALUE);
    pm_qos_add_request(&max_cpu_req, PM_QOS_MAX_ONLINE_CPUS,
                       PM_QOS_DEFAULT_VALUE);

    if (!debugfs_create_file(
                "min_cpus", S_IRUGO, hp_debugfs_root, NULL, &min_cpus_fops))
        goto err_out;

    if (!debugfs_create_file(
                "max_cpus", S_IRUGO, hp_debugfs_root, NULL, &max_cpus_fops))
        goto err_out;

    if (!debugfs_create_file(
                "stats", S_IRUGO, hp_debugfs_root, NULL, &hp_stats_fops))
        goto err_out;

    return 0;

err_out:
    debugfs_remove_recursive(hp_debugfs_root);
    pm_qos_remove_request(&min_cpu_req);
    pm_qos_remove_request(&max_cpu_req);
    return -ENOMEM;
}
开发者ID:AndroidDeveloperAlliance,项目名称:ZenKernel_Grouper,代码行数:34,代码来源:cpu-tegra3.c


示例11: exynos5_devfreq_isp_qos_init

static int exynos5_devfreq_isp_qos_init(void)
{
	pm_qos_add_request(&exynos5_isp_qos, PM_QOS_CAM_THROUGHPUT, exynos5433_qos_isp.default_qos);
	pm_qos_add_request(&min_isp_thermal_qos, PM_QOS_CAM_THROUGHPUT, exynos5433_qos_isp.default_qos);
	pm_qos_add_request(&boot_isp_qos, PM_QOS_CAM_THROUGHPUT, exynos5433_qos_isp.default_qos);

	return 0;
}
开发者ID:ColinIanKing,项目名称:m576,代码行数:8,代码来源:exynos5_bus_isp.c


示例12: exynos7_devfreq_disp_qos_init

static int __init exynos7_devfreq_disp_qos_init(void)
{
	pm_qos_add_request(&exynos7_disp_qos, PM_QOS_DISPLAY_THROUGHPUT, exynos7420_qos_disp.default_qos);
	pm_qos_add_request(&min_disp_thermal_qos, PM_QOS_DISPLAY_THROUGHPUT, exynos7420_qos_disp.default_qos);
	pm_qos_add_request(&boot_disp_qos, PM_QOS_DISPLAY_THROUGHPUT, exynos7420_qos_disp.default_qos);
	pm_qos_update_request_timeout(&exynos7_disp_qos,
					exynos7_devfreq_disp_profile.initial_freq, 40000 * 1000);
	return 0;
}
开发者ID:HRTKernel,项目名称:Hybridmax_Kernel_S6,代码行数:9,代码来源:exynos7_bus_disp.c


示例13: gpu_pm_qos_command

static int gpu_pm_qos_command(struct exynos_context *platform, gpu_pmqos_state state)
{
#ifdef CONFIG_BUS_DEVFREQ
	switch (state) {
	case GPU_CONTROL_PM_QOS_INIT:
		pm_qos_add_request(&exynos5_g3d_mif_qos, PM_QOS_BUS_THROUGHPUT, 0);
		pm_qos_add_request(&exynos5_g3d_int_qos, PM_QOS_DEVICE_THROUGHPUT, 0);
		pm_qos_add_request(&exynos5_g3d_cpu_kfc_min_qos, PM_QOS_KFC_FREQ_MIN, 0);
		pm_qos_add_request(&exynos5_g3d_cpu_egl_max_qos, PM_QOS_CPU_FREQ_MAX, PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE);
#if SLSI_INTEGRATION
#if defined(SET_MINLOCK)
		pm_qos_add_request(&exynos5_g3d_cpu_egl_min_qos, PM_QOS_CPU_FREQ_MIN, 0);

		platform->custom_cpu_max_lock = 0;
#endif
#endif
		break;
	case GPU_CONTROL_PM_QOS_DEINIT:
		pm_qos_remove_request(&exynos5_g3d_mif_qos);
		pm_qos_remove_request(&exynos5_g3d_int_qos);
		pm_qos_remove_request(&exynos5_g3d_cpu_kfc_min_qos);
		pm_qos_remove_request(&exynos5_g3d_cpu_egl_max_qos);
#if SLSI_INTEGRATION
#if defined(SET_MINLOCK)
		pm_qos_remove_request(&exynos5_g3d_cpu_egl_min_qos);
#endif
#endif
		break;
	case GPU_CONTROL_PM_QOS_SET:
		if (platform->step < 0)
			return -1;
		pm_qos_update_request(&exynos5_g3d_mif_qos, platform->table[platform->step].mem_freq);
		pm_qos_update_request(&exynos5_g3d_int_qos, platform->table[platform->step].int_freq);
		pm_qos_update_request(&exynos5_g3d_cpu_kfc_min_qos, platform->table[platform->step].cpu_freq);

#if SLSI_INTEGRATION
#if defined(SET_MINLOCK)
		if (platform->custom_cpu_max_lock)
			pm_qos_update_request(&exynos5_g3d_cpu_egl_max_qos, platform->custom_cpu_max_lock);
		else
#endif
#endif
			pm_qos_update_request(&exynos5_g3d_cpu_egl_max_qos, platform->table[platform->step].cpu_max_freq);

		break;
	case GPU_CONTROL_PM_QOS_RESET:
		pm_qos_update_request(&exynos5_g3d_mif_qos, 0);
		pm_qos_update_request(&exynos5_g3d_int_qos, 0);
		pm_qos_update_request(&exynos5_g3d_cpu_kfc_min_qos, 0);
		pm_qos_update_request(&exynos5_g3d_cpu_egl_max_qos, PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE);
	default:
		break;
	}
#endif /* CONFIG_BUS_DEVFREQ */
	return 0;
}
开发者ID:djmax81,项目名称:android_kernel_samsung_exynos5433_LL,代码行数:56,代码来源:gpu_control.c


示例14: exynos5_devfreq_int_qos_init

static int __init exynos5_devfreq_int_qos_init(void)
{
	pm_qos_add_request(&exynos5_int_qos, PM_QOS_DEVICE_THROUGHPUT, exynos5433_qos_int.default_qos);
	pm_qos_add_request(&min_int_thermal_qos, PM_QOS_DEVICE_THROUGHPUT, exynos5433_qos_int.default_qos);
	pm_qos_add_request(&boot_int_qos, PM_QOS_DEVICE_THROUGHPUT, exynos5433_qos_int.default_qos);
	pm_qos_add_request(&exynos5_int_bts_qos, PM_QOS_DEVICE_THROUGHPUT, exynos5433_qos_int.default_qos);
	pm_qos_update_request_timeout(&exynos5_int_qos,
					exynos5_devfreq_int_profile.initial_freq, 40000 * 1000);

	return 0;
}
开发者ID:KangDroid,项目名称:android_kernel_samsung_slteskt,代码行数:11,代码来源:exynos5_bus_int.c


示例15: simple_dip_probe

static int simple_dip_probe(struct platform_device *dev)
{
	int ret = 0;
	wake_lock_init(&dip_wakelock, WAKE_LOCK_SUSPEND, "dip_wakeups");
	dip_info = kzalloc(sizeof(struct dip_info), GFP_KERNEL);
	if (!dip_info)
		return -ENOMEM;
	dip_info->misc_dev.minor = MISCDEV_MINOR;
	dip_info->misc_dev.name = DRV_NAME;
	dip_info->misc_dev.fops = &simple_dip_fops;
	dip_info->comp_info_array.comp_info = comp_info_temp;
	dip_info->cpu = clk_get(NULL, CLK_CPU);
	if (IS_ERR(dip_info->cpu)) {
		pr_err("cannot get clk(cpu)\n");
		goto err_free_dip;
	}

	dip_info->cpu_min_qos.name = "dip_cpu_min";
	pm_qos_add_request(&dip_info->cpu_min_qos, PM_QOS_CPUFREQ_MIN,
			   PM_QOS_DEFAULT_VALUE);

	dip_info->cpu_max_qos.name = "dip_cpu_max";
	pm_qos_add_request(&dip_info->cpu_max_qos, PM_QOS_CPUFREQ_MAX,
			   INT_MAX);

	dip_info->ddr = clk_get(NULL, CLK_DDR);
	if (IS_ERR(dip_info->ddr)) {
		pr_err("cannot get clk(ddr)\n");
		goto err_free_dip;
	}
	dip_info->ddr_min_qos.name = "dip_ddr_min";
	pm_qos_add_request(&dip_info->ddr_min_qos, PM_QOS_DDR_DEVFREQ_MIN,
			   PM_QOS_DEFAULT_VALUE);
	dip_info->ddr_max_qos.name = "dip_ddr_max";
	pm_qos_add_request(&dip_info->ddr_max_qos, PM_QOS_DDR_DEVFREQ_MAX,
			   INT_MAX);

	/* register misc device */
	ret = misc_register(&dip_info->misc_dev);
	if (ret < 0) {
		dev_err(&dev->dev, "misc_register() for minor %d failed\n",
			MISCDEV_MINOR);
		goto err_free_dip;
	}
	platform_set_drvdata(dev, dip_info);
	return 0;

err_free_dip:
	platform_set_drvdata(dev, NULL);
	kfree(dip_info);
	return ret;
}
开发者ID:CTXz,项目名称:Degaswifi-CPU-tweaks,代码行数:52,代码来源:simple_dip.c


示例16: sr_class1p5_init

/**
 * sr_class1p5_init() - class 1p5 init
 * @voltdm:		sr voltage domain
 * @voltdm_cdata:	voltage domain specific private class data
 *			allocated by class init with work item data
 *			freed by deinit.
 * @class_priv_data:	private data for the class (unused)
 *
 * we do class specific initialization like creating sysfs/debugfs entries
 * needed, spawning of a kthread if needed etc.
 */
static int sr_class1p5_init(struct voltagedomain *voltdm,
			    void **voltdm_cdata, void *class_priv_data)
{
	struct sr_class1p5_work_data *work_data;

	if (IS_ERR_OR_NULL(voltdm) || IS_ERR_OR_NULL(voltdm_cdata)) {
		pr_err("%s: bad parameters!\n", __func__);
		return -EINVAL;
	}

	if (!IS_ERR_OR_NULL(*voltdm_cdata)) {
		pr_err("%s: ooopps.. class already initialized for %s! bug??\n",
		       __func__, voltdm->name);
		return -EINVAL;
	}
	/* setup our work params */
	work_data = kzalloc(sizeof(struct sr_class1p5_work_data), GFP_KERNEL);
	if (!work_data) {
		pr_err("%s: no memory to allocate work data on domain %s\n",
			__func__, voltdm->name);
		return -ENOMEM;
	}

	work_data->voltdm = voltdm;
	INIT_DELAYED_WORK_DEFERRABLE(&work_data->work, sr_class1p5_calib_work);
	*voltdm_cdata = (void *)work_data;
	pm_qos_add_request(&work_data->qos, PM_QOS_CPU_DMA_LATENCY,
			  PM_QOS_DEFAULT_VALUE);

	return 0;
}
开发者ID:samno1607,项目名称:Jekyll-Hyde,代码行数:42,代码来源:smartreflex-class1p5.c


示例17: omap_mcpdm_prepare

static int omap_mcpdm_prepare(struct snd_pcm_substream *substream,
				  struct snd_soc_dai *dai)
{
	struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
	struct pm_qos_request *pm_qos_req = &mcpdm->pm_qos_req;
	int tx = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
	int stream1 = tx ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE;
	int stream2 = tx ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
	int latency = mcpdm->latency[stream2];

	/* Prevent omap hardware from hitting off between FIFO fills */
	if (!latency || mcpdm->latency[stream1] < latency)
		latency = mcpdm->latency[stream1];

	if (pm_qos_request_active(pm_qos_req))
		pm_qos_update_request(pm_qos_req, latency);
	else if (latency)
		pm_qos_add_request(pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency);

	if (!omap_mcpdm_active(mcpdm)) {
		omap_mcpdm_start(mcpdm);
		omap_mcpdm_reg_dump(mcpdm);
	} else if (mcpdm->restart) {
		omap_mcpdm_stop(mcpdm);
		omap_mcpdm_start(mcpdm);
		mcpdm->restart = false;
		omap_mcpdm_reg_dump(mcpdm);
	}

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:31,代码来源:omap-mcpdm.c


示例18: exynos4_busfreq_lock

/* Wrappers for obsolete legacy kernel hack (busfreq_lock/lock_free) */
int exynos4_busfreq_lock(unsigned int nId, enum busfreq_level_request lvl)
{
	s32 qos_value;

	if (WARN(nId >= DVFS_LOCK_ID_END, "incorrect nId."))
		return -EINVAL;
	if (WARN(lvl >= BUS_LEVEL_END, "incorrect level."))
		return -EINVAL;

	switch (lvl) {
	case BUS_L0:
		qos_value = 400000;
		break;
	case BUS_L1:
		qos_value = 267000;
		break;
	case BUS_L2:
		qos_value = 133000;
		break;
	default:
		qos_value = 0;
	}

	if (qos_wrapper[nId].pm_qos_class == 0) {
		pm_qos_add_request(&qos_wrapper[nId],
				   PM_QOS_BUS_QOS, qos_value);
	} else {
		pm_qos_update_request(&qos_wrapper[nId], qos_value);
	}

	return 0;
}
开发者ID:perillamint,项目名称:tizen-linux-3.0,代码行数:33,代码来源:dispfreq_opp_exynos4.c


示例19: msm_v4l2_open

static int msm_v4l2_open(struct file *filp)
{
	struct video_device *vdev = video_devdata(filp);
	struct msm_video_device *vid_dev =
		container_of(vdev, struct msm_video_device, vdev);
	struct msm_vidc_core *core = video_drvdata(filp);
	struct msm_vidc_inst *vidc_inst;

	trace_msm_v4l2_vidc_open_start("msm_v4l2_open start");
	vidc_inst = msm_vidc_open(core->id, vid_dev->type);
	if (!vidc_inst) {
		dprintk(VIDC_ERR,
		"Failed to create video instance, core: %d, type = %d\n",
		core->id, vid_dev->type);
		return -ENOMEM;
	}
	#ifdef CONFIG_LGE_UNDERRUN
	dprintk(VIDC_ERR, "msm_vidc: pm_qos_add_request, 1000uSec\n");
	pm_qos_add_request(&msm_v4l2_vidc_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, 1000);
	#endif
	clear_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags);
	filp->private_data = &(vidc_inst->event_handler);
	trace_msm_v4l2_vidc_open_end("msm_v4l2_open end");
	return 0;
}
开发者ID:GameTheory-,项目名称:android_kernel_g4stylusn2,代码行数:25,代码来源:msm_v4l2_vidc.c


示例20: msm_v4l2_open

static int msm_v4l2_open(struct file *filp)
{
	struct video_device *vdev = video_devdata(filp);
	struct msm_video_device *vid_dev =
		container_of(vdev, struct msm_video_device, vdev);
	struct msm_vidc_core *core = video_drvdata(filp);
	struct msm_vidc_inst *vidc_inst;

	vidc_inst = msm_vidc_open(core->id, vid_dev->type);
	if (!vidc_inst) {
		dprintk(VIDC_ERR,
		"Failed to create video instance, core: %d, type = %d\n",
		core->id, vid_dev->type);
		return -ENOMEM;
	}

	if (!pm_qos_request_active(&vidc_inst->pm_qos)) {
		dprintk(VIDC_DBG, "pm_qos_add with latency 332usec\n");
		pm_qos_add_request(&vidc_inst->pm_qos,
				PM_QOS_CPU_DMA_LATENCY, 332);
	}

	clear_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags);
	filp->private_data = &(vidc_inst->event_handler);
	return 0;
}
开发者ID:robcore,项目名称:hammerheadcaf_kernel,代码行数:26,代码来源:msm_v4l2_vidc.c



注:本文中的pm_qos_add_request函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pm_qos_remove_request函数代码示例发布时间:2022-05-30
下一篇:
C++ pm_printf函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap