Received: by 10.223.185.111 with SMTP id b44csp821026wrg; Fri, 9 Mar 2018 14:30:57 -0800 (PST) X-Google-Smtp-Source: AG47ELsTWunEz7tkgQyEfvF9vG6avQTQrSQGPXRk9xVI9jg6KfcYFviTGQSgGxFxUUOJ66WoVvyZ X-Received: by 10.99.103.69 with SMTP id b66mr38856pgc.233.1520634657059; Fri, 09 Mar 2018 14:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634657; cv=none; d=google.com; s=arc-20160816; b=xBoC61DPoqly5CicoYF2Sod9vCzX/J7Sz53lT9cGebXZ3MFEuJ8wUXnChkyz9TI4pN vbGRqtfyp0mcRbE1Y3aTV7X3ISWf3ap48oRphvfvg4AXxQ9B2lw5Eb9CmcDIvtb3dJ15 +/o21JBr74kxPczQ0sGI34R4jwQ75xAYJRylDyVyRhZoZWOBiTPh+9KlY9iaO38sYaMz 0bMlvKOM+JpbEfAoUSovLlj+f+RdUXt63ACNMGoW7+pie7scjBr0HqRgjWcVa7h1qLGO +rxv/EybHyqfn6YvjfVmXqJkNiqY0J/Nq9LN5hiiZ+PuWuW3WaOzM+gFYjT5lz/+k0ma L53Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ngXH2OnZqGKmsFz0fCy5mlclWJ2i7WnAorMEEla0EcQ=; b=olvMO5kg97McpnCNBIfKPBUxznTAMI1vHbQkrz39XKCfa8pINHOf8zly3v/ego5iNU OTypqWmW6HE+OKXwKzb460C6k46+x0d0iC0cukohc1vk/iYOhlMuhYBoZM5CYwM3HKu3 S8SI/aIM7P05+hm1H400/4oSLcaYVgE1bQd0S28cz2at7HV20VF0fl6dIg+BlP9hHikq 67ILsDKCE/555Q5FKOVkQnPODNSgCLoEj19ivoRaCM5S4SrZgFKQpMI/OzCmeIUIyHlW QH8SXW+QQ/38tgfQ8j7O+wnfv68xEz6LOgsB1B2Sli+DHyrFs8biroTTNfjTJvI76LWw ixvQ== 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 p10si1341279pgr.426.2018.03.09.14.30.42; Fri, 09 Mar 2018 14:30:56 -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 S933237AbeCIW15 (ORCPT + 99 others); Fri, 9 Mar 2018 17:27:57 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42912 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933136AbeCIWYs (ORCPT ); Fri, 9 Mar 2018 17:24:48 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id EFCCE2792D7 From: Enric Balletbo i Serra To: architt@codeaurora.org, inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Enric Balletbo i Serra Subject: [PATCH v5 26/36] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip Date: Fri, 9 Mar 2018 23:23:17 +0100 Message-Id: <20180309222327.18689-27-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180309222327.18689-1-enric.balletbo@collabora.com> References: <20180309222327.18689-1-enric.balletbo@collabora.com> 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 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 Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski --- 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.16.1