当前位置: 首页>>代码示例>>C++>>正文


C++ pm_qos_add_request函数代码示例

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


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


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