Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932814AbcCKP6Z (ORCPT ); Fri, 11 Mar 2016 10:58:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39777 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932602AbcCKP6A (ORCPT ); Fri, 11 Mar 2016 10:58:00 -0500 From: Lyude To: intel-gfx@lists.freedesktop.org Cc: Lyude , stable@vger.kernel.org, Daniel Vetter , Jani Nikula , David Airlie , dri-devel@lists.freedesktop.org (open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...), linux-kernel@vger.kernel.org (open list)) Subject: [PATCH 2/2] drm/i915: Retry after 30ms if we fail to resume DP MST Date: Fri, 11 Mar 2016 10:57:02 -0500 Message-Id: <1457711822-20335-3-git-send-email-cpaul@redhat.com> In-Reply-To: <1457711822-20335-1-git-send-email-cpaul@redhat.com> References: <1457711822-20335-1-git-send-email-cpaul@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 38 For whatever reason, I've found that some laptops aren't immediately capable of doing aux transactions with their docks when they come out of standby. While I'm still not entirely sure what the cause of this is, sleeping for 30ms and then retrying drm_dp_mst_topology_mgr_resume() should be a sufficient enough workaround until we find a real fix. CC: stable@vger.kernel.org Signed-off-by: Lyude --- drivers/gpu/drm/i915/intel_dp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1d8de43..8cc5f6f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6114,6 +6114,19 @@ void intel_dp_mst_resume(struct drm_device *dev) ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr); if (ret != 0) { + /* + * For some reason, some laptops can't bring + * their MST docks back up immediately after + * resume and need to wait a short period of + * time before aux transactions with the dock + * become functional again. Until we find a + * proper fix for this, this workaround should + * suffice + */ + msleep(30); + ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr); + } + if (ret != 0) { intel_dp_check_mst_status(&intel_dig_port->dp); } } -- 2.5.0