本文整理汇总了C++中drm_pci_init函数的典型用法代码示例。如果您正苦于以下问题:C++ drm_pci_init函数的具体用法?C++ drm_pci_init怎么用?C++ drm_pci_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了drm_pci_init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: vbox_init
static int __init vbox_init(void)
{
unsigned i;
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force() && vbox_modeset == -1)
return -EINVAL;
#endif
if (vbox_modeset == 0)
return -EINVAL;
/* Do not load if any of the virtual consoles is in graphics mode to be
* sure that we do not pick a fight with a user-mode driver or VESA. */
for (i = 0; i < MAX_NR_CONSOLES - 1; ++i)
if (vc_cons[i].d && vc_cons[i].d->vc_mode == KD_GRAPHICS)
return -EINVAL;
return drm_pci_init(&driver, &vbox_pci_driver);
}
开发者ID:tonado,项目名称:vbox,代码行数:20,代码来源:vbox_drv.c
示例17: viadrm_init
static int
viadrm_init(void)
{
extern int drm_guarantee_initialized(void);
int error;
via_init_command_verifier(); /* idempotent, no unwind needed */
error = drm_guarantee_initialized();
if (error)
return error;
error = drm_pci_init(via_drm_driver, NULL);
if (error) {
aprint_error("i915drmkms: failed to init pci: %d\n",
error);
return error;
}
return 0;
}
开发者ID:marklee77,项目名称:frankenlibc,代码行数:21,代码来源:via_module.c
示例18: radeon_init
static int __init radeon_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force() && radeon_modeset == -1) {
DRM_INFO("VGACON disable radeon kernel modesetting.\n");
radeon_modeset = 0;
}
#endif
/* set to modesetting by default if not nomodeset */
if (radeon_modeset == -1)
radeon_modeset = 1;
if (radeon_modeset == 1) {
DRM_INFO("radeon kernel modesetting enabled.\n");
driver = &kms_driver;
pdriver = &radeon_kms_pci_driver;
driver->driver_features |= DRIVER_MODESET;
driver->num_ioctls = radeon_max_kms_ioctl;
radeon_register_atpx_handler();
} else {
#ifdef CPTCFG_DRM_RADEON_UMS
DRM_INFO("radeon userspace modesetting enabled.\n");
driver = &driver_old;
pdriver = &radeon_pci_driver;
driver->driver_features &= ~DRIVER_MODESET;
driver->num_ioctls = radeon_max_ioctl;
#else
DRM_ERROR("No UMS support in radeon module!\n");
return -EINVAL;
#endif
}
/* let modprobe override vga console setting */
return drm_pci_init(driver, pdriver);
}
开发者ID:Kratos1982,项目名称:UbuntuTouch,代码行数:36,代码来源:radeon_drv.c
示例19: i915drmkms_init
static int
i915drmkms_init(void)
{
extern int drm_guarantee_initialized(void);
int error;
error = drm_guarantee_initialized();
if (error)
return error;
i915_drm_driver->num_ioctls = i915_max_ioctl;
i915_drm_driver->driver_features |= DRIVER_MODESET;
i915_drm_driver->driver_features &= ~DRIVER_USE_AGP;
error = drm_pci_init(i915_drm_driver, NULL);
if (error) {
aprint_error("i915drmkms: failed to init pci: %d\n",
error);
return error;
}
drm_sysctl_init(&i915_def);
return 0;
}
开发者ID:ryo,项目名称:netbsd-src,代码行数:24,代码来源:i915_module.c
示例20: radeon_init
static int __init radeon_init(void)
{
driver = &driver_old;
pdriver = &radeon_pci_driver;
driver->num_ioctls = radeon_max_ioctl;
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force() && radeon_modeset == -1) {
DRM_INFO("VGACON disable radeon kernel modesetting.\n");
driver = &driver_old;
pdriver = &radeon_pci_driver;
driver->driver_features &= ~DRIVER_MODESET;
radeon_modeset = 0;
}
#endif
/* if enabled by default */
if (radeon_modeset == -1) {
#ifdef CONFIG_DRM_RADEON_KMS
DRM_INFO("radeon defaulting to kernel modesetting.\n");
radeon_modeset = 1;
#else
DRM_INFO("radeon defaulting to userspace modesetting.\n");
radeon_modeset = 0;
#endif
}
if (radeon_modeset == 1) {
DRM_INFO("radeon kernel modesetting enabled.\n");
driver = &kms_driver;
pdriver = &radeon_kms_pci_driver;
driver->driver_features |= DRIVER_MODESET;
driver->num_ioctls = radeon_max_kms_ioctl;
radeon_register_atpx_handler();
}
/* if the vga console setting is enabled still
* let modprobe override it */
return drm_pci_init(driver, pdriver);
}
开发者ID:AsherBond,项目名称:ceph-client,代码行数:36,代码来源:radeon_drv.c
注:本文中的drm_pci_init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论