Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp461653yba; Wed, 15 May 2019 04:31:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6wWqGWMXIVEwpWwO/fsWIWxB9eKEthKOMJquEyTnTfjofgdj0mpPSUIklQ+fLPZkKQEYK X-Received: by 2002:a63:318b:: with SMTP id x133mr43975263pgx.297.1557919910947; Wed, 15 May 2019 04:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557919910; cv=none; d=google.com; s=arc-20160816; b=cGsoLUX2b01K/WgTo5tzk6nlijT/bqucGLWxycMUJd9b6XaC+txBqGWu+Rxa0qs6D5 Pktq6XG68+n8PRD1VjnHZ5l+fMcLc4mNAw1AQEA3pWdcgRGFBlMLeQpAPRg7W2ON8WDl TXE8zGX2knOMJWVR4KA/yrKaViioITjbjmRxM4ZBK+1C3Za6o8gZn990RzlCxPnAoVc9 CYRcFXgzip/28xydIlieph/g8sLnww8fvVSsezDFjDNwd1yh0czMVPeOp7q2LpjvVN9p cZ67ewFsV4mlHxQwwWsVHrmSkc47g+ZTTJnMf8gy3uARfSAoV4Fy7pHJ3xZrBTUuy5Cu ECng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3Q50gJfY153oc3ahQa1d1aNMgNWJ7kzqeE9DXvBO9+I=; b=t++birCqzYl1cZD99Ci6DCq+YtpL1ItrH1KDi6JC0PvfRD4Gq4EzukawvLp8shUPst DvLSRLvv6YIAS/KF380+PjpzS88aP8qjhV0Hm4F89samEWq4YSUFktqIbJ501gojyNnh Hio+RHYH3UlXeB/nuEeJNmsWVr0dUopMBWcEWymZOPX1kXUkjcGRDZhwUBNzBuUvO42j lJ1g744HxVDNuvqBAn95YeXSRqjU3Yj9ftL60Pq99tQQnW/m9gjk7mRB4m1t8F01gFF9 CednkMJozgLDzEzDhCITFX8pHabjONRwTKyR+dLRwjCxmkOVS3LHuFZqG0MVk7do8oS/ B1QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wrHVYYeo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si1527812pgs.364.2019.05.15.04.31.36; Wed, 15 May 2019 04:31:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wrHVYYeo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732431AbfEOL2n (ORCPT + 99 others); Wed, 15 May 2019 07:28:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:39806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732423AbfEOL2l (ORCPT ); Wed, 15 May 2019 07:28:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7AA5206BF; Wed, 15 May 2019 11:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919720; bh=yp94k15qVYX917pnAhp4n7gKvHuaedyl+IKE7TfqXws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wrHVYYeoUbxzh5qjZ4f7D8JfhG6cILh4DslRzfK4Z2+ii9pE+naYT7yTlNuJe16z1 mnPPsnjC5F7OlyZLWVxSvPUHyeLKNopM0dEhyQEqYmRl36Xl/HZf1p6ixV7KMAToGf qcRE9bNsq0PTIeXwIjEwwDjflCzRTvPZohY3SCqM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Leung , Jun Lei , Joshua Aberback , Leo Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.0 031/137] drm/amd/display: extending AUX SW Timeout Date: Wed, 15 May 2019 12:55:12 +0200 Message-Id: <20190515090655.568098205@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f4bbebf8e7eb4d294b040ab2d2ba71e70e69b930 ] [Why] AUX takes longer to reply when using active DP-DVI dongle on some asics resulting in up to 2000+ us edid read (timeout). [How] 1. Adjust AUX poll to match spec 2. Extend the SW timeout. This does not affect normal operation since we exit the loop as soon as AUX acks. Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Joshua Aberback Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 9 ++++++--- drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c index aaeb7faac0c43..e0fff5744b5f6 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c @@ -189,6 +189,12 @@ static void submit_channel_request( 1, 0); } + + REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1); + + REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0, + 10, aux110->timeout_period/10); + /* set the delay and the number of bytes to write */ /* The length include @@ -241,9 +247,6 @@ static void submit_channel_request( } } - REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1); - REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0, - 10, aux110->timeout_period/10); REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1); } diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h index f7caab85dc801..2c6f50b4245a4 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.h @@ -69,11 +69,11 @@ enum { /* This is the timeout as defined in DP 1.2a, * at most within ~240usec. That means, * increasing this timeout will not affect normal operation, * and we'll timeout after - * SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 1600usec. + * SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 2400usec. * This timeout is especially important for - * resume from S3 and CTS. + * converters, resume from S3, and CTS. */ - SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 4 + SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 6 }; struct aux_engine_dce110 { struct aux_engine base; -- 2.20.1