* [PATCH 1/3] drm/atomic: Improve debug messages @ 2018-06-11 19:34 Ville Syrjala 2018-06-11 19:34 ` [PATCH 2/3] drm: Print bad user modes Ville Syrjala ` (4 more replies) 0 siblings, 5 replies; 11+ messages in thread From: Ville Syrjala @ 2018-06-11 19:34 UTC (permalink / raw) To: dri-devel; +Cc: intel-gfx From: Ville Syrjälä <ville.syrjala@linux.intel.com> Print the id/name of the object we're dealing with. Makes it easier to figure out what's going on. Also toss in a few extra debug prints that might be useful. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/drm_atomic.c | 88 ++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index ee4b43b9404e..d7de83a6c1c2 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -339,6 +339,7 @@ static s32 __user *get_out_fence_for_crtc(struct drm_atomic_state *state, int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state, const struct drm_display_mode *mode) { + struct drm_crtc *crtc = state->crtc; struct drm_mode_modeinfo umode; /* Early return for no change. */ @@ -359,13 +360,13 @@ int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state, drm_mode_copy(&state->mode, mode); state->enable = true; - DRM_DEBUG_ATOMIC("Set [MODE:%s] for CRTC state %p\n", - mode->name, state); + DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n", + mode->name, crtc->base.id, crtc->name, state); } else { memset(&state->mode, 0, sizeof(state->mode)); state->enable = false; - DRM_DEBUG_ATOMIC("Set [NOMODE] for CRTC state %p\n", - state); + DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n", + crtc->base.id, crtc->name, state); } return 0; @@ -388,6 +389,8 @@ EXPORT_SYMBOL(drm_atomic_set_mode_for_crtc); int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, struct drm_property_blob *blob) { + struct drm_crtc *crtc = state->crtc; + if (blob == state->mode_blob) return 0; @@ -404,12 +407,13 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, state->mode_blob = drm_property_blob_get(blob); state->enable = true; - DRM_DEBUG_ATOMIC("Set [MODE:%s] for CRTC state %p\n", - state->mode.name, state); + DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n", + state->mode.name, crtc->base.id, crtc->name, + state); } else { state->enable = false; - DRM_DEBUG_ATOMIC("Set [NOMODE] for CRTC state %p\n", - state); + DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n", + crtc->base.id, crtc->name, state); } return 0; @@ -539,10 +543,14 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, return -EFAULT; set_out_fence_for_crtc(state->state, crtc, fence_ptr); - } else if (crtc->funcs->atomic_set_property) + } else if (crtc->funcs->atomic_set_property) { return crtc->funcs->atomic_set_property(crtc, state, property, val); - else + } else { + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n", + crtc->base.id, crtc->name, + property->base.id, property->name); return -EINVAL; + } return 0; } @@ -799,8 +807,11 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, } else if (property == plane->alpha_property) { state->alpha = val; } else if (property == plane->rotation_property) { - if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) + if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) { + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n", + plane->base.id, plane->name, val); return -EINVAL; + } state->rotation = val; } else if (property == plane->zpos_property) { state->zpos = val; @@ -812,6 +823,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, return plane->funcs->atomic_set_property(plane, state, property, val); } else { + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n", + plane->base.id, plane->name, + property->base.id, property->name); return -EINVAL; } @@ -919,10 +933,12 @@ static int drm_atomic_plane_check(struct drm_plane *plane, /* either *both* CRTC and FB must be set, or neither */ if (state->crtc && !state->fb) { - DRM_DEBUG_ATOMIC("CRTC set but no FB\n"); + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] CRTC set but no FB\n", + plane->base.id, plane->name); return -EINVAL; } else if (state->fb && !state->crtc) { - DRM_DEBUG_ATOMIC("FB set but no CRTC\n"); + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] FB set but no CRTC\n", + plane->base.id, plane->name); return -EINVAL; } @@ -932,7 +948,9 @@ static int drm_atomic_plane_check(struct drm_plane *plane, /* Check whether this plane is usable on this CRTC */ if (!(plane->possible_crtcs & drm_crtc_mask(state->crtc))) { - DRM_DEBUG_ATOMIC("Invalid crtc for plane\n"); + DRM_DEBUG_ATOMIC("Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n", + state->crtc->base.id, state->crtc->name, + plane->base.id, plane->name); return -EINVAL; } @@ -941,7 +959,8 @@ static int drm_atomic_plane_check(struct drm_plane *plane, state->fb->modifier); if (ret) { struct drm_format_name_buf format_name; - DRM_DEBUG_ATOMIC("Invalid pixel format %s, modifier 0x%llx\n", + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid pixel format %s, modifier 0x%llx\n", + plane->base.id, plane->name, drm_get_format_name(state->fb->format->format, &format_name), state->fb->modifier); @@ -953,7 +972,8 @@ static int drm_atomic_plane_check(struct drm_plane *plane, state->crtc_x > INT_MAX - (int32_t) state->crtc_w || state->crtc_h > INT_MAX || state->crtc_y > INT_MAX - (int32_t) state->crtc_h) { - DRM_DEBUG_ATOMIC("Invalid CRTC coordinates %ux%u+%d+%d\n", + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n", + plane->base.id, plane->name, state->crtc_w, state->crtc_h, state->crtc_x, state->crtc_y); return -ERANGE; @@ -967,8 +987,9 @@ static int drm_atomic_plane_check(struct drm_plane *plane, state->src_x > fb_width - state->src_w || state->src_h > fb_height || state->src_y > fb_height - state->src_h) { - DRM_DEBUG_ATOMIC("Invalid source coordinates " + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid source coordinates " "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n", + plane->base.id, plane->name, state->src_w >> 16, ((state->src_w & 0xffff) * 15625) >> 10, state->src_h >> 16, ((state->src_h & 0xffff) * 15625) >> 10, state->src_x >> 16, ((state->src_x & 0xffff) * 15625) >> 10, @@ -1297,6 +1318,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, return connector->funcs->atomic_set_property(connector, state, property, val); } else { + DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n", + connector->base.id, connector->name, + property->base.id, property->name); return -EINVAL; } @@ -1465,11 +1489,12 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, } if (crtc) - DRM_DEBUG_ATOMIC("Link plane state %p to [CRTC:%d:%s]\n", - plane_state, crtc->base.id, crtc->name); + DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n", + plane->base.id, plane->name, plane_state, + crtc->base.id, crtc->name); else - DRM_DEBUG_ATOMIC("Link plane state %p to [NOCRTC]\n", - plane_state); + DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [NOCRTC]\n", + plane->base.id, plane->name, plane_state); return 0; } @@ -1489,12 +1514,15 @@ void drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state, struct drm_framebuffer *fb) { + struct drm_plane *plane = plane_state->plane; + if (fb) - DRM_DEBUG_ATOMIC("Set [FB:%d] for plane state %p\n", - fb->base.id, plane_state); - else - DRM_DEBUG_ATOMIC("Set [NOFB] for plane state %p\n", + DRM_DEBUG_ATOMIC("Set [FB:%d] for [PLANE:%d:%s] state %p\n", + fb->base.id, plane->base.id, plane->name, plane_state); + else + DRM_DEBUG_ATOMIC("Set [NOFB] for [PLANE:%d:%s] state %p\n", + plane->base.id, plane->name, plane_state); drm_framebuffer_assign(&plane_state->fb, fb); } @@ -1555,6 +1583,7 @@ int drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, struct drm_crtc *crtc) { + struct drm_connector *connector = conn_state->connector; struct drm_crtc_state *crtc_state; if (conn_state->crtc == crtc) @@ -1582,10 +1611,12 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, drm_connector_get(conn_state->connector); conn_state->crtc = crtc; - DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n", + DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n", + connector->base.id, connector->name, conn_state, crtc->base.id, crtc->name); } else { - DRM_DEBUG_ATOMIC("Link connector state %p to [NOCRTC]\n", + DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n", + connector->base.id, connector->name, conn_state); } @@ -1681,6 +1712,9 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); + DRM_DEBUG_ATOMIC("Adding all current planes for [CRTC:%d:%s] to %p\n", + crtc->base.id, crtc->name, state); + drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) { struct drm_plane_state *plane_state = drm_atomic_get_plane_state(state, plane); -- 2.16.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] drm: Print bad user modes 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala @ 2018-06-11 19:34 ` Ville Syrjala 2018-06-12 19:09 ` Harry Wentland 2018-06-11 19:34 ` [PATCH 3/3] drm/i915: Print prop name/id when rejecting it Ville Syrjala ` (3 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Ville Syrjala @ 2018-06-11 19:34 UTC (permalink / raw) To: dri-devel; +Cc: intel-gfx From: Ville Syrjälä <ville.syrjala@linux.intel.com> Print out the modeline when we reject a bad user mode. Avoids having to guess why it was rejected. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/drm_atomic.c | 20 +++++++++++++++++--- drivers/gpu/drm/drm_crtc.c | 4 +++- drivers/gpu/drm/drm_crtc_internal.h | 3 +++ drivers/gpu/drm/drm_modes.c | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index d7de83a6c1c2..5fe5e06062a9 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -400,10 +400,24 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, memset(&state->mode, 0, sizeof(state->mode)); if (blob) { - if (blob->length != sizeof(struct drm_mode_modeinfo) || - drm_mode_convert_umode(state->crtc->dev, &state->mode, - blob->data)) + int ret; + + if (blob->length != sizeof(struct drm_mode_modeinfo)) { + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] bad mode blob length: %zu\n", + crtc->base.id, crtc->name, + blob->length); + return -EINVAL; + } + + ret = drm_mode_convert_umode(crtc->dev, + &state->mode, blob->data); + if (ret) { + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n", + crtc->base.id, crtc->name, + ret, drm_get_mode_status_name(state->mode.status)); + drm_mode_debug_printmodeline(&state->mode); return -EINVAL; + } state->mode_blob = drm_property_blob_get(blob); state->enable = true; diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 53828fc8d911..163d82ac7d76 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -649,7 +649,9 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ret = drm_mode_convert_umode(dev, mode, &crtc_req->mode); if (ret) { - DRM_DEBUG_KMS("Invalid mode\n"); + DRM_DEBUG_KMS("Invalid mode (ret=%d, status=%s)\n", + ret, drm_get_mode_status_name(mode->status)); + drm_mode_debug_printmodeline(mode); goto out; } diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 5d307b23a4e6..34499800932a 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -56,6 +56,9 @@ int drm_mode_setcrtc(struct drm_device *dev, int drm_modeset_register_all(struct drm_device *dev); void drm_modeset_unregister_all(struct drm_device *dev); +/* drm_modes.c */ +const char *drm_get_mode_status_name(enum drm_mode_status status); + /* IOCTLs */ int drm_mode_getresources(struct drm_device *dev, void *data, struct drm_file *file_priv); diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index c78ca0e84ffd..7f552d5fa88e 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1257,7 +1257,7 @@ static const char * const drm_mode_status_names[] = { #undef MODE_STATUS -static const char *drm_get_mode_status_name(enum drm_mode_status status) +const char *drm_get_mode_status_name(enum drm_mode_status status) { int index = status + 3; -- 2.16.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] drm: Print bad user modes 2018-06-11 19:34 ` [PATCH 2/3] drm: Print bad user modes Ville Syrjala @ 2018-06-12 19:09 ` Harry Wentland 2018-06-15 20:32 ` Ville Syrjälä 0 siblings, 1 reply; 11+ messages in thread From: Harry Wentland @ 2018-06-12 19:09 UTC (permalink / raw) To: Ville Syrjala, dri-devel; +Cc: intel-gfx On 2018-06-11 03:34 PM, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Print out the modeline when we reject a bad user mode. Avoids having to > guess why it was rejected. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Harry > --- > drivers/gpu/drm/drm_atomic.c | 20 +++++++++++++++++--- > drivers/gpu/drm/drm_crtc.c | 4 +++- > drivers/gpu/drm/drm_crtc_internal.h | 3 +++ > drivers/gpu/drm/drm_modes.c | 2 +- > 4 files changed, 24 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index d7de83a6c1c2..5fe5e06062a9 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -400,10 +400,24 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, > memset(&state->mode, 0, sizeof(state->mode)); > > if (blob) { > - if (blob->length != sizeof(struct drm_mode_modeinfo) || > - drm_mode_convert_umode(state->crtc->dev, &state->mode, > - blob->data)) > + int ret; > + > + if (blob->length != sizeof(struct drm_mode_modeinfo)) { > + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] bad mode blob length: %zu\n", > + crtc->base.id, crtc->name, > + blob->length); > + return -EINVAL; > + } > + > + ret = drm_mode_convert_umode(crtc->dev, > + &state->mode, blob->data); > + if (ret) { > + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n", > + crtc->base.id, crtc->name, > + ret, drm_get_mode_status_name(state->mode.status)); > + drm_mode_debug_printmodeline(&state->mode); > return -EINVAL; > + } > > state->mode_blob = drm_property_blob_get(blob); > state->enable = true; > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 53828fc8d911..163d82ac7d76 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -649,7 +649,9 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, > > ret = drm_mode_convert_umode(dev, mode, &crtc_req->mode); > if (ret) { > - DRM_DEBUG_KMS("Invalid mode\n"); > + DRM_DEBUG_KMS("Invalid mode (ret=%d, status=%s)\n", > + ret, drm_get_mode_status_name(mode->status)); > + drm_mode_debug_printmodeline(mode); > goto out; > } > > diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h > index 5d307b23a4e6..34499800932a 100644 > --- a/drivers/gpu/drm/drm_crtc_internal.h > +++ b/drivers/gpu/drm/drm_crtc_internal.h > @@ -56,6 +56,9 @@ int drm_mode_setcrtc(struct drm_device *dev, > int drm_modeset_register_all(struct drm_device *dev); > void drm_modeset_unregister_all(struct drm_device *dev); > > +/* drm_modes.c */ > +const char *drm_get_mode_status_name(enum drm_mode_status status); > + > /* IOCTLs */ > int drm_mode_getresources(struct drm_device *dev, > void *data, struct drm_file *file_priv); > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c > index c78ca0e84ffd..7f552d5fa88e 100644 > --- a/drivers/gpu/drm/drm_modes.c > +++ b/drivers/gpu/drm/drm_modes.c > @@ -1257,7 +1257,7 @@ static const char * const drm_mode_status_names[] = { > > #undef MODE_STATUS > > -static const char *drm_get_mode_status_name(enum drm_mode_status status) > +const char *drm_get_mode_status_name(enum drm_mode_status status) > { > int index = status + 3; > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] drm: Print bad user modes 2018-06-12 19:09 ` Harry Wentland @ 2018-06-15 20:32 ` Ville Syrjälä 0 siblings, 0 replies; 11+ messages in thread From: Ville Syrjälä @ 2018-06-15 20:32 UTC (permalink / raw) To: Harry Wentland; +Cc: intel-gfx, dri-devel On Tue, Jun 12, 2018 at 03:09:36PM -0400, Harry Wentland wrote: > On 2018-06-11 03:34 PM, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Print out the modeline when we reject a bad user mode. Avoids having to > > guess why it was rejected. > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Reviewed-by: Harry Wentland <harry.wentland@amd.com> Thanks. 1-2 pushed to drm-misc-next. -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] drm/i915: Print prop name/id when rejecting it 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala 2018-06-11 19:34 ` [PATCH 2/3] drm: Print bad user modes Ville Syrjala @ 2018-06-11 19:34 ` Ville Syrjala 2018-06-18 8:53 ` Daniel Vetter 2018-06-11 20:00 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/atomic: Improve debug messages Patchwork ` (2 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Ville Syrjala @ 2018-06-11 19:34 UTC (permalink / raw) To: dri-devel; +Cc: intel-gfx From: Ville Syrjälä <ville.syrjala@linux.intel.com> Use the '[PROP:id:name]' format I introduced for the core in the driver debug messages as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/i915/intel_atomic.c | 6 ++++-- drivers/gpu/drm/i915/intel_atomic_plane.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index 61ddb5871d8a..b04952bacf77 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -59,7 +59,8 @@ int intel_digital_connector_atomic_get_property(struct drm_connector *connector, else if (property == dev_priv->broadcast_rgb_property) *val = intel_conn_state->broadcast_rgb; else { - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", + property->base.id, property->name); return -EINVAL; } @@ -95,7 +96,8 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, return 0; } - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", + property->base.id, property->name); return -EINVAL; } diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index e8bf4cc499e1..dcba645cabb8 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -265,7 +265,8 @@ intel_plane_atomic_get_property(struct drm_plane *plane, struct drm_property *property, uint64_t *val) { - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", + property->base.id, property->name); return -EINVAL; } @@ -287,6 +288,7 @@ intel_plane_atomic_set_property(struct drm_plane *plane, struct drm_property *property, uint64_t val) { - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", + property->base.id, property->name); return -EINVAL; } -- 2.16.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] drm/i915: Print prop name/id when rejecting it 2018-06-11 19:34 ` [PATCH 3/3] drm/i915: Print prop name/id when rejecting it Ville Syrjala @ 2018-06-18 8:53 ` Daniel Vetter 2018-06-18 12:03 ` Ville Syrjälä 0 siblings, 1 reply; 11+ messages in thread From: Daniel Vetter @ 2018-06-18 8:53 UTC (permalink / raw) To: Ville Syrjala; +Cc: intel-gfx, dri-devel On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Use the '[PROP:id:name]' format I introduced for the core in the driver > debug messages as well. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> I'm wondering whether there's not some kind of macro magic we could do, but unfortunately printf style stuff is really not composable :-/ And our stuff isn't important enough to warant new %p modes either ... -Daniel > --- > drivers/gpu/drm/i915/intel_atomic.c | 6 ++++-- > drivers/gpu/drm/i915/intel_atomic_plane.c | 6 ++++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c > index 61ddb5871d8a..b04952bacf77 100644 > --- a/drivers/gpu/drm/i915/intel_atomic.c > +++ b/drivers/gpu/drm/i915/intel_atomic.c > @@ -59,7 +59,8 @@ int intel_digital_connector_atomic_get_property(struct drm_connector *connector, > else if (property == dev_priv->broadcast_rgb_property) > *val = intel_conn_state->broadcast_rgb; > else { > - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); > + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > @@ -95,7 +96,8 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, > return 0; > } > > - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); > + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c > index e8bf4cc499e1..dcba645cabb8 100644 > --- a/drivers/gpu/drm/i915/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c > @@ -265,7 +265,8 @@ intel_plane_atomic_get_property(struct drm_plane *plane, > struct drm_property *property, > uint64_t *val) > { > - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); > + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > @@ -287,6 +288,7 @@ intel_plane_atomic_set_property(struct drm_plane *plane, > struct drm_property *property, > uint64_t val) > { > - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); > + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > -- > 2.16.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] drm/i915: Print prop name/id when rejecting it 2018-06-18 8:53 ` Daniel Vetter @ 2018-06-18 12:03 ` Ville Syrjälä 2018-06-18 16:04 ` [Intel-gfx] " Daniel Vetter 0 siblings, 1 reply; 11+ messages in thread From: Ville Syrjälä @ 2018-06-18 12:03 UTC (permalink / raw) To: Daniel Vetter; +Cc: intel-gfx, dri-devel On Mon, Jun 18, 2018 at 10:53:13AM +0200, Daniel Vetter wrote: > On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Use the '[PROP:id:name]' format I introduced for the core in the driver > > debug messages as well. > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > I'm wondering whether there's not some kind of macro magic we could do, > but unfortunately printf style stuff is really not composable :-/ And our > stuff isn't important enough to warant new %p modes either ... I should have DRM_PLANE_FMT, DRM_PLANE_ARGS(), etc. in some branch. Never posted that stuff because I wasn't entirely convinced it's all that useful. Opinions? -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH 3/3] drm/i915: Print prop name/id when rejecting it 2018-06-18 12:03 ` Ville Syrjälä @ 2018-06-18 16:04 ` Daniel Vetter 0 siblings, 0 replies; 11+ messages in thread From: Daniel Vetter @ 2018-06-18 16:04 UTC (permalink / raw) To: Ville Syrjälä; +Cc: intel-gfx, dri-devel On Mon, Jun 18, 2018 at 03:03:39PM +0300, Ville Syrjälä wrote: > On Mon, Jun 18, 2018 at 10:53:13AM +0200, Daniel Vetter wrote: > > On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > Use the '[PROP:id:name]' format I introduced for the core in the driver > > > debug messages as well. > > > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > > > I'm wondering whether there's not some kind of macro magic we could do, > > but unfortunately printf style stuff is really not composable :-/ And our > > stuff isn't important enough to warant new %p modes either ... > > I should have DRM_PLANE_FMT, DRM_PLANE_ARGS(), etc. in some branch. > Never posted that stuff because I wasn't entirely convinced it's > all that useful. Opinions? Yeah, not sure that's better either ... and doing a %s with a drm_format_$obj() gives us massive headaches with leaking strings everywhere :-) Maybe we should just have an $obj->debug_str field that we file out when creating the object? Also not awesome, but about the best I can come up with. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/3] drm/atomic: Improve debug messages 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala 2018-06-11 19:34 ` [PATCH 2/3] drm: Print bad user modes Ville Syrjala 2018-06-11 19:34 ` [PATCH 3/3] drm/i915: Print prop name/id when rejecting it Ville Syrjala @ 2018-06-11 20:00 ` Patchwork 2018-06-12 1:47 ` ✓ Fi.CI.IGT: " Patchwork 2018-06-12 19:09 ` [PATCH 1/3] " Harry Wentland 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2018-06-11 20:00 UTC (permalink / raw) To: Ville Syrjala; +Cc: intel-gfx == Series Details == Series: series starting with [1/3] drm/atomic: Improve debug messages URL : https://patchwork.freedesktop.org/series/44587/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4304 -> Patchwork_9263 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/44587/revisions/1/mbox/ == Known issues == Here are the changes found in Patchwork_9263 that come from known issues: === IGT changes === ==== Issues hit ==== igt@kms_busy@basic-flip-b: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106097) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: fi-skl-6260u: PASS -> INCOMPLETE (fdo#104108) ==== Possible fixes ==== igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS igt@kms_flip@basic-flip-vs-wf_vblank: fi-glk-j4005: FAIL (fdo#100368) -> PASS igt@kms_flip@basic-plain-flip: fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS +1 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 == Participating hosts (42 -> 38) == Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-skl-6700hq == Build changes == * Linux: CI_DRM_4304 -> Patchwork_9263 CI_DRM_4304: 2313a1dc588ef63d9650ccbaaf576bc4b47dc255 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9263: 234108a960ba24ed505e97d9ce8e5c8a45014a10 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 234108a960ba drm/i915: Print prop name/id when rejecting it 81b64fd2d013 drm: Print bad user modes ac0fc0c9fe79 drm/atomic: Improve debug messages == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9263/issues.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/3] drm/atomic: Improve debug messages 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala ` (2 preceding siblings ...) 2018-06-11 20:00 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/atomic: Improve debug messages Patchwork @ 2018-06-12 1:47 ` Patchwork 2018-06-12 19:09 ` [PATCH 1/3] " Harry Wentland 4 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2018-06-12 1:47 UTC (permalink / raw) To: Ville Syrjala; +Cc: intel-gfx == Series Details == Series: series starting with [1/3] drm/atomic: Improve debug messages URL : https://patchwork.freedesktop.org/series/44587/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4304_full -> Patchwork_9263_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9263_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9263_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9263_full: === IGT changes === ==== Warnings ==== igt@gem_exec_schedule@deep-bsd1: shard-kbl: SKIP -> PASS +1 igt@gem_tiled_blits@normal: shard-glk: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9263_full that come from known issues: === IGT changes === ==== Issues hit ==== igt@kms_atomic_transition@1x-modeset-transitions-nonblocking: shard-glk: PASS -> FAIL (fdo#105703) igt@kms_flip@2x-blocking-wf_vblank: shard-hsw: PASS -> FAIL (fdo#103928) igt@kms_flip@modeset-vs-vblank-race: shard-glk: PASS -> FAIL (fdo#103060) igt@kms_flip@plain-flip-fb-recreate-interruptible: shard-glk: PASS -> FAIL (fdo#100368) igt@kms_flip_tiling@flip-to-x-tiled: shard-glk: PASS -> FAIL (fdo#104724, fdo#103822) ==== Possible fixes ==== igt@drv_selftest@live_gtt: shard-kbl: FAIL (fdo#105347) -> PASS igt@drv_suspend@shrink: shard-hsw: INCOMPLETE (fdo#103540) -> PASS shard-glk: INCOMPLETE (fdo#103359, k.org#198133) -> PASS igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic: shard-glk: FAIL (fdo#105454, fdo#106509) -> PASS igt@kms_rotation_crc@sprite-rotation-180: shard-hsw: FAIL (fdo#104724, fdo#103925) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540 fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822 fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925 fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454 fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703 fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4304 -> Patchwork_9263 CI_DRM_4304: 2313a1dc588ef63d9650ccbaaf576bc4b47dc255 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9263: 234108a960ba24ed505e97d9ce8e5c8a45014a10 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9263/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] drm/atomic: Improve debug messages 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala ` (3 preceding siblings ...) 2018-06-12 1:47 ` ✓ Fi.CI.IGT: " Patchwork @ 2018-06-12 19:09 ` Harry Wentland 4 siblings, 0 replies; 11+ messages in thread From: Harry Wentland @ 2018-06-12 19:09 UTC (permalink / raw) To: Ville Syrjala, dri-devel; +Cc: intel-gfx On 2018-06-11 03:34 PM, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Print the id/name of the object we're dealing with. Makes it easier to > figure out what's going on. Also toss in a few extra debug prints that > might be useful. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Harry > --- > drivers/gpu/drm/drm_atomic.c | 88 ++++++++++++++++++++++++++++++-------------- > 1 file changed, 61 insertions(+), 27 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index ee4b43b9404e..d7de83a6c1c2 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -339,6 +339,7 @@ static s32 __user *get_out_fence_for_crtc(struct drm_atomic_state *state, > int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state, > const struct drm_display_mode *mode) > { > + struct drm_crtc *crtc = state->crtc; > struct drm_mode_modeinfo umode; > > /* Early return for no change. */ > @@ -359,13 +360,13 @@ int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state, > > drm_mode_copy(&state->mode, mode); > state->enable = true; > - DRM_DEBUG_ATOMIC("Set [MODE:%s] for CRTC state %p\n", > - mode->name, state); > + DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n", > + mode->name, crtc->base.id, crtc->name, state); > } else { > memset(&state->mode, 0, sizeof(state->mode)); > state->enable = false; > - DRM_DEBUG_ATOMIC("Set [NOMODE] for CRTC state %p\n", > - state); > + DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n", > + crtc->base.id, crtc->name, state); > } > > return 0; > @@ -388,6 +389,8 @@ EXPORT_SYMBOL(drm_atomic_set_mode_for_crtc); > int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, > struct drm_property_blob *blob) > { > + struct drm_crtc *crtc = state->crtc; > + > if (blob == state->mode_blob) > return 0; > > @@ -404,12 +407,13 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, > > state->mode_blob = drm_property_blob_get(blob); > state->enable = true; > - DRM_DEBUG_ATOMIC("Set [MODE:%s] for CRTC state %p\n", > - state->mode.name, state); > + DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n", > + state->mode.name, crtc->base.id, crtc->name, > + state); > } else { > state->enable = false; > - DRM_DEBUG_ATOMIC("Set [NOMODE] for CRTC state %p\n", > - state); > + DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n", > + crtc->base.id, crtc->name, state); > } > > return 0; > @@ -539,10 +543,14 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > return -EFAULT; > > set_out_fence_for_crtc(state->state, crtc, fence_ptr); > - } else if (crtc->funcs->atomic_set_property) > + } else if (crtc->funcs->atomic_set_property) { > return crtc->funcs->atomic_set_property(crtc, state, property, val); > - else > + } else { > + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n", > + crtc->base.id, crtc->name, > + property->base.id, property->name); > return -EINVAL; > + } > > return 0; > } > @@ -799,8 +807,11 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > } else if (property == plane->alpha_property) { > state->alpha = val; > } else if (property == plane->rotation_property) { > - if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) > + if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) { > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n", > + plane->base.id, plane->name, val); > return -EINVAL; > + } > state->rotation = val; > } else if (property == plane->zpos_property) { > state->zpos = val; > @@ -812,6 +823,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > return plane->funcs->atomic_set_property(plane, state, > property, val); > } else { > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n", > + plane->base.id, plane->name, > + property->base.id, property->name); > return -EINVAL; > } > > @@ -919,10 +933,12 @@ static int drm_atomic_plane_check(struct drm_plane *plane, > > /* either *both* CRTC and FB must be set, or neither */ > if (state->crtc && !state->fb) { > - DRM_DEBUG_ATOMIC("CRTC set but no FB\n"); > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] CRTC set but no FB\n", > + plane->base.id, plane->name); > return -EINVAL; > } else if (state->fb && !state->crtc) { > - DRM_DEBUG_ATOMIC("FB set but no CRTC\n"); > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] FB set but no CRTC\n", > + plane->base.id, plane->name); > return -EINVAL; > } > > @@ -932,7 +948,9 @@ static int drm_atomic_plane_check(struct drm_plane *plane, > > /* Check whether this plane is usable on this CRTC */ > if (!(plane->possible_crtcs & drm_crtc_mask(state->crtc))) { > - DRM_DEBUG_ATOMIC("Invalid crtc for plane\n"); > + DRM_DEBUG_ATOMIC("Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n", > + state->crtc->base.id, state->crtc->name, > + plane->base.id, plane->name); > return -EINVAL; > } > > @@ -941,7 +959,8 @@ static int drm_atomic_plane_check(struct drm_plane *plane, > state->fb->modifier); > if (ret) { > struct drm_format_name_buf format_name; > - DRM_DEBUG_ATOMIC("Invalid pixel format %s, modifier 0x%llx\n", > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid pixel format %s, modifier 0x%llx\n", > + plane->base.id, plane->name, > drm_get_format_name(state->fb->format->format, > &format_name), > state->fb->modifier); > @@ -953,7 +972,8 @@ static int drm_atomic_plane_check(struct drm_plane *plane, > state->crtc_x > INT_MAX - (int32_t) state->crtc_w || > state->crtc_h > INT_MAX || > state->crtc_y > INT_MAX - (int32_t) state->crtc_h) { > - DRM_DEBUG_ATOMIC("Invalid CRTC coordinates %ux%u+%d+%d\n", > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n", > + plane->base.id, plane->name, > state->crtc_w, state->crtc_h, > state->crtc_x, state->crtc_y); > return -ERANGE; > @@ -967,8 +987,9 @@ static int drm_atomic_plane_check(struct drm_plane *plane, > state->src_x > fb_width - state->src_w || > state->src_h > fb_height || > state->src_y > fb_height - state->src_h) { > - DRM_DEBUG_ATOMIC("Invalid source coordinates " > + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid source coordinates " > "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n", > + plane->base.id, plane->name, > state->src_w >> 16, ((state->src_w & 0xffff) * 15625) >> 10, > state->src_h >> 16, ((state->src_h & 0xffff) * 15625) >> 10, > state->src_x >> 16, ((state->src_x & 0xffff) * 15625) >> 10, > @@ -1297,6 +1318,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, > return connector->funcs->atomic_set_property(connector, > state, property, val); > } else { > + DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n", > + connector->base.id, connector->name, > + property->base.id, property->name); > return -EINVAL; > } > > @@ -1465,11 +1489,12 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, > } > > if (crtc) > - DRM_DEBUG_ATOMIC("Link plane state %p to [CRTC:%d:%s]\n", > - plane_state, crtc->base.id, crtc->name); > + DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n", > + plane->base.id, plane->name, plane_state, > + crtc->base.id, crtc->name); > else > - DRM_DEBUG_ATOMIC("Link plane state %p to [NOCRTC]\n", > - plane_state); > + DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [NOCRTC]\n", > + plane->base.id, plane->name, plane_state); > > return 0; > } > @@ -1489,12 +1514,15 @@ void > drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state, > struct drm_framebuffer *fb) > { > + struct drm_plane *plane = plane_state->plane; > + > if (fb) > - DRM_DEBUG_ATOMIC("Set [FB:%d] for plane state %p\n", > - fb->base.id, plane_state); > - else > - DRM_DEBUG_ATOMIC("Set [NOFB] for plane state %p\n", > + DRM_DEBUG_ATOMIC("Set [FB:%d] for [PLANE:%d:%s] state %p\n", > + fb->base.id, plane->base.id, plane->name, > plane_state); > + else > + DRM_DEBUG_ATOMIC("Set [NOFB] for [PLANE:%d:%s] state %p\n", > + plane->base.id, plane->name, plane_state); > > drm_framebuffer_assign(&plane_state->fb, fb); > } > @@ -1555,6 +1583,7 @@ int > drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, > struct drm_crtc *crtc) > { > + struct drm_connector *connector = conn_state->connector; > struct drm_crtc_state *crtc_state; > > if (conn_state->crtc == crtc) > @@ -1582,10 +1611,12 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, > drm_connector_get(conn_state->connector); > conn_state->crtc = crtc; > > - DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n", > + DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n", > + connector->base.id, connector->name, > conn_state, crtc->base.id, crtc->name); > } else { > - DRM_DEBUG_ATOMIC("Link connector state %p to [NOCRTC]\n", > + DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n", > + connector->base.id, connector->name, > conn_state); > } > > @@ -1681,6 +1712,9 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, > > WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); > > + DRM_DEBUG_ATOMIC("Adding all current planes for [CRTC:%d:%s] to %p\n", > + crtc->base.id, crtc->name, state); > + > drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) { > struct drm_plane_state *plane_state = > drm_atomic_get_plane_state(state, plane); > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-06-18 16:04 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-06-11 19:34 [PATCH 1/3] drm/atomic: Improve debug messages Ville Syrjala 2018-06-11 19:34 ` [PATCH 2/3] drm: Print bad user modes Ville Syrjala 2018-06-12 19:09 ` Harry Wentland 2018-06-15 20:32 ` Ville Syrjälä 2018-06-11 19:34 ` [PATCH 3/3] drm/i915: Print prop name/id when rejecting it Ville Syrjala 2018-06-18 8:53 ` Daniel Vetter 2018-06-18 12:03 ` Ville Syrjälä 2018-06-18 16:04 ` [Intel-gfx] " Daniel Vetter 2018-06-11 20:00 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/atomic: Improve debug messages Patchwork 2018-06-12 1:47 ` ✓ Fi.CI.IGT: " Patchwork 2018-06-12 19:09 ` [PATCH 1/3] " Harry Wentland
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.