[Intel-gfx] [PATCH 3/3] drm/atomic-helper: Improve drm_atomic_helper_check_plane_state() debugs
Ville Syrjala
ville.syrjala at linux.intel.com
Thu Sep 19 14:19:04 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Dump out the plane/crtc id/name in the failure debug messages.
Makes a bit easier to figure out which plane exactly has failed
when you have tons of them.
Cc: Sean Paul <sean at poorly.run>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 9de39da54c48..86a2839dbfdd 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -761,6 +761,7 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
bool can_update_disabled)
{
struct drm_plane *plane = plane_state->plane;
+ struct drm_crtc *crtc = crtc_state->crtc;
struct drm_framebuffer *fb = plane_state->fb;
struct drm_rect *src = &plane_state->src;
struct drm_rect *dst = &plane_state->dst;
@@ -785,7 +786,9 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
}
if (!crtc_state->enable && !can_update_disabled) {
- DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n");
+ DRM_DEBUG_KMS("Cannot update [PLANE:%d:%s] of disabled [CRTC:%d:%s].\n",
+ plane->base.id, plane->name,
+ crtc->base.id, crtc->name);
return -EINVAL;
}
@@ -831,7 +834,9 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
return 0;
if (!can_position && !drm_rect_equals(dst, &clip)) {
- DRM_DEBUG_KMS("Plane must cover entire CRTC\n");
+ DRM_DEBUG_KMS("[PLANE:%d:%s] must cover entire [CRTC:%d:%s]\n",
+ plane->base.id, plane->name,
+ crtc->base.id, crtc->name);
drm_rect_debug_print("dst: ", dst, false);
drm_rect_debug_print("clip: ", &clip, false);
return -EINVAL;
--
2.21.0
More information about the Intel-gfx
mailing list