Skip to content

Commit

Permalink
drm/atomic: log errors in drm_mode_atomic_ioctl()
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221019143736.267324-7-contact@emersion.fr
  • Loading branch information
Simon Ser committed Jun 23, 2023
1 parent 98f5185 commit 83115e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/drm_atomic_uapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,11 +1401,13 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,

obj = drm_mode_object_find(dev, file_priv, obj_id, DRM_MODE_OBJECT_ANY);
if (!obj) {
drm_dbg_atomic(dev, "cannot find object ID %d", obj_id);
ret = -ENOENT;
goto out;
}

if (!obj->properties) {
drm_dbg_atomic(dev, "[OBJECT:%d] has no properties", obj_id);
drm_mode_object_put(obj);
ret = -ENOENT;
goto out;
Expand All @@ -1432,6 +1434,9 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,

prop = drm_mode_obj_find_prop_id(obj, prop_id);
if (!prop) {
drm_dbg_atomic(dev,
"[OBJECT:%d] cannot find property ID %d",
obj_id, prop_id);
drm_mode_object_put(obj);
ret = -ENOENT;
goto out;
Expand Down

0 comments on commit 83115e1

Please sign in to comment.