From patchwork Wed Jun 12 08:32:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10991259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DB0814E5 for ; Thu, 13 Jun 2019 07:28:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BC73204C1 for ; Thu, 13 Jun 2019 07:28:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FC9128742; Thu, 13 Jun 2019 07:28:05 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 31920204C1 for ; Thu, 13 Jun 2019 07:28:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42214892D5; Thu, 13 Jun 2019 07:27:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F77E89468 for ; Wed, 12 Jun 2019 08:33:26 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id 83so8524774pgg.8 for ; Wed, 12 Jun 2019 01:33:26 -0700 (PDT) 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=ww6brkr59ulFad1KL7LWJRPTHM4vzJU/q/AyY2cW8Es=; b=qniLSZgDsqGE9/OlfcgHAUIikLxW0p0ixFyyM8pooYY5QtyJx48eEUPPBxhoumuAPo etiqSXsR8q55UbalFFPfiwsEzYXjhBxvqbFIj2Y7d4+YOkEyCnHOgz4aB+xLz1ifrExj xHHvJtGNYDVSOAGLAy4HCj/KqkSux7JQCYn4cI6UX/mYtqfPaFiuV5c1E/aHmUYt0Jyy kGZpZFlfgM2QIknz+N70dKkJTj63Ty1uhmTZF0D6wZn177CImEX+gHeDKCwT4wl0mZt8 vsW3nsBonzdG3Cyyo02cbJnPqLTfu6ajBNZUBtJtOqp0PjRym53264FtW6QT4ztkLSjD BAVw== X-Gm-Message-State: APjAAAXB4VKLO503IePVqtQVQHqa1TXL2zMXpaSWbvFZsxr6mxVLCeiw fJhjMPl/aM1508Rdxf7gr70aAbPkUbU= X-Google-Smtp-Source: APXvYqyxl34p06cYUEj4S/jd5SfPoeVgMlKjFMraSOKtxEop59Si1HJYqH2IDxpdPh58M5IZ3/z9iA== X-Received: by 2002:a17:90a:8a10:: with SMTP id w16mr31528113pjn.133.1560328405864; Wed, 12 Jun 2019 01:33:25 -0700 (PDT) Received: from localhost.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id d21sm18845991pfr.162.2019.06.12.01.33.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 01:33:25 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Subject: [PATCH v5 13/15] drm/bridge: tc358767: Simplify tc_aux_wait_busy() Date: Wed, 12 Jun 2019 01:32:50 -0700 Message-Id: <20190612083252.15321-14-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190612083252.15321-1-andrew.smirnov@gmail.com> References: <20190612083252.15321-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 13 Jun 2019 07:27:23 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ww6brkr59ulFad1KL7LWJRPTHM4vzJU/q/AyY2cW8Es=; b=nW+E4KDzpmgWAUJ0Tpc6bOnHwrdWhmDOOQ0VZRQktRWGal0aB80LNVmsUJ8rixGYBf J42Qgvq1YrTh+vt47FXanyjj4cREHnqIgyCLpDUKRJ6NsReiH/Dwio1JGu0ErqIicQLm EaThXafTHKYS1bqZlSqJCJRRJ66+p3xB9Z1kHHsf5WhUhkzMhzxmCiFrM/CX5jZiTmZT dUFUmQEm2akdXAArBrV8XCemHKKV37Vg25pMl1aI9Dx2fpTjdFtD0lTieSLCvLUSGZ1J 88EaQK0IKTCoOZ9dB+gsHEV8Nt38oBZRNek1VmLFL4KusxMcjUFGEPNdP+QFRd+F98cg Ledg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cory Tusar , Andrey Smirnov , Andrey Gusakov , linux-kernel@vger.kernel.org, Tomi Valkeinen , Laurent Pinchart , Chris Healy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We never pass anything but 100 as timeout_ms to tc_aux_wait_busy(), so we may as well hardcode that value and simplify function's signature. Signed-off-by: Andrey Smirnov Reviewed-by: Andrzej Hajda Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 28df53f7c349..01ca92a6d9c8 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -294,10 +294,9 @@ static inline int tc_poll_timeout(struct tc_data *tc, unsigned int addr, sleep_us, timeout_us); } -static int tc_aux_wait_busy(struct tc_data *tc, unsigned int timeout_ms) +static int tc_aux_wait_busy(struct tc_data *tc) { - return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, - 1000, 1000 * timeout_ms); + return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, 1000, 100000); } static int tc_aux_write_data(struct tc_data *tc, const void *data, @@ -350,7 +349,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, u32 auxstatus; int ret; - ret = tc_aux_wait_busy(tc, 100); + ret = tc_aux_wait_busy(tc); if (ret) return ret; @@ -377,7 +376,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, if (ret) return ret; - ret = tc_aux_wait_busy(tc, 100); + ret = tc_aux_wait_busy(tc); if (ret) return ret;