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


C++ drm_kms_helper_poll_disable函数代码示例

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


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

示例1: i915_drm_freeze

static int i915_drm_freeze(struct drm_device *dev)
{
	struct drm_i915_private *dev_priv;
	int error;

	dev_priv = dev->dev_private;
	drm_kms_helper_poll_disable(dev);

#if 0
	pci_save_state(dev->pdev);
#endif

	DRM_LOCK(dev);
	/* If KMS is active, we do the leavevt stuff here */
	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		error = -i915_gem_idle(dev);
		if (error) {
			DRM_UNLOCK(dev);
			device_printf(dev->device,
			    "GEM idle failed, resume might fail\n");
			return (error);
		}
		drm_irq_uninstall(dev);
	}

	i915_save_state(dev);

	intel_opregion_fini(dev);

	/* Modeset on resume, not lid events */
	dev_priv->modeset_on_lid = 0;
	DRM_UNLOCK(dev);

	return 0;
}
开发者ID:Alkzndr,项目名称:freebsd,代码行数:35,代码来源:i915_drv.c

示例2: i915_drm_freeze

static int i915_drm_freeze(struct drm_device *dev)
{
	struct drm_i915_private *dev_priv = dev->dev_private;

	drm_kms_helper_poll_disable(dev);

	pci_save_state(dev->pdev);

	/* If KMS is active, we do the leavevt stuff here */
	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		int error = i915_gem_idle(dev);
		if (error) {
			dev_err(&dev->pdev->dev,
				"GEM idle failed, resume might fail\n");
			return error;
		}
		drm_irq_uninstall(dev);
	}

	i915_save_state(dev);

	intel_opregion_fini(dev);

	/* Modeset on resume, not lid events */
	dev_priv->modeset_on_lid = 0;

	console_lock();
	intel_fbdev_set_suspend(dev, 1);
	console_unlock();

	return 0;
}
开发者ID:jebtang,项目名称:mortar,代码行数:32,代码来源:i915_drv.c

示例3: fsl_dcu_drm_pm_suspend

static int fsl_dcu_drm_pm_suspend(struct device *dev)
{
	struct fsl_dcu_drm_device *fsl_dev = dev_get_drvdata(dev);

	if (!fsl_dev)
		return 0;

	disable_irq(fsl_dev->irq);
	drm_kms_helper_poll_disable(fsl_dev->drm);

	console_lock();
	drm_fbdev_cma_set_suspend(fsl_dev->fbdev, 1);
	console_unlock();

	fsl_dev->state = drm_atomic_helper_suspend(fsl_dev->drm);
	if (IS_ERR(fsl_dev->state)) {
		console_lock();
		drm_fbdev_cma_set_suspend(fsl_dev->fbdev, 0);
		console_unlock();

		drm_kms_helper_poll_enable(fsl_dev->drm);
		enable_irq(fsl_dev->irq);
		return PTR_ERR(fsl_dev->state);
	}

	clk_disable_unprepare(fsl_dev->pix_clk);
	clk_disable_unprepare(fsl_dev->clk);

	return 0;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:30,代码来源:fsl_dcu_drm_drv.c

示例4: i915_suspend

int i915_suspend(struct drm_device *dev, pm_message_t state)
{
	int error;

	if (!dev || !dev->dev_private) {
		DRM_ERROR("dev: %p\n", dev);
		DRM_ERROR("DRM not initialized, aborting suspend.\n");
		return -ENODEV;
	}

	if (state.event == PM_EVENT_PRETHAW)
		return 0;

	drm_kms_helper_poll_disable(dev);

	error = i915_drm_freeze(dev);
	if (error)
		return error;

	if (state.event == PM_EVENT_SUSPEND) {
		/* Shut down the device */
		pci_disable_device(dev->pdev);
		pci_set_power_state(dev->pdev, PCI_D3hot);
	}

	return 0;
}
开发者ID:Stefan-Schmidt,项目名称:linux-2.6,代码行数:27,代码来源:i915_drv.c

示例5: i915_drm_freeze

static int i915_drm_freeze(struct drm_device *dev)
{
	struct drm_i915_private *dev_priv = dev->dev_private;
	struct drm_crtc *crtc;

	intel_runtime_pm_get(dev_priv);

	/* ignore lid events during suspend */
	mutex_lock(&dev_priv->modeset_restore_lock);
	dev_priv->modeset_restore = MODESET_SUSPENDED;
	mutex_unlock(&dev_priv->modeset_restore_lock);

	/* We do a lot of poking in a lot of registers, make sure they work
	 * properly. */
	hsw_disable_package_c8(dev_priv);
	intel_display_set_init_power(dev, true);

	drm_kms_helper_poll_disable(dev);

	pci_save_state(dev->pdev);

	/* If KMS is active, we do the leavevt stuff here */
	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		int error;

		error = i915_gem_suspend(dev);
		if (error) {
			dev_err(&dev->pdev->dev,
				"GEM idle failed, resume might fail\n");
			return error;
		}

		cancel_delayed_work_sync(&dev_priv->rps.delayed_resume_work);

		drm_irq_uninstall(dev);
		dev_priv->enable_hotplug_processing = false;
		/*
		 * Disable CRTCs directly since we want to preserve sw state
		 * for _thaw.
		 */
		mutex_lock(&dev->mode_config.mutex);
		list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
			dev_priv->display.crtc_disable(crtc);
		mutex_unlock(&dev->mode_config.mutex);

		intel_modeset_suspend_hw(dev);
	}

	i915_gem_suspend_gtt_mappings(dev);

	i915_save_state(dev);

	intel_opregion_fini(dev);

	console_lock();
	intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED);
	console_unlock();

	return 0;
}
开发者ID:Truefans,项目名称:KVMGT-kernel,代码行数:60,代码来源:i915_drv.c

