---
name: "drm_framebuffer_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_framebuffer_init"
---

# drm\_framebuffer\_init(9)

initialize a framebuffer

## NAME

drm\_framebuffer\_init - initialize a framebuffer

## SYNOPSIS

**int drm\_framebuffer\_init(struct drm\_device \*** *dev***, struct drm\_framebuffer \*** *fb***, const struct drm\_framebuffer\_funcs \*** *funcs***);**

## ARGUMENTS

*dev*

DRM device

*fb*

framebuffer to be initialized

*funcs*

... with these functions

## DESCRIPTION

Allocates an ID for the framebuffer's parent mode object, sets its mode functions & device file and adds it to the master fd list.

## IMPORTANT

This functions publishes the fb and makes it available for concurrent access by other users. Which means by this point the fb \_must\_ be fully set up - since all the fb attributes are invariant over its lifetime, no further locking but only correct reference counting is required.

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