Example #1
0
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);
}
Example #2
0
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);
}
Example #3
0
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);
}
Example #4
0
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);
}
Example #5
0
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;
}
Example #6
0
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
}
Example #7
0
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);
}
Example #8
0
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);
}
Example #9
0
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);
}
Example #10
0
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);
}
Example #11
0
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;
}
Example #12
0
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
}
Example #13
0
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);
}
Example #14
0
static int __init PVRSRVDrmInit(void)
{
	int iRes;
	sPVRDrmDriver.num_ioctls = pvr_max_ioctl;

	PVRDPFInit();

	iRes = drm_pci_init(&sPVRDrmDriver, &pci_driver);

	return iRes;
}
Example #15
0
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;
}
Example #16
0
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);
}
Example #17
0
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);
}
Example #18
0
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;
}
Example #19
0
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);
}
Example #20
0
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;
}
Example #21
0
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);
}
Example #22
0
static int __init savage_init(void)
{
	driver.num_ioctls = savage_max_ioctl;
	return drm_pci_init(&driver, &savage_pci_driver);
}
Example #23
0
static int __init sis_init(void)
{
	driver.num_ioctls = sis_max_ioctl;
	return drm_pci_init(&driver, &sis_pci_driver);
}
Example #24
0
static int __init mga_init(void)
{
	driver.num_ioctls = mga_max_ioctl;
	return drm_pci_init(&driver, &mga_pci_driver);
}
Example #25
0
static int __init via_init(void)
{
	driver.num_ioctls = via_max_ioctl;
	via_init_command_verifier();
	return drm_pci_init(&driver, &via_pci_driver);
}
static int __init tdfx_init(void)
{
	return drm_pci_init(&driver, &tdfx_pci_driver);
}
Example #27
0
static int __init mach64_init(void)
{
	driver.num_ioctls = mach64_max_ioctl;
	return drm_pci_init(&driver, &mach64_pci_driver);
}
static int __init bochs_init(void)
{
	return drm_pci_init(&bochs_driver, &bochs_pci_driver);
}
Example #29
0
static int __init r128_init(void)
{
	driver.num_ioctls = r128_max_ioctl;

	return drm_pci_init(&driver, &r128_pci_driver);
}