From patchwork Wed Dec 14 12:58:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 13073071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33B5DC4332F for ; Wed, 14 Dec 2022 13:00:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A95310E3E6; Wed, 14 Dec 2022 13:00:09 +0000 (UTC) Received: from aposti.net (aposti.net [89.234.176.197]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFBE110E3DF for ; Wed, 14 Dec 2022 12:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1671022719; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K/tzTFKNZMMV1rVb1b3n0tYGGd7bT77iWuW0eM5CPb0=; b=CCR3JzkcrQ+B4tyoWwJL3L2TVfweylPk+HzdU2AjikcAi/uYXMI4ARgOFTeN/x+/dWqY9k izDSAMZnqNqvIKvlNoV5fEhv2aaKZqS7j4Xm79sZel9uJcrZjgvHi9U4O1jCEnOUs8DcGA JSqpM1oCWcQyajDG1YG+2XJMmAHRi+M= From: Paul Cercueil To: Phong LE , Neil Armstrong , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 07/10] drm: bridge: it66121: Don't clear DDC FIFO twice Date: Wed, 14 Dec 2022 13:58:18 +0100 Message-Id: <20221214125821.12489-8-paul@crapouillou.net> In-Reply-To: <20221214125821.12489-1-paul@crapouillou.net> References: <20221214125821.12489-1-paul@crapouillou.net> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Cercueil , devicetree@vger.kernel.org, list@opendingux.net, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The DDC FIFO was cleared before the loop in it66121_get_edid_block(), and at the beginning of each iteration; which means that it did not have to be cleared before the loop. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss --- drivers/gpu/drm/bridge/ite-it66121.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c index 06fa59ae5ffc..5335d4abd7c5 100644 --- a/drivers/gpu/drm/bridge/ite-it66121.c +++ b/drivers/gpu/drm/bridge/ite-it66121.c @@ -456,18 +456,6 @@ static inline int it66121_wait_ddc_ready(struct it66121_ctx *ctx) return 0; } -static int it66121_clear_ddc_fifo(struct it66121_ctx *ctx) -{ - int ret; - - ret = it66121_preamble_ddc(ctx); - if (ret) - return ret; - - return regmap_write(ctx->regmap, IT66121_DDC_COMMAND_REG, - IT66121_DDC_COMMAND_FIFO_CLR); -} - static int it66121_abort_ddc_ops(struct it66121_ctx *ctx) { int ret; @@ -515,10 +503,6 @@ static int it66121_get_edid_block(void *context, u8 *buf, offset = (block % 2) * len; block = block / 2; - ret = it66121_clear_ddc_fifo(ctx); - if (ret) - return ret; - while (remain > 0) { cnt = (remain > IT66121_EDID_FIFO_SIZE) ? IT66121_EDID_FIFO_SIZE : remain;