drm_dev_alloc(9) Allocate new DRM device

SYNOPSIS

struct drm_device * drm_dev_alloc(struct drm_driver * driver, struct device * parent);

ARGUMENTS

driver

DRM driver to allocate device for

parent

Parent device object

DESCRIPTION

Allocate and initialize a new DRM device. No device registration is done. Call drm_dev_register to advertice the device to user space and register it with other core subsystems. This should be done last in the device initialization sequence to make sure userspace can't access an inconsistent state.

The initial ref-count of the object is 1. Use drm_dev_ref and drm_dev_unref to take and drop further ref-counts.

Note that for purely virtual devices parent can be NULL.

RETURNS

Pointer to new DRM device, or NULL if out of memory.

AUTHORS

Jesse Barnes <[email protected]>
Intel Corporation,         
        

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,         
        

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,         
        

Contributions all over the place

Lukas Wunner <[email protected]>

vga_switcheroo documentation

COPYRIGHT