Received: by 10.223.176.46 with SMTP id f43csp686082wra; Fri, 26 Jan 2018 05:23:06 -0800 (PST) X-Google-Smtp-Source: AH8x225ZfL/P6rcwXG6YIJpgA1TAJOhTWSCcWfGw+HUBUePeDqfjLMcbLn2GcTU47Jg1vs/GY98V X-Received: by 10.101.75.193 with SMTP id p1mr16294251pgr.63.1516972986602; Fri, 26 Jan 2018 05:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516972986; cv=none; d=google.com; s=arc-20160816; b=t5hhhA9LINKIeQIRviRa/+mltWFpGUPy7bfIgBaGagF7gKc95q9NXC4LTpQ6xLdTOE tw6SxzmFfqmZ58WH4PSlvqMMUHXAtyP2TEEHSR77efFvoEXT1nhDoNGkqqZEzvDpb8nm SX4Ic/V1M6gMnRm8695cjpA+LQgW4p/QS53+SVPvvDAztg83mHxw7u+RWI6tNL6+se8E bjCrbEvxn3Ix9kvXh5QR2TShZJtls5ZDjYC6mW1Wi0iiQhPifKyyh81G4vV2Pw/HojPu Bxu9HysVVzeaCqzDCE4DPs99DmOVgEJ+qDQmaR2x9js1vchKrvO8Zwj6NVedGpp+Z1jB 8Oog== 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 :content-transfert-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=GGSLcqIWwwAqCNXel09rykVkbgJfKzhtrglLHEVI0jc=; b=ciuYScK+Tjlej7MILQ4s54kwudlwHGpJDeFWFdlbHbRG2Bjz06LNkwLnygrc7Nly7p mko5PhrUPmi6HgCxEicSDZ/WL9nJNQVEI5M4OP2txQia6cs6cGyB5AjGZi3AFfRBwnNY 1jIM/o/bJBE7ocMM/5wyBqBQFcXFftgAk+7XiY5g+ofr9m8yzgpb1nlLyFzs9OxwPNI8 O0vpmtig7KFnZ9LxewWGL5PDL96ov3goZTbJrosNfdXU/EuVkL68EoH8uw14P/ZXzsHk 4g2szcW4V1JRIiyafVSd0BvLzMNXGo6k7a+Xc9XKHNpYhqsYfk+RfBwteFchEpwy9DsB XQQQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h80si6350146pfj.207.2018.01.26.05.22.52; Fri, 26 Jan 2018 05:23:06 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752695AbeAZNUe (ORCPT + 99 others); Fri, 26 Jan 2018 08:20:34 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34840 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbeAZNSB (ORCPT ); Fri, 26 Jan 2018 08:18:01 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:8a7e:4790:a8d7:ca4:7b4f:7f87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tescande) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id CE33B274ECF; Fri, 26 Jan 2018 13:17:59 +0000 (GMT) From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa Cc: Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , Zain Wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 32/43] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip Date: Fri, 26 Jan 2018 14:16:59 +0100 Message-Id: <20180126131710.7622-33-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180126131710.7622-1-thierry.escande@collabora.com> References: <20180126131710.7622-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Douglas Anderson The comments in analogix_dp_init_aux() claim that we're disabling aux channel retries, but then right below it for Rockchip it sets them to 3. If we actually need 3 retries for Rockchip then we could adjust the comment, but it seems more likely that we want the same retry behavior across all platforms. Cc: Stéphane Marchesin Cc: 征增 王 Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Signed-off-by: Thierry Escande --- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c index 58e8a28e99aa..a5f2763d72e4 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c @@ -481,15 +481,16 @@ void analogix_dp_init_aux(struct analogix_dp_device *dp) analogix_dp_reset_aux(dp); - /* Disable AUX transaction H/W retry */ + /* AUX_BIT_PERIOD_EXPECTED_DELAY doesn't apply to Rockchip IP */ if (dp->plat_data && is_rockchip(dp->plat_data->dev_type)) - reg = AUX_BIT_PERIOD_EXPECTED_DELAY(0) | - AUX_HW_RETRY_COUNT_SEL(3) | - AUX_HW_RETRY_INTERVAL_600_MICROSECONDS; + reg = 0; else - reg = AUX_BIT_PERIOD_EXPECTED_DELAY(3) | - AUX_HW_RETRY_COUNT_SEL(0) | - AUX_HW_RETRY_INTERVAL_600_MICROSECONDS; + reg = AUX_BIT_PERIOD_EXPECTED_DELAY(3); + + /* Disable AUX transaction H/W retry */ + reg |= AUX_HW_RETRY_COUNT_SEL(0) | + AUX_HW_RETRY_INTERVAL_600_MICROSECONDS; + writel(reg, dp->reg_base + ANALOGIX_DP_AUX_HW_RETRY_CTL); /* Receive AUX Channel DEFER commands equal to DEFFER_COUNT*64 */ -- 2.14.1