---
name: "drm_modeset_lock"
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_modeset_lock"
---

# drm\_modeset\_lock(9)

take modeset lock

## NAME

drm\_modeset\_lock - take modeset lock

## SYNOPSIS

**int drm\_modeset\_lock(struct drm\_modeset\_lock \*** *lock***, struct drm\_modeset\_acquire\_ctx \*** *ctx***);**

## ARGUMENTS

*lock*

lock to take

*ctx*

acquire ctx

## DESCRIPTION

If ctx is not NULL, then its ww acquire context is used and the lock will be tracked by the context and can be released by calling **drm\_modeset\_drop\_locks**. If -EDEADLK is returned, this means a deadlock scenario has been detected and it is an error to attempt to take any more locks without first calling **drm\_modeset\_backoff**.

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