---
name: "drm_framebuffer_remove"
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_remove"
---

# drm\_framebuffer\_remove(9)

remove and unreference a framebuffer object

## NAME

drm\_framebuffer\_remove - remove and unreference a framebuffer object

## SYNOPSIS

**void drm\_framebuffer\_remove(struct drm\_framebuffer \*** *fb***);**

## ARGUMENTS

*fb*

framebuffer to remove

## DESCRIPTION

Scans all the CRTCs and planes in *dev*'s mode\_config. If they're using *fb*, removes it, setting it to NULL. Then drops the reference to the passed-in framebuffer. Might take the modeset locks.

Note that this function optimizes the cleanup away if the caller holds the last reference to the framebuffer. It is also guaranteed to not take the modeset locks in this case.

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