From: Paul Kocialkowski <contact@paulk.fr>
To: Hans Verkuil <hverkuil@xs4all.nl>, Chen-Yu Tsai <wens@csie.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
devel@driverdev.osuosl.org,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-sunxi <linux-sunxi@googlegroups.com>,
Randy Li <ayaka@soulik.info>,
ezequiel@collabora.com, Tomasz Figa <tfiga@chromium.org>,
Alexandre Courbot <acourbot@chromium.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 0/2] Follow-up patches for Cedrus v9
Date: Sun, 09 Sep 2018 21:13:40 +0200 [thread overview]
Message-ID: <f1527ee171087dc17b96ae6781e22991673efbff.camel@paulk.fr> (raw)
In-Reply-To: <7386a631-1753-22cb-955e-fd0f1ca7a2d1@xs4all.nl>
[-- Attachment #1: Type: text/plain, Size: 4301 bytes --]
Hi,
Le dimanche 09 septembre 2018 à 11:04 +0200, Hans Verkuil a écrit :
> On 09/08/2018 09:42 PM, Paul Kocialkowski wrote:
> > Hi,
> >
> > Le samedi 08 septembre 2018 à 13:24 +0200, Hans Verkuil a écrit :
> > > On 09/08/2018 12:22 PM, Chen-Yu Tsai wrote:
> > > > On Sat, Sep 8, 2018 at 6:06 PM Hans Verkuil <hverkuil@xs4all.nl> wrote:
> > > > >
> > > > > On 09/07/2018 06:33 PM, Paul Kocialkowski wrote:
> > > > > > This brings the requested modifications on top of version 9 of the
> > > > > > Cedrus VPU driver, that implements stateless video decoding using the
> > > > > > Request API.
> > > > > >
> > > > > > Paul Kocialkowski (2):
> > > > > > media: cedrus: Fix error reporting in request validation
> > > > > > media: cedrus: Add TODO file with tasks to complete before unstaging
> > > > > >
> > > > > > drivers/staging/media/sunxi/cedrus/TODO | 7 +++++++
> > > > > > drivers/staging/media/sunxi/cedrus/cedrus.c | 15 ++++++++++++---
> > > > > > 2 files changed, 19 insertions(+), 3 deletions(-)
> > > > > > create mode 100644 drivers/staging/media/sunxi/cedrus/TODO
> > > > > >
> > > > >
> > > > > So close...
> > > > >
> > > > > When compiling under e.g. intel I get errors since it doesn't know about
> > > > > the sunxi_sram_claim/release function and the PHYS_PFN_OFFSET define.
> > > > >
> > > > > Is it possible to add stub functions to linux/soc/sunxi/sunxi_sram.h
> > > > > if CONFIG_SUNXI_SRAM is not defined? That would be the best fix for that.
> > > > >
> > > > > The use of PHYS_PFN_OFFSET is weird: are you sure this is the right
> > > > > way? I see that drivers/of/device.c also sets dev->dma_pfn_offset, which
> > > > > makes me wonder if this information shouldn't come from the device tree.
> > > > >
> > > > > You are the only driver that uses this define directly, which makes me
> > > > > suspicious.
> > > >
> > > > On Allwinner platforms, some devices do DMA directly on the memory BUS
> > > > with the DRAM controller. In such cases, the DRAM has no offset. In all
> > > > other cases where the DMA goes through the common system bus and the DRAM
> > > > offset is either 0x40000000 or 0x20000000, depending on the SoC. Since the
> > > > former case is not described in the device tree (this is being worked on
> > > > by Maxime BTW), the dma_pfn_offset is not the value it should be. AFAIK
> > > > only the display and media subsystems (VPU, camera, TS) are wired this
> > > > way.
> > > >
> > > > In drivers/gpu/drm/sun4i/sun4i_backend.c (the display driver) we use
> > > > PHYS_OFFSET, which is pretty much the same thing.
> > > >
> > >
> > > OK, in that case just put #ifdef PHYS_PFN_OFFSET around that line together
> > > with a comment that this will eventually come from the device tree.
> >
> > That seems fine, although I'm less certain about what to do for the
> > SRAM situation. Other drivers that use SUNXI_SRAM have a Kconfig select
> > on it (that Cedrus lacks). Provided that the SRAM driver builds fine
> > for non-sunxi configs, bringing-in that select would remove the need
> > for dummy functions and also ensure that the actual implementation is
> > always used on sunxi. Otherwise, there'd be a risk of having the dummy
> > functions used (if the SRAM driver is not explicitly selected in the
> > config), causing a hang when accessing the VPU.
>
> You should certainly select this kernel config.
>
> But the real problem seems to to be drivers/soc/Makefile where it says:
>
> obj-$(CONFIG_ARCH_SUNXI) += sunxi/
>
> I think this should be:
>
> obj-y += sunxi/
>
> Now all compiles fine on i686 with the cedrus driver selecting SUNXI_SRAM.
I have just crafted a patch to the attention of Maxime to allow
building the sunxi SRAM driver without selecting the sunxi
architecture, the way you suggested.
With that, I just sent out v2 of the follow-up series for the Cedrus
driver, which should cover the build issues encountered so far.
Hopefully everything should be in order this time!
Cheers,
Paul
--
Developer of free digital technology and hardware support.
Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-09-09 19:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 16:33 Paul Kocialkowski
2018-09-07 16:33 ` [PATCH 1/2] media: cedrus: Fix error reporting in request validation Paul Kocialkowski
2018-09-07 16:33 ` [PATCH 2/2] media: cedrus: Add TODO file with tasks to complete before unstaging Paul Kocialkowski
2018-09-08 10:06 ` [PATCH 0/2] Follow-up patches for Cedrus v9 Hans Verkuil
2018-09-08 10:22 ` Chen-Yu Tsai
2018-09-08 11:24 ` Hans Verkuil
2018-09-08 19:42 ` Paul Kocialkowski
2018-09-09 9:04 ` Hans Verkuil
2018-09-09 19:13 ` Paul Kocialkowski [this message]
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=f1527ee171087dc17b96ae6781e22991673efbff.camel@paulk.fr \
--to=contact@paulk.fr \
--cc=acourbot@chromium.org \
--cc=ayaka@soulik.info \
--cc=devel@driverdev.osuosl.org \
--cc=ezequiel@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=maxime.ripard@bootlin.com \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=tfiga@chromium.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wens@csie.org \
/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
all inboxes | Powered by JetHome®