---
name: "drm_vma_offset_lock_lookup"
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_vma_offset_lock_lookup"
---

# drm\_vma\_offset\_lock\_lookup(9)

Lock lookup for extended private use

## NAME

drm\_vma\_offset\_lock\_lookup - Lock lookup for extended private use

## SYNOPSIS

**void drm\_vma\_offset\_lock\_lookup(struct drm\_vma\_offset\_manager \*** *mgr***);**

## ARGUMENTS

*mgr*

Manager object

## DESCRIPTION

Lock VMA manager for extended lookups. Only \***\_locked** VMA function calls are allowed while holding this lock. All other contexts are blocked from VMA until the lock is released via **drm\_vma\_offset\_unlock\_lookup**.

Use this if you need to take a reference to the objects returned by **drm\_vma\_offset\_lookup\_locked** before releasing this lock again.

This lock must not be used for anything else than extended lookups. You must not call any other VMA helpers while holding this lock.

## NOTE

You're in atomic-context while holding this lock!

## EXAMPLE

```
     drm_vma_offset_lock_lookup(mgr);
     node = drm_vma_offset_lookup_locked(mgr);
     if (node)
         kref_get_unless_zero(container_of(node, sth, entr));
     drm_vma_offset_unlock_lookup(mgr);
```

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