drm/dp_mst: Print errors on ACT timeouts
authorLyude Paul <lyude@redhat.com>
Fri, 3 Apr 2020 19:58:29 +0000 (15:58 -0400)
committerLyude Paul <lyude@redhat.com>
Thu, 9 Apr 2020 16:09:41 +0000 (12:09 -0400)
Although it's not unexpected for drm_dp_check_act_status() to fail due
to DPCD read failures (as the hub may have just been unplugged
suddenly), timeouts are a bit more worrying as they either mean we need
a longer timeout value, or we aren't setting up payload allocations
properly. So, let's start printing errors on timeouts.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Reviewed-by: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406221253.1307209-5-lyude@redhat.com
drivers/gpu/drm/drm_dp_mst_topology.c

index 8942ab9..6529b47 100644 (file)
@@ -4477,10 +4477,14 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
                                 status & DP_PAYLOAD_ACT_HANDLED || status < 0,
                                 200, timeout_ms * USEC_PER_MSEC);
        if (ret < 0 && status >= 0) {
-               DRM_DEBUG_KMS("Failed to get ACT after %dms, last status: %02x\n",
-                             timeout_ms, status);
+               DRM_ERROR("Failed to get ACT after %dms, last status: %02x\n",
+                         timeout_ms, status);
                return -EINVAL;
        } else if (status < 0) {
+               /*
+                * Failure here isn't unexpected - the hub may have
+                * just been unplugged
+                */
                DRM_DEBUG_KMS("Failed to read payload table status: %d\n",
                              status);
                return status;