From patchwork Fri Mar 10 04:32:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9614735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5222960415 for ; Fri, 10 Mar 2017 04:45:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 414E828678 for ; Fri, 10 Mar 2017 04:45:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32F7E286EF; Fri, 10 Mar 2017 04:45:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E113628678 for ; Fri, 10 Mar 2017 04:45:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 578576ED87; Fri, 10 Mar 2017 04:44:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id B3F9B6ED83 for ; Fri, 10 Mar 2017 04:43:25 +0000 (UTC) Received: by mail-qk0-x22b.google.com with SMTP id y76so152297245qkb.0 for ; Thu, 09 Mar 2017 20:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lHUUmMA1edwsjA8wRVS4gO/8PED3p4N6/gkJhynmmtk=; b=X0X0vVf07y9OY4uKOSeJD5dqKvfaFXR1B13tcUbWw5hbyhsE15ONrJZvobaLto1K42 8dN8BHvpeD5iA5WEkxZCaahL58YIC3/0gtSWlQp/yvB/e0RwRRp+W7Ovn078kgo/ePD9 JmsUhmVd/BaIPD01+blRmF7zhZlg4A981SCzg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lHUUmMA1edwsjA8wRVS4gO/8PED3p4N6/gkJhynmmtk=; b=hM0i/JLL8QvAtW2e0IuSR3esMV4z/hIpsa8dBUiyiIXVadq3iY8+Z0zzfjDkqvIOgR ZnLauT3QKyNdApz7kMKrJTeZNmWl7CsDbrjDM7j1ZLTU5sch2p1w0w9GGuUxFfFU26VU tquK1Qdqulyu/p79/fzHDvm72dsnbp4zA2nZUi3S209gJN5NwqM5ZDWBmI+zsmN1vtPF PTnTANUKysrFbgIsulDh5C1KkFBrh9MYDqhVesIm/wrwbTrmof0CHZKjEqBNPddDVndt q7S7pYRWnUTbGF+YWkKXUGYauRb/wA4uav6upLbJ24rqUAnt8NhfuxYSfO5w96hLYfxC P+Og== X-Gm-Message-State: AMke39k9FM7dZih6r9AfLnBxaNQgr+kKeQUkQki2uBGRQ8+9Rpib5KzyK/aVe8jQURaVz9EQ X-Received: by 10.237.50.193 with SMTP id z59mr19453144qtd.237.1489121004309; Thu, 09 Mar 2017 20:43:24 -0800 (PST) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id n19sm5697731qtn.35.2017.03.09.20.43.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 20:43:23 -0800 (PST) From: Sean Paul To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 41/41] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip Date: Thu, 9 Mar 2017 23:32:56 -0500 Message-Id: <20170310043305.17216-42-seanpaul@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310043305.17216-1-seanpaul@chromium.org> References: <20170310043305.17216-1-seanpaul@chromium.org> MIME-Version: 1.0 Cc: =?UTF-8?q?=E5=BE=81=E5=A2=9E=20=E7=8E=8B?= , Lin Huang , Tomeu Vizoso , Douglas Anderson , Krzysztof Kozlowski , Yakir Yang , =?UTF-8?q?St=C3=A9phane=20Marchesin?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 29d130222636..57dd1991d7de 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c @@ -480,15 +480,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 */