Received: by 10.213.65.68 with SMTP id h4csp1737552imn; Thu, 5 Apr 2018 02:58:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48wzeat74bQYF1evk14dOis5npH490rPYG5dhPJgpLePBOyTBTJBaHJJjWOIibw3E/8iZ85 X-Received: by 2002:a17:902:8f8f:: with SMTP id z15-v6mr21836064plo.368.1522922336734; Thu, 05 Apr 2018 02:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922336; cv=none; d=google.com; s=arc-20160816; b=lpOty7ujZM29qAeT1079G2eFxnod/CKBIDmsK4ur6toNEiPrin/ByattDfbUjkVyIv QD1Jx84zEFSXF9q1jHZZ+qyPdUO2cJt+tVXFe840E85DYdqBHo7wRyXUhLk2twS3QyVc 4AYZ4ptk7nNSRSdVES6XNzBoVokL7jO3MShcADdB9wfJp4ICtBvl1qmcWYI2DSjQ5CXE 2mESZhLSTt6owujVnyH6AHA3zXeQf8tLChmH5DBA5fXFwZowKDfSLuk1tEzI6CcmWYP/ IVpqoYOX9XVullYh3xd6hX//tdMJG9W7s6jak0wYQ8MzFhDkAUdghsUOY+Anjj3Or8vD QQ/g== 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=CACQgxPCHwJGBX/NDyx/7u3NYGjuWS73uCJpfyC74jo=; b=IRKmO7XBZ5fMhOKaREF7ikLjIhvhDwZhWsHl+dusqMu6EucmRzHuFnfBl5MfhuqXfc SA1NFOKO332VWOB3s6+PKbxalYsaxZ3NB34S4cwVMyah0lSP9OhDg5s7RvXuql+tC7JD AaHEGitV1gZQn2Nn+T0EVTC9l3tBZhMEveJiMDkZ3/sq8dvuetBlvGfQMTobJKUiU6FH z3gIdkyupC0O53GrNytFowFBcFlQTbyve3+RGyu0bBNWv0ZoKh9xwGUElUQ3W4fkFjlH zhGCdGQfcelPHkJ2ON8mNuXlOkeOp0Oek+cLKF4SQSqpbfxmvTaErwb0heeLugFHvnrc 1mWQ== 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 31-v6si7742161plj.703.2018.04.05.02.58.42; Thu, 05 Apr 2018 02:58:56 -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; 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 S1752603AbeDEJ5l (ORCPT + 99 others); Thu, 5 Apr 2018 05:57:41 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60982 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbeDEJu6 (ORCPT ); Thu, 5 Apr 2018 05:50:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 7B2DC27A64E 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 v6 20/30] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip Date: Thu, 5 Apr 2018 11:49:50 +0200 Message-Id: <20180405095000.9756-21-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405095000.9756-1-enric.balletbo@collabora.com> References: <20180405095000.9756-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 Reviewed-by: Archit Taneja --- 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.3