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

C++ drm_irq_uninstall函数代码示例

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

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



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

示例1: PVRSRVDRMUnload

static int PVRSRVDRMUnload(struct drm_device *dev)
{
	struct pvr_drm_dev_priv *psDevPriv = (struct pvr_drm_dev_priv *)dev->dev_private;
#if defined(SUPPORT_SYSTEM_INTERRUPT_HANDLING)
	IMG_HANDLE hSysData = psDevPriv->hSysData;
#endif

	PVR_TRACE(("PVRSRVDRMUnload"));

#if defined(SUPPORT_DRM_DC_MODULE)
	(void)PVRSRVDRMDisplayDeinit(dev);
#endif

	psDevPriv->dev_node = NULL;
	PVRSRVSystemDeInit();

#if defined(SUPPORT_SYSTEM_INTERRUPT_HANDLING)
	psDevPriv->hSysData = NULL;

	SysReleaseSystemData(hSysData);

	drm_irq_uninstall(dev);
#endif

	return 0;
}
开发者ID:mfkiwl,项目名称:CC-A80-kernel-source,代码行数:26,代码来源:pvr_drm.c


示例2: amdgpu_irq_fini

/**
 * amdgpu_irq_fini - tear down driver interrupt info
 *
 * @adev: amdgpu device pointer
 *
 * Tears down the work irq handlers, vblank handlers, MSIs, etc. (all asics).
 */
void amdgpu_irq_fini(struct amdgpu_device *adev)
{
    unsigned i;

    drm_vblank_cleanup(adev->ddev);
    if (adev->irq.installed) {
        drm_irq_uninstall(adev->ddev);
        adev->irq.installed = false;
        if (adev->irq.msi_enabled)
            pci_disable_msi(adev->pdev);
        flush_work(&adev->hotplug_work);
    }

    for (i = 0; i < AMDGPU_MAX_IRQ_SRC_ID; ++i) {
        struct amdgpu_irq_src *src = adev->irq.sources[i];

        if (!src)
            continue;

        kfree(src->enabled_types);
        src->enabled_types = NULL;
        if (src->data) {
            kfree(src->data);
            kfree(src);
            adev->irq.sources[i] = NULL;
        }
    }
}
开发者ID:RadeonOpenCompute,项目名称:ROCK-Kernel-Driver,代码行数:35,代码来源:amdgpu_irq.c


示例3: 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


示例4: 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


示例5: nouveau_card_takedown