示例6: omap_drm_suspend

static int omap_drm_suspend(struct device *dev)
{
	struct drm_device *drm_dev = dev_get_drvdata(dev);

	drm_kms_helper_poll_disable(drm_dev);

	return 0;
}
开发者ID:ninjablocks,项目名称:kernel-VAR-SOM-AMxx,代码行数:8,代码来源:omap_drv.c

示例7: udl_usb_suspend

static int udl_usb_suspend(struct usb_interface *interface,
			   pm_message_t message)
{
	struct drm_device *dev = usb_get_intfdata(interface);

	drm_kms_helper_poll_disable(dev);
	return 0;
}
开发者ID:avagin,项目名称:linux,代码行数:8,代码来源:udl_drv.c

示例8: shmob_drm_pm_suspend

static int shmob_drm_pm_suspend(struct device *dev)
{
	struct shmob_drm_device *sdev = dev_get_drvdata(dev);

	drm_kms_helper_poll_disable(sdev->ddev);
	shmob_drm_crtc_suspend(&sdev->crtc);

	return 0;
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:9,代码来源:shmob_drm_drv.c

示例9: udl_usb_disconnect

static void udl_usb_disconnect(struct usb_interface *interface)
{
	struct drm_device *dev = usb_get_intfdata(interface);

	drm_kms_helper_poll_disable(dev);
	udl_fbdev_unplug(dev);
	udl_drop_usb(dev);
	drm_unplug_dev(dev);
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:9,代码来源:udl_drv.c

示例10: xylon_drm_pm_suspend

static int __maybe_unused xylon_drm_pm_suspend(struct device *dev)
{
	struct xylon_drm_device *xdev = dev_get_drvdata(dev);

	drm_kms_helper_poll_disable(xdev->dev);
	drm_helper_connector_dpms(xdev->connector, DRM_MODE_DPMS_SUSPEND);

	return 0;
}
开发者ID:TE-HiroakiYamazoe,项目名称:linux-xlnx,代码行数:9,代码来源:xylon_drv.c

示例11: ast_drm_freeze

static int ast_drm_freeze(struct drm_device *dev)
{
	drm_kms_helper_poll_disable(dev);

	pci_save_state(dev->pdev);

	console_lock();
	ast_fbdev_set_suspend(dev, 1);
	console_unlock();
	return 0;
}
开发者ID:513855417,项目名称:linux,代码行数:11,代码来源:ast_drv.c

示例12: omap_drm_suspend

static int omap_drm_suspend(struct device *dev)
{
	struct drm_device *drm_dev = dev_get_drvdata(dev);

	drm_kms_helper_poll_disable(drm_dev);

	drm_modeset_lock_all(drm_dev);
	omap_drm_suspend_all_displays();
	drm_modeset_unlock_all(drm_dev);

	return 0;
}
开发者ID:ReneNyffenegger,项目名称:linux,代码行数:12,代码来源:omap_drv.c

示例13: vbox_drm_freeze

static int vbox_drm_freeze(struct drm_device *dev)
{
	struct vbox_private *vbox = dev->dev_private;

	drm_kms_helper_poll_disable(dev);

	pci_save_state(dev->pdev);

	drm_fb_helper_set_suspend_unlocked(&vbox->fbdev->helper, true);

	return 0;
}
开发者ID:mdamt,项目名称:linux,代码行数:12,代码来源:vbox_drv.c

示例14: bochs_pm_suspend

static int bochs_pm_suspend(struct device *dev)
{
	struct pci_dev *pdev = to_pci_dev(dev);
	struct drm_device *drm_dev = pci_get_drvdata(pdev);
	struct bochs_device *bochs = drm_dev->dev_private;

	drm_kms_helper_poll_disable(drm_dev);

	drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1);

	return 0;
}
开发者ID:akhandual,项目名称:linux,代码行数:12,代码来源:bochs_drv.c

示例15: fsl_dcu_drm_pm_suspend

static int fsl_dcu_drm_pm_suspend(struct device *dev)
{
	struct fsl_dcu_drm_device *fsl_dev = dev_get_drvdata(dev);

	if (!fsl_dev)
		return 0;

	drm_kms_helper_poll_disable(fsl_dev->drm);
	regcache_cache_only(fsl_dev->regmap, true);
	regcache_mark_dirty(fsl_dev->regmap);
	clk_disable(fsl_dev->clk);
	clk_unprepare(fsl_dev->clk);

	return 0;
}
开发者ID:BigeyeDestroyer,项目名称:linux,代码行数:15,代码来源:fsl_dcu_drm_drv.c


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