Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp966800imm; Sat, 8 Sep 2018 12:45:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ85/3YK+PWNf7PfMuDtEFQ0axFznFZjCRs26KdhdPrxhNsld5JkbfQdInQelf+n5ZjxTQv X-Received: by 2002:a63:8241:: with SMTP id w62-v6mr14027521pgd.230.1536435913410; Sat, 08 Sep 2018 12:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536435913; cv=none; d=google.com; s=arc-20160816; b=ZG8bfwwon+c4D7kTciUvjq2hERqplauEqNaHfEBf/ggwlzmm7/rrkuPwbNxhq1/sEL IvARTGkCExnj0G5/FHrL5ZqJ77/4ALn0SsdyQ+rDe9Ex9ldxlju2BoxO2+JMGtJYIGHp Y/ywWh+JDgRfwiodRAJrQu9xj010/XvvrRli32lY2CQGg0PNXpmnqV/A+rZK0NzCi1CZ jBO9qQnn/jrLVyIrigZjddcM2biYCGF9grw//rhcou8x78J8M2c/qCyu4P2IcYbWdHWJ Ko0YEw3RGl9r0/9DX99o96hDOMGqfmfAQQnTqBWY0Duf2/ij4a2FGaecWsfSMDeAEpg6 Ucdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id; bh=ep2MX6CvXx0Zv12vhsXa40xj35xclNPpl7bHt9HlOAM=; b=m+vtPjL9IdesvZTfx7V+h+sy3Dj6ltl/FB+x5Dbzstjb86YhXmfxpBZht00Xun0ASi nJJRw15pi/KAVBLLQgGXnkRPsjWEt4vNsVMCAdaTksy45pz2j66XmDMWpGk138ySMYRk QhXOCIk8KQZpgvMpwIgHxjzH59BVs3IYzv96jlK0dris/93cwj1qVOY7PA0TVPUBz4SE xmfyCPxmcIMeTSTh9d+DDCW1daElTdHIuWBkSJOcqX8KTFmdp67EEVmWGtw11PV6Q3yr 8nicpAgJ2oODD3xuf6HZP6HfU9B8AlKJtosoT1ud+I7JHa6nxz7E+BOUwQznh2b4L01x S0ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si12439611pgi.12.2018.09.08.12.44.25; Sat, 08 Sep 2018 12:45:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727759AbeIIA3y (ORCPT + 99 others); Sat, 8 Sep 2018 20:29:54 -0400 Received: from leonov.paulk.fr ([185.233.101.22]:38016 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727616AbeIIA3y (ORCPT ); Sat, 8 Sep 2018 20:29:54 -0400 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id BA24AC025F; Sat, 8 Sep 2018 21:43:02 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id A7DBCC0F66; Sat, 8 Sep 2018 21:43:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.1 Received: from collins (unknown [192.168.1.1]) by gagarine.paulk.fr (Postfix) with ESMTPSA id B3C56C0F2D; Sat, 8 Sep 2018 21:42:38 +0200 (CEST) Message-ID: Subject: Re: [PATCH 0/2] Follow-up patches for Cedrus v9 From: Paul Kocialkowski To: Hans Verkuil , Chen-Yu Tsai Cc: linux-kernel , Linux Media Mailing List , devel@driverdev.osuosl.org, linux-arm-kernel , Maxime Ripard , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-sunxi , Randy Li , ezequiel@collabora.com, Tomasz Figa , Alexandre Courbot , Philipp Zabel , Laurent Pinchart , Sakari Ailus , Thomas Petazzoni Date: Sat, 08 Sep 2018 21:42:34 +0200 In-Reply-To: <3c4e5a98-4dbd-9a8c-8dab-612a923f0eb9@xs4all.nl> References: <20180907163347.32312-1-contact@paulk.fr> <11104c03-97ac-8b36-7d75-dfecb8fcce10@xs4all.nl> <3c4e5a98-4dbd-9a8c-8dab-612a923f0eb9@xs4all.nl> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-BQ1ZYar5IRrxV/S/Pl6P" X-Mailer: Evolution 3.28.5 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-BQ1ZYar5IRrxV/S/Pl6P Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Le samedi 08 septembre 2018 =C3=A0 13:24 +0200, Hans Verkuil a =C3=A9crit : > On 09/08/2018 12:22 PM, Chen-Yu Tsai wrote: > > On Sat, Sep 8, 2018 at 6:06 PM Hans Verkuil wrote: > > >=20 > > > 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 t= he > > > > Request API. > > > >=20 > > > > Paul Kocialkowski (2): > > > > media: cedrus: Fix error reporting in request validation > > > > media: cedrus: Add TODO file with tasks to complete before unstag= ing > > > >=20 > > > > 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 > > > >=20 > > >=20 > > > So close... > > >=20 > > > When compiling under e.g. intel I get errors since it doesn't know ab= out > > > the sunxi_sram_claim/release function and the PHYS_PFN_OFFSET define. > > >=20 > > > 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 t= hat. > > >=20 > > > 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, wh= ich > > > makes me wonder if this information shouldn't come from the device tr= ee. > > >=20 > > > You are the only driver that uses this define directly, which makes m= e > > > suspicious. > >=20 > > 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 DR= AM > > 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 o= n > > 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. > >=20 > > In drivers/gpu/drm/sun4i/sun4i_backend.c (the display driver) we use > > PHYS_OFFSET, which is pretty much the same thing. > >=20 >=20 > OK, in that case just put #ifdef PHYS_PFN_OFFSET around that line togethe= r > 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. What do you think? Cheers, Paul --=20 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/ --=-BQ1ZYar5IRrxV/S/Pl6P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEAbcMXZQMtj1fphLChP3B6o/ulQwFAluUJioACgkQhP3B6o/u lQzoEA/7BibKzBuB8d983RQNZICzt8NYV7W2spVW8z+SHS/s1/CGEPpIxTzYcQAX vc073Kx6pDw5U+wnkvBU0DsxJ3uTIofzb+VKkAWtqneGYFKHmlccbrlF25t99DVv AlcupZE4hINniubA2zDz6kl8kKHa+2PfvqENszrYiTpNRcVXfuhYcZJwtUr+QKOV 3Lti8Nfo90aHmRJErLSU8PeyXitIuDkIGIqhLoigXzbP4sT+vnu53l5WWBKmrqsc wFweoa445g4+Sf/bb0i7Mku4jgC0OwyeKQOH+AYLAoihaFdNO+FkpoWnI/Zyk1o1 NttICTmBy+PclaAFQP6H772UaO/SIFJ0V56nPR/Cg9RxuChj8Ngc4HRvxRUaq8wk Gfj9pvAehrdxTHJHtAYiAdpkdI9dOSb1+hgMwjA/o26QbgqgCiWsiub9S/UWcHLj 9/U1kvoLtRt4boLxmrC5UiUP/kQVZ3Hc+K1NbzDcsjzBQ4ULUVV/u/qZBLImfvVh 1aJ5d36IWWIDMnw1ytH51RuxgrkobiIlDgzkq/nz3KAix21A1DTUY+AVqNSCx1NT XZowyqbPFwm5wz6b74bPsZi1xH/TVGYlQl/CrrgUOBe2VC3TICGTMdXaRP/7TRet 1JHwAPZnSH2pvCVyCWM09OBfb+sJvLR+gtxFSSwmiI55WZrQYdA= =vw5+ -----END PGP SIGNATURE----- --=-BQ1ZYar5IRrxV/S/Pl6P--