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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAB52C433E0 for ; Tue, 2 Feb 2021 13:46:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACBC464F71 for ; Tue, 2 Feb 2021 13:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232764AbhBBNqB (ORCPT ); Tue, 2 Feb 2021 08:46:01 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:51773 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232672AbhBBNnj (ORCPT ); Tue, 2 Feb 2021 08:43:39 -0500 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 010201BF20A; Tue, 2 Feb 2021 13:42:52 +0000 (UTC) Date: Tue, 2 Feb 2021 14:42:52 +0100 From: Paul Kocialkowski To: "H. Nikolaus Schaller" Cc: Robin Murphy , Yong Wu , Rob Herring , Frank Rowand , Linux Kernel Mailing List , linux-arm-kernel , Discussions about the Letux Kernel Subject: Re: BOG: commit 89c7cb1608ac3 ("of/device: Update dma_range_map only when dev has valid dma-ranges") seems to break Pinephone display or LCDC Message-ID: References: <81FE44A3-38C8-4B78-BB77-C09B4FC80B0A@goldelico.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NCITzV7iYwPHdQvU" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --NCITzV7iYwPHdQvU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Nikolaus, On Tue 02 Feb 21, 11:50, H. Nikolaus Schaller wrote: > Hi Paul, >=20 > > Am 02.02.2021 um 10:56 schrieb Paul Kocialkowski : > >=20 > > Hi Nikolaus, > >=20 > > On Tue 02 Feb 21, 10:18, H. Nikolaus Schaller wrote: > >> Hi, > >> since v5.11-rc6 my Pinephone display shows some moir=C3=A9 pattern. > >>=20 > >> I did a bisect between v5.11-rc5 and v5.11-rc6 and it told me that > >> the commit mentioned in the subject is the reason. > >>=20 > >> Reverting it makes the display work again and re-reverting fail again. > >>=20 > >> IMHO it seems as if the display DMA of the pinephone (allwinner suni-a= 54) > >> got influenced and stopped to scan the framebuffer. > >>=20 > >> The only dma-ranges I could find are defined here: > >>=20 > >> arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > >>=20 > >> dma-ranges =3D <0x00000000 0x40000000 0xc0000000>; > >>=20 > >> but I can't tell if they are "valid" or not. > >>=20 > >> Any insights are welcome. And please direct to the right people/mailin= g lists > >> if they are missing. > >=20 > > This may not be strictly the same thing, but is this patch in your tree: > > https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210115175= 831.1184260-2-paul.kocialkowski@bootlin.com/ > >=20 > > If not, it's worth a try to add it. >=20 > No, it hasn't arrived in v5.11-rc6 (or linux-next) yet. >=20 > But it fixes the issue. Great! The patch should already be on its way to the next RC. And nice to see you're active on Pinephone as well! You might remember me f= rom the Replicant project, as I've worked a bit on the GTA04 :) > great and many thanks, > Nikolaus Cheers, Paul > > If it is, it's worth doing a revert. > >=20 > > My understanding is like DE2 does not need a particular DMA range and h= as DRAM > > starting at 0x40000000 (just like the CPU) but it will map DRAM in a lo= op > > before and after this address. > >=20 > > I suspect the issue shows because the pinephone has 2 GiB RAM while for= other > > boards with < 2 GiB RAM, removing 0x40000000 to the DMA addresses still= points > > to the same location. So IMO the MBUS dma-ranges shouldn't apply to DE2. > > I think this is already the case in dt, but the mbus driver may add it = if you > > don't have that patch. > >=20 > > I think I have a few A64 boards around, but probably not with 2 GiB RAM. > > If adding the patch doesn't help, I'll try to make a few test. > >=20 > > Cheers! > >=20 > > Paul > >=20 > > --=20 > > Paul Kocialkowski, Bootlin > > Embedded Linux and kernel engineering > > https://bootlin.com >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --NCITzV7iYwPHdQvU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmAZVtwACgkQ3cLmz3+f v9HKOQf/Ut0tW+f5rk40F9VHRyUZBcEyE272o7KMfQOGt3qWf74rCuce+H6opbdq M8Ouu6o5asniVNsn51P5Bzn+LGo/r3BcXMqjz3zyFrT8QriEVO5GkF/xqAQjfuNE Q0eEg/kt1O3Wubzt59xaQ9eCKlgUJalvhKel0Wfhhx4iuU5w5wazfIyv7W5hzauB gevB0AGzX9ohO67J52VxErmrLRf5+MM+cg57l3uuW2bS6SIn4M6eylz2dii7C3LE l6pu0jdJss/IrwifOrAW4cOvVmYb0MyFdfm3HSLOAiU+zqLPzw+H55KfiWpvucDq rTfx30b031A39GwZdB+AKog7R1g5ng== =zic6 -----END PGP SIGNATURE----- --NCITzV7iYwPHdQvU-- 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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82E38C433DB for ; Tue, 2 Feb 2021 13:44:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 458F864FCE for ; Tue, 2 Feb 2021 13:44:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 458F864FCE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Wc57hkShwLgOerlU5VGmr2TYZT/s04XA/PXW3nK9odg=; b=2xLgWzMUoBsnb705kRUbnIDvf 7larHDtUtWu7aw/TUtnaRCvrMOshSTaxCRpMhczEl5qzeUk60cBsWKkLV1kOOtjPnjvxjS+rcZjmR ieDasaDFRSqiXC7jWprL5mVF/oI4WLd7oZGNmggzrKszmi/4UQ21nL+ogmUr6zn4n1XoT2Z8y8FtV P03FovaHm6LjsPycjBzT+b4WMKdv/CVvuL3vxHJG+ybyjtRT1WtAkgI02D+qf2T6rxEUwy47e7t+S rfYiPp3JdW6j0xqGqqqYW4hKre40cNIjJCuKY+6qWX3WkH+2Ausc0357s40nAkpHBCf0dRBzuxJpP TzlEk6gVw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6vxK-0003Xf-8a; Tue, 02 Feb 2021 13:42:58 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6vxH-0003XG-O7 for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 13:42:57 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 010201BF20A; Tue, 2 Feb 2021 13:42:52 +0000 (UTC) Date: Tue, 2 Feb 2021 14:42:52 +0100 From: Paul Kocialkowski To: "H. Nikolaus Schaller" Subject: Re: BOG: commit 89c7cb1608ac3 ("of/device: Update dma_range_map only when dev has valid dma-ranges") seems to break Pinephone display or LCDC Message-ID: References: <81FE44A3-38C8-4B78-BB77-C09B4FC80B0A@goldelico.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_084256_234381_9C4DCEF4 X-CRM114-Status: GOOD ( 31.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Frank Rowand , Linux Kernel Mailing List , Yong Wu , Discussions about the Letux Kernel , Robin Murphy , linux-arm-kernel Content-Type: multipart/mixed; boundary="===============1743029407572124495==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1743029407572124495== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NCITzV7iYwPHdQvU" Content-Disposition: inline --NCITzV7iYwPHdQvU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Nikolaus, On Tue 02 Feb 21, 11:50, H. Nikolaus Schaller wrote: > Hi Paul, >=20 > > Am 02.02.2021 um 10:56 schrieb Paul Kocialkowski : > >=20 > > Hi Nikolaus, > >=20 > > On Tue 02 Feb 21, 10:18, H. Nikolaus Schaller wrote: > >> Hi, > >> since v5.11-rc6 my Pinephone display shows some moir=C3=A9 pattern. > >>=20 > >> I did a bisect between v5.11-rc5 and v5.11-rc6 and it told me that > >> the commit mentioned in the subject is the reason. > >>=20 > >> Reverting it makes the display work again and re-reverting fail again. > >>=20 > >> IMHO it seems as if the display DMA of the pinephone (allwinner suni-a= 54) > >> got influenced and stopped to scan the framebuffer. > >>=20 > >> The only dma-ranges I could find are defined here: > >>=20 > >> arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > >>=20 > >> dma-ranges =3D <0x00000000 0x40000000 0xc0000000>; > >>=20 > >> but I can't tell if they are "valid" or not. > >>=20 > >> Any insights are welcome. And please direct to the right people/mailin= g lists > >> if they are missing. > >=20 > > This may not be strictly the same thing, but is this patch in your tree: > > https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210115175= 831.1184260-2-paul.kocialkowski@bootlin.com/ > >=20 > > If not, it's worth a try to add it. >=20 > No, it hasn't arrived in v5.11-rc6 (or linux-next) yet. >=20 > But it fixes the issue. Great! The patch should already be on its way to the next RC. And nice to see you're active on Pinephone as well! You might remember me f= rom the Replicant project, as I've worked a bit on the GTA04 :) > great and many thanks, > Nikolaus Cheers, Paul > > If it is, it's worth doing a revert. > >=20 > > My understanding is like DE2 does not need a particular DMA range and h= as DRAM > > starting at 0x40000000 (just like the CPU) but it will map DRAM in a lo= op > > before and after this address. > >=20 > > I suspect the issue shows because the pinephone has 2 GiB RAM while for= other > > boards with < 2 GiB RAM, removing 0x40000000 to the DMA addresses still= points > > to the same location. So IMO the MBUS dma-ranges shouldn't apply to DE2. > > I think this is already the case in dt, but the mbus driver may add it = if you > > don't have that patch. > >=20 > > I think I have a few A64 boards around, but probably not with 2 GiB RAM. > > If adding the patch doesn't help, I'll try to make a few test. > >=20 > > Cheers! > >=20 > > Paul > >=20 > > --=20 > > Paul Kocialkowski, Bootlin > > Embedded Linux and kernel engineering > > https://bootlin.com >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --NCITzV7iYwPHdQvU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmAZVtwACgkQ3cLmz3+f v9HKOQf/Ut0tW+f5rk40F9VHRyUZBcEyE272o7KMfQOGt3qWf74rCuce+H6opbdq M8Ouu6o5asniVNsn51P5Bzn+LGo/r3BcXMqjz3zyFrT8QriEVO5GkF/xqAQjfuNE Q0eEg/kt1O3Wubzt59xaQ9eCKlgUJalvhKel0Wfhhx4iuU5w5wazfIyv7W5hzauB gevB0AGzX9ohO67J52VxErmrLRf5+MM+cg57l3uuW2bS6SIn4M6eylz2dii7C3LE l6pu0jdJss/IrwifOrAW4cOvVmYb0MyFdfm3HSLOAiU+zqLPzw+H55KfiWpvucDq rTfx30b031A39GwZdB+AKog7R1g5ng== =zic6 -----END PGP SIGNATURE----- --NCITzV7iYwPHdQvU-- --===============1743029407572124495== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1743029407572124495==--