---
name: "drm_encoder_init"
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_encoder_init"
---

# drm\_encoder\_init(9)

Init a preallocated encoder

## NAME

drm\_encoder\_init - Init a preallocated encoder

## SYNOPSIS

**int drm\_encoder\_init(struct drm\_device \*** *dev***, struct drm\_encoder \*** *encoder***, const struct drm\_encoder\_funcs \*** *funcs***, int** *encoder\_type***);**

## ARGUMENTS

*dev*

drm device

*encoder*

the encoder to init

*funcs*

callbacks for this encoder

*encoder\_type*

user visible type of the encoder

## DESCRIPTION

Initialises a preallocated encoder. Encoder should be subclassed as part of driver encoder objects.

## RETURNS

Zero on success, error code 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
