From mboxrd@z Thu Jan 1 00:00:00 1970 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 DD46AC433F5 for ; Tue, 3 May 2022 11:05:54 +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:References:In-Reply-To: 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: List-Owner; bh=mu58/d5ismR18/8TS2wEDQElMxhcaHaGZ9P/HuMv4oM=; b=Z2/+3Y4HKRITlS zcfRTCjuYUzl7tr8nGAnZbmArUzUvev4TfEtzSSPq844ErqPPznBzLp2SsAqULQNcqVWLr/+5Rvgb YekWHcctSkkRpbTFDPZ4+k76FUkz+jmlUVppzWN9JbXIzVJ7su/qLDYgEWQwphDOIrIuT+/qfx7kA ldJghI5Jz+mjhYV3QKRClfeQxsb7++N+WB1z6wMr07KqAklNEvotVLb2eH7O96JPU9kgn12o09lNo 5Mdl/u6RK4Hbiraa0pwy4zWJxsMMhvrgaIjUDjbj+/p4zAWg9NU/42V+42r1t6OQb2wWSEFVM4+/v vbugZErDbOshHUeOgLOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlqKW-005V7v-KU; Tue, 03 May 2022 11:04:33 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlqIP-005TtW-Ei; Tue, 03 May 2022 11:02:23 +0000 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlqIJ-0000jM-Qp; Tue, 03 May 2022 13:02:15 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: dri-devel@lists.freedesktop.org, Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , Peter Geis , Douglas Anderson , Yakir Yang , Sascha Hauer Subject: Re: [PATCH v11 11/24] drm/rockchip: dw_hdmi: Use auto-generated tables Date: Tue, 03 May 2022 13:02:14 +0200 Message-ID: <2236782.ElGaqSPkdT@diego> In-Reply-To: <20220422072841.2206452-12-s.hauer@pengutronix.de> References: <20220422072841.2206452-1-s.hauer@pengutronix.de> <20220422072841.2206452-12-s.hauer@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_040221_537527_80D6466C X-CRM114-Status: GOOD ( 25.80 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Freitag, 22. April 2022, 09:28:28 CEST schrieb Sascha Hauer: > From: Douglas Anderson > > The previous tables for mpll_cfg and curr_ctrl were created using the > 20-pages of example settings provided by the PHY vendor. Those > example settings weren't particularly dense, so there were places > where we were guessing what the settings would be for 10-bit and > 12-bit (not that we use those anyway). It was also always a lot of > extra work every time we wanted to add a new clock rate since we had > to cross-reference several tables. > > In I've gone through the work to figure > out how to generate this table automatically. Let's now use the > automatically generated table and then we'll never need to look at it > again. > > We only support 8-bit mode right now and only support a small number > of clock rates and I've verified that the only 8-bit rate that was > affected was 148.5. That mode appears to have been wrong in the old > table. > > Signed-off-by: Douglas Anderson > Signed-off-by: Yakir Yang > Signed-off-by: Sascha Hauer This breaks hdmi on my rk3328-rock64 which then ends up in a [CRTC:37:crtc-0] vblank wait timed out warning-loop. Some part of the patch11-14 range also creates sparking horizontal lines on my rk3288-pinky. I haven't the time to dig overly deep into that, so left out the hdmi-rate patches (11-14) for now. Heiko > --- > > Notes: > Changes since v5: > - Add missing Signed-off-by me > > Changes since v3: > - new patch > > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 130 +++++++++++--------- > 1 file changed, 69 insertions(+), 61 deletions(-) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index fe4f9556239ac..cb43e7b47157d 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -91,80 +91,88 @@ static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_encoder *encoder) > > static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = { > { > - 27000000, { > - { 0x00b3, 0x0000}, > - { 0x2153, 0x0000}, > - { 0x40f3, 0x0000} > + 30666000, { > + { 0x00b3, 0x0000 }, > + { 0x2153, 0x0000 }, > + { 0x40f3, 0x0000 }, > }, > - }, { > - 36000000, { > - { 0x00b3, 0x0000}, > - { 0x2153, 0x0000}, > - { 0x40f3, 0x0000} > + }, { > + 36800000, { > + { 0x00b3, 0x0000 }, > + { 0x2153, 0x0000 }, > + { 0x40a2, 0x0001 }, > }, > - }, { > - 40000000, { > - { 0x00b3, 0x0000}, > - { 0x2153, 0x0000}, > - { 0x40f3, 0x0000} > + }, { > + 46000000, { > + { 0x00b3, 0x0000 }, > + { 0x2142, 0x0001 }, > + { 0x40a2, 0x0001 }, > }, > - }, { > - 54000000, { > - { 0x0072, 0x0001}, > - { 0x2142, 0x0001}, > - { 0x40a2, 0x0001}, > + }, { > + 61333000, { > + { 0x0072, 0x0001 }, > + { 0x2142, 0x0001 }, > + { 0x40a2, 0x0001 }, > }, > - }, { > - 65000000, { > - { 0x0072, 0x0001}, > - { 0x2142, 0x0001}, > - { 0x40a2, 0x0001}, > + }, { > + 73600000, { > + { 0x0072, 0x0001 }, > + { 0x2142, 0x0001 }, > + { 0x4061, 0x0002 }, > }, > - }, { > - 66000000, { > - { 0x013e, 0x0003}, > - { 0x217e, 0x0002}, > - { 0x4061, 0x0002} > + }, { > + 92000000, { > + { 0x0072, 0x0001 }, > + { 0x2145, 0x0002 }, > + { 0x4061, 0x0002 }, > }, > - }, { > - 74250000, { > - { 0x0072, 0x0001}, > - { 0x2145, 0x0002}, > - { 0x4061, 0x0002} > + }, { > + 122666000, { > + { 0x0051, 0x0002 }, > + { 0x2145, 0x0002 }, > + { 0x4061, 0x0002 }, > }, > - }, { > - 83500000, { > - { 0x0072, 0x0001}, > + }, { > + 147200000, { > + { 0x0051, 0x0002 }, > + { 0x2145, 0x0002 }, > + { 0x4064, 0x0003 }, > }, > - }, { > - 108000000, { > - { 0x0051, 0x0002}, > - { 0x2145, 0x0002}, > - { 0x4061, 0x0002} > + }, { > + 184000000, { > + { 0x0051, 0x0002 }, > + { 0x214c, 0x0003 }, > + { 0x4064, 0x0003 }, > }, > - }, { > - 106500000, { > - { 0x0051, 0x0002}, > - { 0x2145, 0x0002}, > - { 0x4061, 0x0002} > + }, { > + 226666000, { > + { 0x0040, 0x0003 }, > + { 0x214c, 0x0003 }, > + { 0x4064, 0x0003 }, > }, > - }, { > - 146250000, { > - { 0x0051, 0x0002}, > - { 0x2145, 0x0002}, > - { 0x4061, 0x0002} > + }, { > + 272000000, { > + { 0x0040, 0x0003 }, > + { 0x214c, 0x0003 }, > + { 0x5a64, 0x0003 }, > }, > - }, { > - 148500000, { > - { 0x0051, 0x0003}, > - { 0x214c, 0x0003}, > - { 0x4064, 0x0003} > + }, { > + 340000000, { > + { 0x0040, 0x0003 }, > + { 0x3b4c, 0x0003 }, > + { 0x5a64, 0x0003 }, > }, > - }, { > + }, { > + 600000000, { > + { 0x1a40, 0x0003 }, > + { 0x3b4c, 0x0003 }, > + { 0x5a64, 0x0003 }, > + }, > + }, { > ~0UL, { > - { 0x00a0, 0x000a }, > - { 0x2001, 0x000f }, > - { 0x4002, 0x000f }, > + { 0x0000, 0x0000 }, > + { 0x0000, 0x0000 }, > + { 0x0000, 0x0000 }, > }, > } > }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel