From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EB9D2F3A for ; Mon, 27 Mar 2023 23:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1679960917; bh=Q+4Mb10klAZfMB/A5WCIqgvbYnDs5kzDVHJcVRl+RCs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To; b=RSTB7ckd1aOjjLJRWit0Cy7vETE2wbok67SWzCI9qyxcISWS33pRhXYDDjf41ykry RO/dRmauj3/cvlsaSfmkSgZa1S2+5m8KV1Rs776lzvya6PAnJ1X12n8IRYXbJNe/us MGH5On5zf1f0lYc0KfFoq7ghe9IEPOoZBAN8qaH+77dtZdoM73iURM3md6ba0DxEKh dRlqVdMUjyNV6dHsKuNglKrXUY7EVnCdeCRiC/0DfOnIDdX8FwdyIoU2hiE+QUYGPd 3K/jdQHO35TkLQGUcsEHA2uzy2+7NZSpfX+FBff8seHaEIGQ3dFz0Cp8EAHDYh085A Xyv/n5Tz4MYPQ== Received: from localhost (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 323E011202B4; Mon, 27 Mar 2023 23:48:34 +0000 (UTC) Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 28 Mar 2023 01:48:33 +0200 Message-Id: Subject: Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG From: "Roman Beranek" To: "Maxime Ripard" , "Frank Oltmanns" Cc: "Chen-Yu Tsai" , "David Airlie" , "Daniel Vetter" , "Jernej Skrabec" , "Samuel Holland" , , , , X-Mailer: aerc 0.14.0 References: <20230320161636.24411-1-romanberanek@icloud.com> <87wn356ni4.fsf@oltmanns.dev> <20230327202045.ceeqqwjug4ktxtsf@penduick> In-Reply-To: <20230327202045.ceeqqwjug4ktxtsf@penduick> X-Proofpoint-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-ORIG-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-11=5F01:2022-01-11=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=272 phishscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2303270187 On Mon Mar 27, 2023 at 10:20 PM CEST, Maxime Ripard wrote: > > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: > > Claiming to set the divider to a different value (bpp / lanes) than wha= t we=E2=80=99re actually using in > > the end (SUN6I_DSIO_TCON_DIV) is somehow bugging me. I feel like the pr= oposal that I submitted is > > more direct: > > Yeah, this patch looks better to me too: it's simpler, more straightforwa= rd. If Roman can confirm it > works with his testing, I'll be happy to merge it. > So I've just found out that my understanding of what sun4i_dotclock is was wrong the whole time. I treated it as a virtual clock representing the true CRTC pixel clock and only coincidentally also matching what A64 Reference Manual labels as TCON0 data clock (a coincidence to which DSI is an exception). Now that I finally see dotclock as 'what could dclk be an abbreviation to', I to agree that it's not only straightforward but also correct to keep the divider at 4 and adjust the rate as is done it the patch Frank submitted. In order to preserve semantic correctness however, I propose to preface the change with a patch that renames sun4i_dotclock and tcon-pixel-clock such that dot/pixel is replaced with d/data. What do you think? Roman 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 9D57CC6FD1D for ; Mon, 27 Mar 2023 23:50:01 +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:In-Reply-To:References:Cc:To:From: Subject:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mgPZt37LWFqkYH603rATIx63sVaQOWt7m2mWN1ogV3s=; b=a4v1CCfgW5aWZ0 KFy6Lh1YMXqT20OK3QyC0594jyk+HdldacFHSxVfEoYp2/vd20X4Jyr+88UNbJb6ktYLuVywXhoCu dYh1d6vaHkuCq6BKJV4jZDr0tkSlsyIsjv/QUd3elYEh43wJHKF8xYoVFdjxfpVfXo9SAvKrbxQ56 0H9zz2UC/lv+jLQRbXSt3oULDPdDoAtqARB88iZ/qqHg27eppyeVWfEpvJ80HZmMrfeBOJswKCKZs xg2cASS4RgO85NE+Ugv5V5pTwXlp6bGvkgKj5R6AMScynHVjeT/cVMhr7psF7PAp7QsDiZqRsJwKG i090Plu9PCARiGqG1Ydg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgwa0-00Cg16-2h; Mon, 27 Mar 2023 23:48:48 +0000 Received: from ci74p00im-qukt09090301.me.com ([17.57.156.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgwZx-00Cg0l-2j for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 23:48:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1679960917; bh=Q+4Mb10klAZfMB/A5WCIqgvbYnDs5kzDVHJcVRl+RCs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To; b=RSTB7ckd1aOjjLJRWit0Cy7vETE2wbok67SWzCI9qyxcISWS33pRhXYDDjf41ykry RO/dRmauj3/cvlsaSfmkSgZa1S2+5m8KV1Rs776lzvya6PAnJ1X12n8IRYXbJNe/us MGH5On5zf1f0lYc0KfFoq7ghe9IEPOoZBAN8qaH+77dtZdoM73iURM3md6ba0DxEKh dRlqVdMUjyNV6dHsKuNglKrXUY7EVnCdeCRiC/0DfOnIDdX8FwdyIoU2hiE+QUYGPd 3K/jdQHO35TkLQGUcsEHA2uzy2+7NZSpfX+FBff8seHaEIGQ3dFz0Cp8EAHDYh085A Xyv/n5Tz4MYPQ== Received: from localhost (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 323E011202B4; Mon, 27 Mar 2023 23:48:34 +0000 (UTC) Mime-Version: 1.0 Date: Tue, 28 Mar 2023 01:48:33 +0200 Message-Id: Subject: Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG From: "Roman Beranek" To: "Maxime Ripard" , "Frank Oltmanns" Cc: "Chen-Yu Tsai" , "David Airlie" , "Daniel Vetter" , "Jernej Skrabec" , "Samuel Holland" , , , , X-Mailer: aerc 0.14.0 References: <20230320161636.24411-1-romanberanek@icloud.com> <87wn356ni4.fsf@oltmanns.dev> <20230327202045.ceeqqwjug4ktxtsf@penduick> In-Reply-To: <20230327202045.ceeqqwjug4ktxtsf@penduick> X-Proofpoint-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-ORIG-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-11=5F01:2022-01-11=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=272 phishscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2303270187 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230327_164845_935101_45246154 X-CRM114-Status: GOOD ( 13.93 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gTW9uIE1hciAyNywgMjAyMyBhdCAxMDoyMCBQTSBDRVNULCBNYXhpbWUgUmlwYXJkIHdyb3Rl Ogo+Cj4gT24gU2F0LCBNYXIgMjUsIDIwMjMgYXQgMTI6NDA6MDRQTSArMDEwMCwgRnJhbmsgT2x0 bWFubnMgd3JvdGU6Cj4gPiBDbGFpbWluZyB0byBzZXQgdGhlIGRpdmlkZXIgdG8gYSBkaWZmZXJl bnQgdmFsdWUgKGJwcCAvIGxhbmVzKSB0aGFuIHdoYXQgd2XigJlyZ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2FyZCBidXQgYWxzbyBjb3JyZWN0 IHRvCmtlZXAgdGhlIGRpdmlkZXIgYXQgNCBhbmQgYWRqdXN0IHRoZSByYXRlIGFzIGlzIGRvbmUg aXQgdGhlIHBhdGNoIEZyYW5rCnN1Ym1pdHRlZC4KCkluIG9yZGVyIHRvIHByZXNlcnZlIHNlbWFu dGljIGNvcnJlY3RuZXNzIGhvd2V2ZXIsIEkgcHJvcG9zZSB0byBwcmVmYWNlCnRoZSBjaGFuZ2Ug d2l0aCBhIHBhdGNoIHRoYXQgcmVuYW1lcyBzdW40aV9kb3RjbG9jayBhbmQgdGNvbi1waXhlbC1j bG9jawpzdWNoIHRoYXQgZG90L3BpeGVsIGlzIHJlcGxhY2VkIHdpdGggZC9kYXRhLiBXaGF0IGRv IHlvdSB0aGluaz8KClJvbWFuCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fXwpsaW51eC1hcm0ta2VybmVsIG1haWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVs QGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9s aXN0aW5mby9saW51eC1hcm0ta2VybmVsCg== 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 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 C9CA1C6FD1D for ; Mon, 27 Mar 2023 23:57:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD47810E433; Mon, 27 Mar 2023 23:57:11 +0000 (UTC) X-Greylist: delayed 512 seconds by postgrey-1.36 at gabe; Mon, 27 Mar 2023 23:57:10 UTC Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8485E10E433 for ; Mon, 27 Mar 2023 23:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1679960917; bh=Q+4Mb10klAZfMB/A5WCIqgvbYnDs5kzDVHJcVRl+RCs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To; b=RSTB7ckd1aOjjLJRWit0Cy7vETE2wbok67SWzCI9qyxcISWS33pRhXYDDjf41ykry RO/dRmauj3/cvlsaSfmkSgZa1S2+5m8KV1Rs776lzvya6PAnJ1X12n8IRYXbJNe/us MGH5On5zf1f0lYc0KfFoq7ghe9IEPOoZBAN8qaH+77dtZdoM73iURM3md6ba0DxEKh dRlqVdMUjyNV6dHsKuNglKrXUY7EVnCdeCRiC/0DfOnIDdX8FwdyIoU2hiE+QUYGPd 3K/jdQHO35TkLQGUcsEHA2uzy2+7NZSpfX+FBff8seHaEIGQ3dFz0Cp8EAHDYh085A Xyv/n5Tz4MYPQ== Received: from localhost (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 323E011202B4; Mon, 27 Mar 2023 23:48:34 +0000 (UTC) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 28 Mar 2023 01:48:33 +0200 Message-Id: Subject: Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG From: "Roman Beranek" To: "Maxime Ripard" , "Frank Oltmanns" X-Mailer: aerc 0.14.0 References: <20230320161636.24411-1-romanberanek@icloud.com> <87wn356ni4.fsf@oltmanns.dev> <20230327202045.ceeqqwjug4ktxtsf@penduick> In-Reply-To: <20230327202045.ceeqqwjug4ktxtsf@penduick> X-Proofpoint-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-ORIG-GUID: p8h-miPlykEtip94gyjHAwmjbUceibHK X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-11=5F01:2022-01-11=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=272 phishscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2303270187 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: Samuel Holland , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon Mar 27, 2023 at 10:20 PM CEST, Maxime Ripard wrote: > > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: > > Claiming to set the divider to a different value (bpp / lanes) than wha= t we=E2=80=99re actually using in > > the end (SUN6I_DSIO_TCON_DIV) is somehow bugging me. I feel like the pr= oposal that I submitted is > > more direct: > > Yeah, this patch looks better to me too: it's simpler, more straightforwa= rd. If Roman can confirm it > works with his testing, I'll be happy to merge it. > So I've just found out that my understanding of what sun4i_dotclock is was wrong the whole time. I treated it as a virtual clock representing the true CRTC pixel clock and only coincidentally also matching what A64 Reference Manual labels as TCON0 data clock (a coincidence to which DSI is an exception). Now that I finally see dotclock as 'what could dclk be an abbreviation to', I to agree that it's not only straightforward but also correct to keep the divider at 4 and adjust the rate as is done it the patch Frank submitted. In order to preserve semantic correctness however, I propose to preface the change with a patch that renames sun4i_dotclock and tcon-pixel-clock such that dot/pixel is replaced with d/data. What do you think? Roman