Skip to content

Commit

Permalink
drm/kms: log when querying an object not included in lease
Browse files Browse the repository at this point in the history
User-space may query an existing object not included in a lease.
Make it easier to debug such situations by logging a debug message.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230623143514.38707-1-contact@emersion.fr
  • Loading branch information
Simon Ser committed Jun 23, 2023
1 parent 83115e1 commit 76afcf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/drm_mode_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
obj = NULL;

if (obj && drm_mode_object_lease_required(obj->type) &&
!_drm_lease_held(file_priv, obj->id))
!_drm_lease_held(file_priv, obj->id)) {
drm_dbg_kms(dev, "[OBJECT:%d] not included in lease", id);
obj = NULL;
}

if (obj && obj->free_cb) {
if (!kref_get_unless_zero(&obj->refcount))
Expand Down

0 comments on commit 76afcf5

Please sign in to comment.