---
name: "drm_dev_alloc"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drm_dev_alloc"
---

# drm\_dev\_alloc(9)

Allocate new DRM device

## NAME

drm\_dev\_alloc - 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.

The initial ref-count of the object is 1. Use **drm\_dev\_ref** and **drm\_dev\_unref** to take and drop further ref-counts.

## RETURNS

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

## AUTHORS

**Jesse Barnes** \<jesse.barnes@intel.com\>\
 Intel Corporation,

Initial version

**Laurent Pinchart** \<laurent.pinchart@ideasonboard.com\>\
 Ideas on board SPRL,

Driver internals

**Daniel Vetter** \<daniel.vetter@ffwll.ch\>\
 Intel Corporation,

Contributions all over the place

## COPYRIGHT
