]> git.baikalelectronics.ru Git - kernel.git/commit
drm: clarify usage of drm leases
authorDesmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Wed, 28 Jul 2021 10:27:39 +0000 (18:27 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 29 Jul 2021 07:12:01 +0000 (09:12 +0200)
commitb7cdc971eb1e8db352f74ac4b29709ded611be22
tree95ccc7c3a10688188584de4ff7c0562adeb9562d
parenta3d90c837000106563171c67030cfd66e0fb5119
drm: clarify usage of drm leases

We make the following changes to the documentation of drm leases to
make it easier to reason about their usage. In particular, we clarify
the lifetime and locking rules of lease fields in drm_master:

1. Make it clear that &drm_device.mode_config.idr_mutex protects the
lease idr and list structures for drm_master. The lessor field itself
doesn't need to be protected as it doesn't change after it's set in
drm_lease_create.

2. Add descriptions for the lifetime of lessors and leases.

3. Add an overview DOC: section in drm-uapi.rst that defines the
terminology for drm leasing, and explains how leases work and why
they're used.

Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210728102739.441543-1-desmondcheongzx@gmail.com
Documentation/gpu/drm-uapi.rst
drivers/gpu/drm/drm_lease.c
include/drm/drm_auth.h