From patchwork Sun May 15 20:44:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Adri=C3=A1n_Larumbe?= X-Patchwork-Id: 12850096 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 A6A63C433F5 for ; Sun, 15 May 2022 20:44:33 +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:MIME-Version:Message-Id:Date:Subject:Cc :To: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=cJCLIWVhP65VxO6iPKCUPzFuEFE+RXenmbKlsvndtnQ=; b=WQ8D24lf8l0YNH X/+8lPNdN6tHCeadRUX9JCW6IZpD0S/P0CdI2H+n6Vc8CXMN1lCMkFB+l3+zJDZUsfFf5ywXoAmFC YGGN+9pvyNLjISb4oEP8LA52eHyY3AbSr+gBngGu2zbZNJWIn9/P085XcMBII5BeiTgeuObtgNDuO 2TTQoW5DykJwRoVBtBcwnA+7sQmSQF1mQFURnCJ68XoPUmBaI9lVSHQz6wb34h2a24bqA0F1kce4h ZXrbkdT662NqExhlkSWZj+rUEC1tTDKwcbl1GmrUnV+7K2HCtXbc9YQ6zU2RulTyCk09a9QJezvUt a4+n8qPUa/QQ0vZamkuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqL6I-00516W-27; Sun, 15 May 2022 20:44:26 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqL6F-00515O-6E for linux-amlogic@lists.infradead.org; Sun, 15 May 2022 20:44:24 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: alarumbe) with ESMTPSA id 181AC1F40848 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652647459; bh=NDTySiDmKSwj7gbdz9Iao713A5gVozGrjrvvWD1ujRM=; h=From:To:Cc:Subject:Date:From; b=VS+hV8xjEEUP1cNYl11UorWIjKRuRCWdQ6QVD1u6Ta25skEYG4AoEhHHZjMccleBT GxRi5xhKU5BVKHNjgRRNAsqYRwOWDM2ghQczEg6y8JB+W4Q2ThjXwMKBK9u6QKFWHL SpPssIdbFuLi5UPjdI75MFtLNglA2riOBIjxJnqrVqfTGdbDPZvQBlPXRddio+I4gv 4z/k42nCszeAUqB/Bc/xbeohlyRhwXd0DkBBb9PgVsdOxDHNSEFqd3K9nGr/hKrSoP uPfyx4rtB6YAO3k/NWQsJg5RET/cGLogFcjPTm4cRLsQ2ayGC6WDvOoO6u9gJ1EnfD 9mWYX8owjtUoQ== From: =?utf-8?q?Adri=C3=A1n_Larumbe?= To: narmstrong@baylibre.com, khilman@baylibre.com, linux-amlogic@lists.infradead.org, dri-devel@lists.freedesktop.org Cc: adrian.larumbe@collabora.com Subject: [PATCH] drm/meson: fix HDMI2 420 display mode selection logic Date: Sun, 15 May 2022 21:44:12 +0100 Message-Id: <20220515204412.2733803-1-adrian.larumbe@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_134423_484110_B2723DFB X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Commit e67f6037ae1be34b2b68 ("drm/meson: split out encoder from meson_dw_hdmi") introduced a new way of calculating the display's pixel clock. However, it leads to the wrong value being reckoned for Odroid N2+ boards, where clock frequency is never halved when the display's videomode supports YCBCR420 output format. Fix the selection logic. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 5cd2b2ebbbd3..6c9640f4c82e 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -380,7 +380,7 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data, mode->clock > 340000 ? 40 : 10); if (drm_mode_is_420_only(display, mode) || - (!is_hdmi2_sink && + (is_hdmi2_sink && drm_mode_is_420_also(display, mode))) mode_is_420 = true;