devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	linux-rockchip@lists.infradead.org
Cc: Shengyu Qu <wiagn233@outlook.com>,
	Michael Tretter <m.tretter@pengutronix.de>,
	devicetree@vger.kernel.org, heiko@sntech.de,
	jacob-chen@iotwrt.com, kernel@pengutronix.de,
	krzysztof.kozlowski+dt@linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	michael.riesch@wolfvision.net, robh+dt@kernel.org,
	Peter Geis <pgwipeout@gmail.com>
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: Add RGA2 support to rk356x
Date: Tue, 22 Nov 2022 20:47:49 +0100	[thread overview]
Message-ID: <2694546.oTxpM42Gb3@archbook> (raw)
In-Reply-To: <CAMdYzYr68xvNvJRiJw9JyHoN7v12bvucdWLhdkt5j1QJqEuApg@mail.gmail.com>

On Dienstag, 22. November 2022 00:10:25 CET Peter Geis wrote:
> On Mon, Nov 21, 2022 at 12:34 PM Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar> wrote:
> >
> > Hi Shengyu, Michael,
> >
> > On Mon, Nov 21, 2022 at 2:13 PM Shengyu Qu <wiagn233@outlook.com> wrote:
> > >
> > > Hi,
> > > I remember someone said that rga2 has only 32bit address space but not having a mmu or mmu needs to be configured. Better ask by yourself in pine64 discord since I'm not sure about that.
> > >
> > > Shengyu
> > >
> > >
> > > 于 2022年11月22日 GMT+08:00 上午12:41:16, Michael Tretter <m.tretter@pengutronix.de> 写到:
> > > >Hi,
> > > >
> > > >On Tue, 22 Nov 2022 00:01:28 +0800, Shengyu Qu wrote:
> > > >> Someone from pine64 discord found that RGA2 doesn't work properly on over
> > > >>
> > > >> 4GB memory RK3568 devices. Are you sure current driver works now?
> > > >
> > > >I am absolutely sure that the driver works on a 2GB ROCK3A board.
> > > >Unfortunately, I don't have a device with 4GB or more memory and I cannot test
> > > >the driver with such a device.
> > > >
> > > >As the documentation for the RGA2 is the same in the TRM of the rk3288 and
> > > >rk3568, I would guess that the driver doesn't work on a rk3288 with more than
> > > >4GB (if there is such a thing) either and the driver needs to be fixed for
> > > >both SoCs.
> > > >
> >
> > In any case, if there's some kind of issue it must be in the driver,
> > and not in the device tree binding (i.e. this patchset).
> 
> An unfortunate number of Rockchip drivers break on rk356x boards with
> more than 4GB of ram. I've found requesting memory allocations with
> the GFP_DMA flag solves the problem, as the kernel only allocates
> 32bit addresses for DMA on rk356x. This is similar to the bug with the
> ITS MSI allocations.

Hello,

the problem in this case at least partly seems to be down to the driver
assuming 32 bit addresses, see e.g. [1] (if I understand the code
correctly) and [2]. When I asked in the #armlinux IRC on Libera.chat
about this, Robin Murphy remarked:

  <robmur01> yeesh, the virt_to_phys/dma_sync abuse is even worse
  - in that particular instance I'd be inclined to replace
  {src,dst}_mmu_pages with proper coherent DMA buffers

So the driver in general needs some cleanup, which contributes to the
problem.

But as was said, this isn't a problem with the device tree, so it should
still make it in. It just means that the driver is broken on 8GB RK356x.

Regards,
Nicolas "someone from PINE64 discord (who was actually on IRC)" Frattaroli

[1]: https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/media/platform/rockchip/rga/rga.c#L888
[2]: https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/media/platform/rockchip/rga/rga-buf.c#L120

> 
> >
> > Regards,
> > Ezequiel
> >
> > _______________________________________________
> > Linux-rockchip mailing list
> > Linux-rockchip@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 





  reply	other threads:[~2022-11-22 19:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 15:17 [PATCH 0/2] media: rockchip: rga: Add rk3568 support Michael Tretter
2022-11-21 15:17 ` [PATCH 1/2] media: dt-bindings: media: rockchip-rga: add rockchip,rk3568-rga Michael Tretter
2022-11-21 16:26   ` Krzysztof Kozlowski
2022-11-21 15:17 ` [PATCH 2/2] arm64: dts: rockchip: Add RGA2 support to rk356x Michael Tretter
2022-11-21 16:01   ` Shengyu Qu
2022-11-21 16:41     ` Michael Tretter
2022-11-21 17:13       ` Shengyu Qu
2022-11-21 17:30         ` Ezequiel Garcia
2022-11-21 23:10           ` Peter Geis
2022-11-22 19:47             ` Nicolas Frattaroli [this message]
2022-11-23  9:28               ` Michael Tretter
2023-01-17 12:41                 ` Michael Tretter
2023-01-18  0:01                   ` Nicolas Frattaroli
2023-01-19 12:15                     ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2694546.oTxpM42Gb3@archbook \
    --to=frattaroli.nicolas@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=heiko@sntech.de \
    --cc=jacob-chen@iotwrt.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=m.tretter@pengutronix.de \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=wiagn233@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).