---
name: "drm_framebuffer_cleanup"
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_cleanup"
---

# drm\_framebuffer\_cleanup(9)

remove a framebuffer object

## NAME

drm\_framebuffer\_cleanup - remove a framebuffer object

## SYNOPSIS

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

## ARGUMENTS

*fb*

framebuffer to remove

## DESCRIPTION

Cleanup framebuffer. This function is intended to be used from the drivers -\>destroy callback. It can also be used to clean up driver private framebuffers embedded into a larger structure.

Note that this function does not remove the fb from active usuage - if it is still used anywhere, hilarity can ensue since userspace could call getfb on the id and get back -EINVAL. Obviously no concern at driver unload time.

Also, the framebuffer will not be removed from the lookup idr - for user-created framebuffers this will happen in in the rmfb ioctl. For driver-private objects (e.g. for fbdev) drivers need to explicitly call drm\_framebuffer\_unregister\_private.

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