Skip to content

Commit

Permalink
drm/atomic-helper: print message on driver connector check failure
Browse files Browse the repository at this point in the history
Sometimes drivers are missing logs when they return EINVAL.
Printing the failure here in common code can help understand where
EINVAL is coming from.

All other atomic_check() calls in this file already have similar
logging.

v2: add missing newlines

Signed-off-by: Simon Ser <[email protected]>
Cc: Daniel Vetter <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
emersion committed Sep 5, 2022
1 parent 981f092 commit 0aedc88
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/gpu/drm/drm_atomic_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,12 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,

if (funcs->atomic_check)
ret = funcs->atomic_check(connector, state);
if (ret)
if (ret) {
drm_dbg_atomic(dev,
"[CONNECTOR:%d:%s] driver check failed\n",
connector->base.id, connector->name);
return ret;
}

connectors_mask |= BIT(i);
}
Expand Down Expand Up @@ -745,8 +749,12 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,

if (funcs->atomic_check)
ret = funcs->atomic_check(connector, state);
if (ret)
if (ret) {
drm_dbg_atomic(dev,
"[CONNECTOR:%d:%s] driver check failed\n",
connector->base.id, connector->name);
return ret;
}
}

/*
Expand Down

0 comments on commit 0aedc88

Please sign in to comment.