---
name: "drm_mode_duplicate"
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_mode_duplicate"
---

# drm\_mode\_duplicate(9)

allocate and duplicate an existing mode

## NAME

drm\_mode\_duplicate - allocate and duplicate an existing mode

## SYNOPSIS

**struct drm\_display\_mode \* drm\_mode\_duplicate(struct drm\_device \*** *dev***, const struct drm\_display\_mode \*** *mode***);**

## ARGUMENTS

*dev*

drm\_device to allocate the duplicated mode for

*mode*

mode to duplicate

## DESCRIPTION

Just allocate a new mode, copy the existing mode into it, and return a pointer to it. Used to create new instances of established modes.

## RETURNS

Pointer to duplicated mode on success, NULL on error.

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