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


C++ drm_pci_init函数代码示例

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


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

示例1: i915_init

static int __init i915_init(void)
{
	if (!intel_agp_enabled) {
		DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
		return -ENODEV;
	}

	driver.num_ioctls = i915_max_ioctl;

#if defined(CONFIG_DRM_I915_KMS)
	if (i915_modeset != 0)
		driver.driver_features |= DRIVER_MODESET;
#endif
	if (i915_modeset == 1)
		driver.driver_features |= DRIVER_MODESET;

#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && i915_modeset == -1)
		driver.driver_features &= ~DRIVER_MODESET;
#endif

	if (!(driver.driver_features & DRIVER_MODESET))
		driver.get_vblank_timestamp = NULL;

	return drm_pci_init(&driver, &i915_pci_driver);
}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:26,代码来源:i915_drv.c

示例2: i915_init

static int __init i915_init(void)
{
	driver.num_ioctls = i915_max_ioctl;

	/*
	 * If CONFIG_DRM_I915_KMS is set, default to KMS unless
	 * explicitly disabled with the module pararmeter.
	 *
	 * Otherwise, just follow the parameter (defaulting to off).
	 *
	 * Allow optional vga_text_mode_force boot option to override
	 * the default behavior.
	 */
#if defined(CONFIG_DRM_I915_KMS)
	if (i915_modeset != 0)
		driver.driver_features |= DRIVER_MODESET;
#endif
	if (i915_modeset == 1)
		driver.driver_features |= DRIVER_MODESET;

#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && i915_modeset == -1)
		driver.driver_features &= ~DRIVER_MODESET;
#endif

	if (!(driver.driver_features & DRIVER_MODESET)) {
		driver.get_vblank_timestamp = NULL;
#ifndef CONFIG_DRM_I915_UMS
		/* Silently fail loading to not upset userspace. */
		return 0;
#endif
	}

	return drm_pci_init(&driver, &i915_pci_driver);
}
开发者ID:Truefans,项目名称:KVMGT-kernel,代码行数:35,代码来源:i915_drv.c

示例3: i915_init

static int __init i915_init(void)
{
	driver.num_ioctls = i915_max_ioctl;

	/*
	 * Enable KMS by default, unless explicitly overriden by
	 * either the i915.modeset prarameter or by the
	 * vga_text_mode_force boot option.
	 */

	if (i915.modeset == 0)
		driver.driver_features &= ~DRIVER_MODESET;

	if (vgacon_text_force() && i915.modeset == -1)
		driver.driver_features &= ~DRIVER_MODESET;

	if (!(driver.driver_features & DRIVER_MODESET)) {
		/* Silently fail loading to not upset userspace. */
		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
		return 0;
	}

	if (i915.nuclear_pageflip)
		driver.driver_features |= DRIVER_ATOMIC;

	return drm_pci_init(&driver, &i915_pci_driver);
}
开发者ID:unusual-thoughts,项目名称:linux-xps13,代码行数:27,代码来源:i915_drv.c

示例4: i915_init

static int __init i915_init(void)
{
	if (!intel_agp_enabled) {
		DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
		return -ENODEV;
	}

	driver.num_ioctls = i915_max_ioctl;

	/*
	 * If CONFIG_DRM_I915_KMS is set, default to KMS unless
	 * explicitly disabled with the module pararmeter.
	 *
	 * Otherwise, just follow the parameter (defaulting to off).
	 *
	 * Allow optional vga_text_mode_force boot option to override
	 * the default behavior.
	 */
#if defined(CONFIG_DRM_I915_KMS)
	if (i915_modeset != 0)
		driver.driver_features |= DRIVER_MODESET;
#endif
	if (i915_modeset == 1)
		driver.driver_features |= DRIVER_MODESET;

#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && i915_modeset == -1)
		driver.driver_features &= ~DRIVER_MODESET;
#endif

	if (!(driver.driver_features & DRIVER_MODESET))
		driver.get_vblank_timestamp = NULL;

	return drm_pci_init(&driver, &i915_pci_driver);
}
开发者ID:jebtang,项目名称:mortar,代码行数:35,代码来源:i915_drv.c

示例5: vmwgfx_init

