From patchwork Tue May 30 08:43:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 13259509 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CB544C77B73 for ; Tue, 30 May 2023 08:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1MqAsk0uUvJhS3e0CkYm95lO1uG2jFCLE+BOdX7IciE=; b=IW7BWXItCS25Iu RA5Xrq/8DaP7RGmcOZ/5MZkzy8TdGoa4DLGAAw2fFVbNum9cYFxgHghoMn4tH/K1aY8N8RjdAk5pe gw0xtGuNFol1u8esAVm2/Pks05dtdcKlcQPgevrciaNKPJtyKTJ6psp94VePNw1AF2pJbPbGLQaNT jnTrXOAmEVjZg2PSfxdSaSWgyVZ0FWFISWTu7VOoA/h0u6FFgPrzcG76RLGKSgZcXyN+0m4Yk8RvZ n3XMebqGa/Q+EET+CJyTZcyOkyIf4fXOxwFXq/lmNPYdyeDQ1I96suzxTT7YXSt7LFmfYjs9WuNIS scBzj82ezJGg9wtguCyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q3v2F-00D1Dy-1V; Tue, 30 May 2023 08:48:55 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q3v2C-00D1C4-1i for linux-arm-kernel@lists.infradead.org; Tue, 30 May 2023 08:48:53 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5149c76f4dbso3770426a12.1 for ; Tue, 30 May 2023 01:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1685436527; x=1688028527; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=MHqfhex4k1JTsYeEXGwpls18ioPjTIAYp2acOWIwgpo=; b=jWN+niVahYUW4XDuO6u4d+X15sRRNP6SJBklfervz8Tj+qXTI+jXKJ+uQM7EcZQvDB 7aYOkUoJhTiiHkrPR1+Tjnk3vmJiiV7J29hC56MkxepJPprIzQk53KUerZwrzBPAY6PK z8fbMj5psQ7L1lzIGy5m5ybnAGq9V0H9019phHEnsMkU0JizrpZaGwvwRYU8+G8v8TLH dh0VfcpmKDFtAHx3rviOnbpKTRY9W9UTXOMN6bfOarCqXKlRQmb2lCcJkyhicXovGBlq u3JqSL16vqcDRk/x11BExLTf4Amho7k2reV2m1V9o+P6Lblw0KZ1GSxyBac8zlfSYz3c rdoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685436527; x=1688028527; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MHqfhex4k1JTsYeEXGwpls18ioPjTIAYp2acOWIwgpo=; b=EMRZSjJeNpfIjPvb73iElY+yC6N43uQBFOCsMVtXBHu5Bn5riXYzPxvemo7JMWM7tI vSG+lfAw3lAhU5N9MTI1PFOBezu9kFUSqmB+5op3HpePrliX3dgh/gUK3C3sv+FgTlaK zQ4RTw9dZJ8z3EGAO169uZa74v1R55hHxd7OGnF1KBIIRgLOH9HA8rLUxXdARH0lyHL1 Qzc+tThXvohqHZjLJHfwlzxsJzFnkM3b4bBdonlVXq/Qn0Z0wHgdMU30tZn0KSzHUbc/ ZAGsLBrmFqJqpSgclrzg1dLRTjJ2sCHqB3jlK1rbfd5ZtNLDoCIKN6cJ7Ld3E1GdMUmB MNBA== X-Gm-Message-State: AC+VfDzkhPFH47Y48Gu6IAJZc7595tRH39qlp0F/oHmHyFckeHYwFqC3 RITxlDnvKmzPJDrvNSQe7m1oCA== X-Google-Smtp-Source: ACHHUZ6TKXLrgG6JwuYw1Kzs78NP4b4Q0MqE5vN2rgVaizDAED6lGqcpPitCI+esTvabbTHyjvPpow== X-Received: by 2002:a17:907:961e:b0:971:fa86:27e with SMTP id gb30-20020a170907961e00b00971fa86027emr1524138ejc.16.1685436527350; Tue, 30 May 2023 01:48:47 -0700 (PDT) Received: from [127.0.0.1] (abordeaux-655-1-129-86.w90-5.abo.wanadoo.fr. [90.5.10.86]) by smtp.gmail.com with ESMTPSA id k7-20020a170906054700b0096f675ce45csm6959686eja.182.2023.05.30.01.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 01:48:46 -0700 (PDT) From: Guillaume Ranquet Date: Tue, 30 May 2023 10:43:07 +0200 Subject: [PATCH] phy: mediatek: hdmi: mt8195: fix prediv bad upper limit test MIME-Version: 1.0 Message-Id: <20230529-hdmi_phy_fix-v1-1-bf65f53af533@baylibre.com> X-B4-Tracking: v=1; b=H4sIABq3dWQC/zWNQQqDMBBFryKzNqipWuxVpISMGc0smkoCYgnev aPg8n3e42dIFJkSvIoMkTZO/A0CTVnA5G1YSLETBl3rR93pQXn3YbP6n5l5V4Oz2BO2muYnSII 2kcJow+TPCNtKLHMnp7FGkuk6HN/H8QdvJZG6gAAAAA== To: Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger , AngeloGioacchino Del Regno Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Guillaume Ranquet X-Mailer: b4 0.13-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230530_014852_573524_30AF0D38 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The pll prediv calculus searchs for the smallest prediv that gets the ns_hdmipll_ck in the range of 5 GHz to 12 GHz. A typo in the upper bound test was testing for 5Ghz to 1Ghz Fixes: 45810d486bb44 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") Signed-off-by: Guillaume Ranquet Reviewed-by: AngeloGioacchino Del Regno --- drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 9f925874281f7e8855855d6210d6e29d844e4307 change-id: 20230529-hdmi_phy_fix-9dab6eb42ef7 Best regards, diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c index 8aa7251de4a9..bbfe11d6a69d 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c @@ -253,7 +253,7 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw, for (i = 0; i < ARRAY_SIZE(txpredivs); i++) { ns_hdmipll_ck = 5 * tmds_clk * txposdiv * txpredivs[i]; if (ns_hdmipll_ck >= 5 * GIGA && - ns_hdmipll_ck <= 1 * GIGA) + ns_hdmipll_ck <= 12 * GIGA) break; } if (i == (ARRAY_SIZE(txpredivs) - 1) &&