---
name: "drm_mm_for_each_hole"
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_mm_for_each_hole"
---

# drm\_mm\_for\_each\_hole(9)

iterator to walk over all holes

## NAME

drm\_mm\_for\_each\_hole - iterator to walk over all holes

## SYNOPSIS

**drm\_mm\_for\_each\_hole(***entry***,** *mm***,** *hole\_start***,** *hole\_end***);**

## ARGUMENTS

*entry*

drm\_mm\_node used internally to track progress

*mm*

drm\_mm allocator to walk

*hole\_start*

ulong variable to assign the hole start to on each iteration

*hole\_end*

ulong variable to assign the hole end to on each iteration

## DESCRIPTION

This iterator walks over all holes in the range allocator. It is implemented with list\_for\_each, so not save against removal of elements. *entry* is used internally and will not reflect a real drm\_mm\_node for the very first hole. Hence users of this iterator may not access it.

## IMPLEMENTATION NOTE

We need to inline list\_for\_each\_entry in order to be able to set hole\_start and hole\_end on each iteration while keeping the macro sane.

The \_\_drm\_mm\_for\_each\_hole version is similar, but with added support for going backwards.

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