[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMavQK+UYf8-Esah7kLcMbQtZ_J5h_bHqEroAPkO67fB=ArHyg@mail.gmail.com>
Date: Mon, 6 Apr 2020 15:43:06 -0400
From: Sean Paul <sean@...rly.run>
To: Lyude Paul <lyude@...hat.com>
Cc: dri-devel <dri-devel@...ts.freedesktop.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] drm/dp_mst: Print errors on ACT timeouts
On Fri, Apr 3, 2020 at 4:08 PM Lyude Paul <lyude@...hat.com> wrote:
>
> 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@...hat.com>
> Cc: Sean Paul <sean@...rly.run>
Reviewed-by: Sean Paul <sean@...rly.run>
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index f313407374ed..3d0d373f6f91 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -4494,6 +4494,10 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
> DP_PAYLOAD_TABLE_UPDATE_STATUS,
> &status);
> if (ret < 0) {
> + /*
> + * Failure here isn't unexpected - the hub may have
> + * just been unplugged
> + */
> DRM_DEBUG_KMS("failed to read payload table status %d\n",
> ret);
> return ret;
> @@ -4505,8 +4509,8 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
> } while (jiffies < timeout);
>
> if (!(status & DP_PAYLOAD_ACT_HANDLED)) {
> - DRM_DEBUG_KMS("failed to get ACT bit %d after %dms\n",
> - status, timeout_ms);
> + DRM_ERROR("Failed to get ACT after %dms, last status: %02x\n",
> + timeout_ms, status);
> return -EINVAL;
> }
> return 0;
> --
> 2.25.1
>
Powered by blists - more mailing lists