Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp899362rwl; Fri, 31 Mar 2023 04:10:58 -0700 (PDT) X-Google-Smtp-Source: AKy350YueWsQdEleLIve4gPh+nwRHdRzraCbmhVNQ8uMSGewkN0ilIM9IyHXHU5a4mIUU6XFIbWF X-Received: by 2002:a05:6a20:7da7:b0:d9:f4e9:546d with SMTP id v39-20020a056a207da700b000d9f4e9546dmr6558848pzj.6.1680261058533; Fri, 31 Mar 2023 04:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680261058; cv=none; d=google.com; s=arc-20160816; b=PZX6kkDg+lE6NJXiTV/WaJA92KPpZ8Vr5poNhgXkQnDXt4pothl93qMrQ8eNBcEit0 +30JmsOBKjIYExrnbVP2wJZY8W1bPVq8G0ZVRDPsB/a3frrBo5PS5mzX+NUqr6y1eBzp x7+/dAL7hi8XwBIYt6XnfCfzuitYHW3UF86WBRpp5LpYXpjyKYrrFNgrDuChOAvBlA2r f2vlLqhoKQDlUGmlCA8HEAUtG2bOoIgVGi0H1j4TQhp2q6dPSLMa4hCp2EWuwKDPPla6 VgoMDcvEgV1rgc+DgG1F0hxksj6kO9mE1cml7o0bIEMGUihLONzlQ+mdbAbKswMbUiu6 +/Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LKKzuKD/yw4rJXNV+OTo/xDF3dymlJo4Q4foJX1aiC8=; b=zQF9Lxbwdupowr2ZJWK+h1X+Qb6CyZt47PZbow4fXE9pAjls+Lqgtn7lMFbawb4+vj LY66n5tfg2NKh438rQkc+3R6xj+2XWhcVTKDfY4clgTtpagGZZxQin2Zp6mUBc1akS8x w0v6o4d51mX/mp/J6WjmusB5R33bDPS2ihTlurhDykcm/V1SDG1zGX07M9pXkhA66/qr SjmY6CXVwYjURteTqX2S2J+PxqrqoIXjIc+HN/LvnXesY1W6SFrJVk+w6SLzZPeWBF0B PJPwJ+oBVE70MZjV57ZUam5/enUeSESwvtvhtsvKsF3akgSj7R0ph4ulX4/xYwhiJa0A V2cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crly.cz header.s=gm1 header.b=BjjXSenf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v62-20020a638941000000b004fc1f5e387esi2196443pgd.817.2023.03.31.04.10.46; Fri, 31 Mar 2023 04:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crly.cz header.s=gm1 header.b=BjjXSenf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbjCaLFZ (ORCPT + 99 others); Fri, 31 Mar 2023 07:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbjCaLFE (ORCPT ); Fri, 31 Mar 2023 07:05:04 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37302BBAB for ; Fri, 31 Mar 2023 04:03:21 -0700 (PDT) Received: (Authenticated sender: me@crly.cz) by mail.gandi.net (Postfix) with ESMTPSA id BCA3AC0006; Fri, 31 Mar 2023 11:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crly.cz; s=gm1; t=1680260574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LKKzuKD/yw4rJXNV+OTo/xDF3dymlJo4Q4foJX1aiC8=; b=BjjXSenfeT2p1QtWT86vqvBFTvqecWO+G/3LDdXvq3DpCuxvoU2l8WyzXLiLoIgIPDD3kz E6krT5KhEwfypJXZC8GCBhzGM7g3Kqfeo1r5VXkUBJnSz2gdVYmEhMYlqj8NCe555hU//n zUuszgSB9nNjk7tT1qzz1n4prjkR2A0a+Q7306EbQJMr3wAwL5YJKyTOdHzhXi4BAH9Akv KiQMef/st6irzFFTsCpx9FElmpZ43hDqh9m78KcpLmctRjNiTndY+rj2uBeV/EZFXhKsYo nJZLdZ914uLekqavTcq09vMJKJKJePGlDBFjnCQjtZhBBSEpil6SkgqN0Rx4Bw== From: Roman Beranek To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Jernej Skrabec , Samuel Holland Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] drm: sun4i: set proper TCON0 DCLK rate in DSI mode Date: Fri, 31 Mar 2023 13:02:42 +0200 Message-Id: <20230331110245.43527-1-me@crly.cz> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With bpp bits per pixel transmitted over n DSI lanes, the target DCLK rate for a given pixel clock is obtained as follows: DCLK rate = 1/4 * bpp / n * pixel clock Effect of this change can be observed through the rate of Vblank IRQs which should now match refresh rate implied by set display mode. It was verified to do so on a A64 board with a 2-lane and a 4-lane panel. Roman Beranek (3): drm: sun4i: rename sun4i_dotclock to sun4i_tcon_dclk ARM: dts: sunxi: rename tcon's clock output drm: sun4i: calculate proper DCLK rate for DSI arch/arm/boot/dts/sun5i.dtsi | 2 +- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 +- arch/arm/boot/dts/sun8i-a83t.dtsi | 2 +- arch/arm/boot/dts/sun8i-v3s.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 +- drivers/gpu/drm/sun4i/Makefile | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 46 +++++++++++-------- .../{sun4i_dotclock.c => sun4i_tcon_dclk.c} | 2 +- .../{sun4i_dotclock.h => sun4i_tcon_dclk.h} | 0 9 files changed, 33 insertions(+), 27 deletions(-) rename drivers/gpu/drm/sun4i/{sun4i_dotclock.c => sun4i_tcon_dclk.c} (99%) rename drivers/gpu/drm/sun4i/{sun4i_dotclock.h => sun4i_tcon_dclk.h} (100%) -- 2.32.0 (Apple Git-132)