---
name: "drm_property_create_enum"
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_property_create_enum"
---

# drm\_property\_create\_enum(9)

create a new enumeration property type

## NAME

drm\_property\_create\_enum - create a new enumeration property type

## SYNOPSIS

**struct drm\_property \* drm\_property\_create\_enum(struct drm\_device \*** *dev***, int** *flags***, const char \*** *name***, const struct drm\_prop\_enum\_list \*** *props***, int** *num\_values***);**

## ARGUMENTS

*dev*

drm device

*flags*

flags specifying the property type

*name*

name of the property

*props*

enumeration lists with property values

*num\_values*

number of pre-defined values

## DESCRIPTION

This creates a new generic drm property which can then be attached to a drm object with drm\_object\_attach\_property. The returned property object must be freed with drm\_property\_destroy.

Userspace is only allowed to set one of the predefined values for enumeration properties.

## RETURNS

A pointer to the newly created property on success, NULL on failure.

## 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