static void nouveau_card_takedown(struct drm_device *dev)
{
	struct drm_nouveau_private *dev_priv = dev->dev_private;
	struct nouveau_engine *engine = &dev_priv->Engine;

	DRM_DEBUG("prev state = %d\n", dev_priv->init_state);

	if (dev_priv->init_state != NOUVEAU_CARD_INIT_DOWN) {
		nouveau_backlight_exit(dev);

		nouveau_dma_channel_takedown(dev);

		engine->fifo.takedown(dev);
		engine->graph.takedown(dev);
		engine->fb.takedown(dev);
		engine->timer.takedown(dev);
		engine->mc.takedown(dev);

		nouveau_sgdma_nottm_hack_takedown(dev);
		nouveau_sgdma_takedown(dev);

		nouveau_gpuobj_takedown(dev);
		nouveau_gpuobj_del(dev, &dev_priv->vm_vram_pt);

		nouveau_mem_close(dev);
		engine->instmem.takedown(dev);

		drm_irq_uninstall(dev);

		nouveau_gpuobj_late_takedown(dev);

		dev_priv->init_state = NOUVEAU_CARD_INIT_DOWN;
	}
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:34,代码来源:nouveau_state.c


示例6: amdgpu_irq_fini

/**
 * amdgpu_irq_fini - tear down driver interrupt info
 *
 * @adev: amdgpu device pointer
 *
 * Tears down the work irq handlers, vblank handlers, MSIs, etc. (all asics).
 */
void amdgpu_irq_fini(struct amdgpu_device *adev)
{
	unsigned i, j;

	if (adev->irq.installed) {
		drm_irq_uninstall(adev->ddev);
		adev->irq.installed = false;
		if (adev->irq.msi_enabled)
			pci_disable_msi(adev->pdev);
		flush_work(&adev->hotplug_work);
		cancel_work_sync(&adev->reset_work);
	}

	for (i = 0; i < AMDGPU_IH_CLIENTID_MAX; ++i) {
		if (!adev->irq.client[i].sources)
			continue;

		for (j = 0; j < AMDGPU_MAX_IRQ_SRC_ID; ++j) {
			struct amdgpu_irq_src *src = adev->irq.client[i].sources[j];

			if (!src)
				continue;

			kfree(src->enabled_types);
			src->enabled_types = NULL;
			if (src->data) {
				kfree(src->data);
				kfree(src);
				adev->irq.client[i].sources[j] = NULL;
			}
		}
		kfree(adev->irq.client[i].sources);
	}
}
开发者ID:MaxKellermann,项目名称:linux,代码行数:41,代码来源:amdgpu_irq.c


示例7: radeon_irq_kms_fini

void radeon_irq_kms_fini(struct radeon_device *rdev)
{
	if (rdev->irq.installed) {
		rdev->irq.installed = false;
		drm_irq_uninstall(rdev->ddev);
	}
}
开发者ID:pthomas,项目名称:linux-2.6,代码行数:7,代码来源:radeon_irq_kms.c


示例8: i915_suspend

static int i915_suspend(struct drm_device *dev, pm_message_t state)
{
	struct drm_i915_private *dev_priv = dev->dev_private;

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

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

	pci_save_state(dev->pdev);

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

	i915_save_state(dev);

	intel_opregion_free(dev, 1);

	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:AppEngine,项目名称:linux-2.6,代码行数:35,代码来源:i915_drv.c


示例9: 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


示例10: radeon_irq_kms_fini

/**
 * radeon_irq_kms_fini - tear down driver interrrupt info
 *
 * @rdev: radeon device pointer
 *
 * Tears down the work irq handlers, vblank handlers, MSIs, etc. (all asics).
 */
void radeon_irq_kms_fini(struct radeon_device *rdev)
{
	drm_vblank_cleanup(rdev->ddev);
	if (rdev->irq.installed) {
		drm_irq_uninstall(rdev->ddev);
		rdev->irq.installed = false;
	}
	taskqueue_drain(rdev->tq, &rdev->hotplug_work);
}
开发者ID:mihaicarabas,项目名称:dragonfly,代码行数:16,代码来源:radeon_irq_kms.c


示例11: nouveau_irq_fini

void
nouveau_irq_fini(struct drm_device *dev)
{
	struct drm_nouveau_private *dev_priv = dev->dev_private;

	drm_irq_uninstall(dev);
	if (dev_priv->msi_enabled)
		pci_disable_msi(dev->pdev);
}
开发者ID:1111saeid,项目名称:jb_kernel_3.0.16_htc_golfu,代码行数:9,代码来源:nouveau_irq.c


示例12: via_final_context

int via_final_context(struct drm_device *dev, int context)
{	
        int i;
	drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;

	for (i = 0; i < MAX_CONTEXT; i++)
		if (global_ppriv[i].used &&
		    (global_ppriv[i].context == context))
			break;

	if (i < MAX_CONTEXT) {
		set_t *set;
		ITEM_TYPE item;
		int retval;

		DRM_DEBUG("find socket %d, context = %d\n", i, context);

		/* Video Memory */
		set = global_ppriv[i].sets[0];
		retval = via_setFirst(set, &item);
		while (retval) {
			DRM_DEBUG("free video memory 0x%lx\n", item);
			via_mmFreeMem((PMemBlock) item);
			retval = via_setNext(set, &item);
		}
		via_setDestroy(set);

		/* AGP Memory */
		set = global_ppriv[i].sets[1];
		retval = via_setFirst(set, &item);
		while (retval) {
			DRM_DEBUG("free agp memory 0x%lx\n", item);
			via_mmFreeMem((PMemBlock) item);
			retval = via_setNext(set, &item);
		}
		via_setDestroy(set);
		global_ppriv[i].used = 0;
	}
	via_release_futex(dev_priv, context); 
	
			
#if defined(__linux__)
	/* Linux specific until context tracking code gets ported to BSD */
	/* Last context, perform cleanup */
	if (dev->ctx_count == 1 && dev->dev_private) {
	        DRM_DEBUG("Last Context\n");
		if (dev->irq)
			drm_irq_uninstall(dev);

		via_cleanup_futex(dev_priv);
		via_do_cleanup_map(dev);
	}
#endif

	return 1;
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:56,代码来源:via_mm.c


示例13: fsl_dcu_unload

static int fsl_dcu_unload(struct drm_device *dev)
{
	drm_mode_config_cleanup(dev);
	drm_vblank_cleanup(dev);
	drm_irq_uninstall(dev);

	dev->dev_private = NULL;

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


示例14: radeon_irq_kms_fini

/**
 * radeon_irq_kms_fini - tear down driver interrupt info
 *
 * @rdev: radeon device pointer
 *
 * Tears down the work irq handlers, vblank handlers, MSIs, etc. (all asics).
 */
void radeon_irq_kms_fini(struct radeon_device *rdev)
{
	drm_vblank_cleanup(rdev->ddev);
	if (rdev->irq.installed) {
		drm_irq_uninstall(rdev->ddev);
		rdev->irq.installed = false;
		if (rdev->msi_enabled)
			pci_disable_msi(rdev->pdev);
		flush_work(&rdev->hotplug_work);
	}
}
开发者ID:168519,项目名称:linux,代码行数:18,代码来源:radeon_irq_kms.c


示例15: shmob_drm_unload

static int shmob_drm_unload(struct drm_device *dev)
{
	drm_kms_helper_poll_fini(dev);
	drm_mode_config_cleanup(dev);
	drm_vblank_cleanup(dev);
	drm_irq_uninstall(dev);

	dev->dev_private = NULL;

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


示例16: vmw_driver_unload

static int vmw_driver_unload(struct drm_device *dev)
{
    struct vmw_private *dev_priv = vmw_priv(dev);
    enum vmw_res_type i;

    unregister_pm_notifier(&dev_priv->pm_nb);

    if (dev_priv->ctx.res_ht_initialized)
        drm_ht_remove(&dev_priv->ctx.res_ht);
    vfree(dev_priv->ctx.cmd_bounce);
    if (dev_priv->enable_fb) {
        vmw_fb_off(dev_priv);
        vmw_fb_close(dev_priv);
        vmw_fifo_resource_dec(dev_priv);
        vmw_svga_disable(dev_priv);
    }

    vmw_kms_close(dev_priv);
    vmw_overlay_close(dev_priv);

    if (dev_priv->has_gmr)
        (void)ttm_bo_clean_mm(&dev_priv->bdev, VMW_PL_GMR);
    (void)ttm_bo_clean_mm(&dev_priv->bdev, TTM_PL_VRAM);

    vmw_release_device_early(dev_priv);
    if (dev_priv->has_mob)
        (void) ttm_bo_clean_mm(&dev_priv->bdev, VMW_PL_MOB);
    (void) ttm_bo_device_release(&dev_priv->bdev);
    vmw_release_device_late(dev_priv);
    vmw_fence_manager_takedown(dev_priv->fman);
    if (dev_priv->capabilities & SVGA_CAP_IRQMASK)
        drm_irq_uninstall(dev_priv->dev);
    if (dev_priv->stealth)
        pci_release_region(dev->pdev, 2);
    else
        pci_release_regions(dev->pdev);

    ttm_object_device_release(&dev_priv->tdev);
    iounmap(dev_priv->mmio_virt);
    arch_phys_wc_del(dev_priv->mmio_mtrr);
    if (dev_priv->ctx.staged_bindings)
        vmw_binding_state_free(dev_priv->ctx.staged_bindings);
    vmw_ttm_global_release(dev_priv);

    for (i = vmw_res_context; i < vmw_res_max; ++i)
        idr_destroy(&dev_priv->res_idr[i]);

    kfree(dev_priv);

    return 0;
}
开发者ID:aejsmith,项目名称:linux,代码行数:51,代码来源:vmwgfx_drv.c


示例17: armada_drm_unload

static int armada_drm_unload(struct drm_device *dev)
{
	struct armada_private *priv = dev->dev_private;

	drm_kms_helper_poll_fini(dev);
	armada_fbdev_fini(dev);
	drm_irq_uninstall(dev);
	drm_mode_config_cleanup(dev);
	drm_mm_takedown(&priv->linear);
	flush_work(&priv->fb_unref_work);
	dev->dev_private = NULL;

	return 0;
}
开发者ID:CenturyGlorion,项目名称:linux,代码行数:14,代码来源:armada_drv.c


示例18: fsl_dcu_load

static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)
{
	struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
	int ret;

	ret = fsl_dcu_drm_modeset_init(fsl_dev);
	if (ret < 0) {
		dev_err(dev->dev, "failed to initialize mode setting\n");
		return ret;
	}

	ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
	if (ret < 0) {
		dev_err(dev->dev, "failed to initialize vblank\n");
		goto done;
	}

	ret = fsl_dcu_drm_irq_init(dev);
	if (ret < 0)
		goto done;
	dev->irq_enabled = true;

	if (legacyfb_depth != 16 && legacyfb_depth != 24 &&
	    legacyfb_depth != 32) {
		dev_warn(dev->dev,
			"Invalid legacyfb_depth.  Defaulting to 24bpp\n");
		legacyfb_depth = 24;
	}
	fsl_dev->fbdev = drm_fbdev_cma_init(dev, legacyfb_depth, 1);
	if (IS_ERR(fsl_dev->fbdev)) {
		ret = PTR_ERR(fsl_dev->fbdev);
		fsl_dev->fbdev = NULL;
		goto done;
	}

	return 0;
done:
	drm_kms_helper_poll_fini(dev);

	if (fsl_dev->fbdev)
		drm_fbdev_cma_fini(fsl_dev->fbdev);

	drm_mode_config_cleanup(dev);
	drm_vblank_cleanup(dev);
	drm_irq_uninstall(dev);
	dev->dev_private = NULL;

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


示例19: 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. */
	intel_display_set_init_power(dev_priv, 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;
		}

		intel_disable_gt_powersave(dev);

		/*
		 * Disable CRTCs directly since we want to preserve sw state
		 * for _thaw.
		 */
		drm_modeset_lock_all(dev);
		for_each_crtc(dev, crtc) {
			dev_priv->display.crtc_disable(crtc);
		}
		drm_modeset_unlock_all(dev);

		intel_dp_mst_suspend(dev);
		drm_irq_uninstall(dev);

		intel_modeset_suspend_hw(dev);
	}
开发者ID:spacex,项目名称:kernel-centos7,代码行数:48,代码来源:i915_drv.c


示例20: fsl_dcu_unload

static void fsl_dcu_unload(struct drm_device *dev)
{
	struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;

	drm_crtc_force_disable_all(dev);
	drm_kms_helper_poll_fini(dev);

	if (fsl_dev->fbdev)
		drm_fbdev_cma_fini(fsl_dev->fbdev);

	drm_mode_config_cleanup(dev);
	drm_vblank_cleanup(dev);
	drm_irq_uninstall(dev);

	dev->dev_private = NULL;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:16,代码来源:fsl_dcu_drm_drv.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ drm_kms_helper_poll_disable函数代码示例发布时间:2022-05-30
下一篇:
C++ drm_ioctl函数代码示例发布时间: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