static int __init vmwgfx_init(void)
{
    int ret;
    ret = drm_pci_init(&driver, &vmw_pci_driver);
    if (ret)
        DRM_ERROR("Failed initializing DRM.\n");
    return ret;
}
开发者ID:aejsmith,项目名称:linux,代码行数:8,代码来源:vmwgfx_drv.c

示例6: vboxvideo_init

static int __init vboxvideo_init(void)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && !defined(DRM_RHEL61)
    return drm_init(&driver);
#else
    return drm_pci_init(&driver, &pci_driver);
#endif
}
开发者ID:kaltsi,项目名称:virtualbox,代码行数:8,代码来源:vboxvideo_drm.c

示例7: i810_init

static int __init i810_init(void)
{
	if (num_possible_cpus() > 1) {
		pr_err("drm/i810 does not support SMP\n");
		return -EINVAL;
	}
	driver.num_ioctls = i810_max_ioctl;
	return drm_pci_init(&driver, &i810_pci_driver);
}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:9,代码来源:i810_drv.c

示例8: ast_init

static int __init ast_init(void)
{
	if (vgacon_text_force() && ast_modeset == -1)
		return -EINVAL;

	if (ast_modeset == 0)
		return -EINVAL;
	return drm_pci_init(&driver, &ast_pci_driver);
}
开发者ID:513855417,项目名称:linux,代码行数:9,代码来源:ast_drv.c

示例9: cirrus_init

static int __init cirrus_init(void)
{
	if (vgacon_text_force() && cirrus_modeset == -1)
		return -EINVAL;

	if (cirrus_modeset == 0)
		return -EINVAL;
	return drm_pci_init(&driver, &cirrus_pci_driver);
}
开发者ID:513855417,项目名称:linux,代码行数:9,代码来源:cirrus_drv.c

示例10: mgag200_init

static int __init mgag200_init(void)
{
	if (vgacon_text_force() && mgag200_modeset == -1)
		return -EINVAL;

	if (mgag200_modeset == 0)
		return -EINVAL;
	return drm_pci_init(&driver, &mgag200_pci_driver);
}
开发者ID:AK101111,项目名称:linux,代码行数:9,代码来源:mgag200_drv.c

示例11: nv_drm_init

int __init nv_drm_init(
    struct pci_driver *pci_driver
)
{
    int ret = 0;
#if defined(NV_DRM_AVAILABLE)
    ret = drm_pci_init(&nv_drm_driver, pci_driver);
#endif
    return ret;
}
开发者ID:osmc,项目名称:nv-legacy,代码行数:10,代码来源:nv-drm.c

示例12: vboxvideo_init

static int __init vboxvideo_init(void)
{
     printk(KERN_INFO "vboxvideo initializing\n");
    driver.num_ioctls = vboxvideo_max_ioctl;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
    return drm_init(&driver);
#else
    return drm_pci_init(&driver, &pci_driver);
#endif
}
开发者ID:apaka,项目名称:vbox,代码行数:10,代码来源:vboxvideo_drv.c

示例13: mgag200_init

static int __init mgag200_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && mgag200_modeset == -1)
		return -EINVAL;
#endif

	if (mgag200_modeset == 0)
		return -EINVAL;
	return drm_pci_init(&driver, &mgag200_pci_driver);
}
开发者ID:168519,项目名称:linux,代码行数:11,代码来源:mgag200_drv.c

示例14: vmwgfx_init

static int __init vmwgfx_init(void)
{
	int ret;

	if (vgacon_text_force())
		return -EINVAL;

	ret = drm_pci_init(&driver, &vmw_pci_driver);
	if (ret)
		DRM_ERROR("Failed initializing DRM.\n");
	return ret;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:12,代码来源:vmwgfx_drv.c

示例15: mgag200_init

static int __init mgag200_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && mgag200_modeset == -1)
		return -EINVAL;
#endif

	if (mgag200_modeset == 0)
		return -EINVAL;
	switch (mgag200_preferred_depth) {
	case 0: /* driver default */
	case 16:
	case 24:
		break;
	default:
		return -EINVAL;
	}
	return drm_pci_init(&driver, &mgag200_pci_driver);
}
开发者ID:spacex,项目名称:kernel-centos7,代码行数:19,代码来源:mgag200_drv.c


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