---
name: "of_get_drm_display_mode"
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/of_get_drm_display_mode"
---

# of\_get\_drm\_display\_mode(9)

get a drm\_display\_mode from devicetree

## NAME

of\_get\_drm\_display\_mode - get a drm\_display\_mode from devicetree

## SYNOPSIS

**int of\_get\_drm\_display\_mode(struct device\_node \*** *np***, struct drm\_display\_mode \*** *dmode***, int** *index***);**

## ARGUMENTS

*np*

device\_node with the timing specification

*dmode*

will be set to the return value

*index*

index into the list of display timings in devicetree

## DESCRIPTION

This function is expensive and should only be used, if only one mode is to be read from DT. To get multiple modes start with of\_get\_display\_timings and work with that instead.

## RETURNS

0 on success, a negative errno code when no of videomode node was found.

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