Received: by 10.213.65.16 with SMTP id m16csp229676imf; Mon, 12 Mar 2018 01:27:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELugl8x/l9QxkfYP+3taqnwP/MApVASVH4tbqE+cWAGAOMW953DI459dR81Oj8BurVRUCreF X-Received: by 10.99.164.25 with SMTP id c25mr6003516pgf.235.1520843241031; Mon, 12 Mar 2018 01:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520843240; cv=none; d=google.com; s=arc-20160816; b=gN/yArwJIXfVj+FzrekaN+8/YoNgi8BPJ28ggU0yN8Fe59esOll7a7S8dMWDrxBZU2 R0dVynwGYkxbLBPNrBvSBsHX4WxlYWBlLZtFfT+e9sQ+SG/X3pLdvcIpDpB2KAeZLtpf 6EMSr8govLiIfLmeS6ULDujtK9ZHviYp5WDuIGP4hqiVTHCk1/OQjqOVE4jI1TRMTNH2 9/k29BRz7KhqzoqpcdsX48hrDGNvvyWf7q54SGkJH71eN/mG0Syxt/TUCRXAAKUzLmGp LpqwhmQiRJWsPcT/KvUsM13wdzIiq8B73JnlDeOemmFY4ul2gNXvlrCdbmd7f6sGgJ5M k3ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=uloptk76CARfy/FpmyqO91z/a7dGH3KMOGPEAe3hVdQ=; b=BUzQ+iNuLJX2gvBBPWeopRn8UFzyDx0oQilQo/Yw7+9Ll4X87/WnZpR1BmI/btjFwX OEzSszLXcuJrxc/YMig58itUYRllizz0W9Q4YjwonklPDn37TNbzw/lzQIvWHUMcbG0K EV65SlD1Lgt++rEko/cceLzBd2qt5rXcwXqcZt/v26vZEB7s5WjP6K2ZGNsM4T3A9d1t U86jop+pLFTVroKjTcrmCe4SHYl+yZ61bTOAQv5l77nlYHInBcCWPdrefzaHW14KFsdU /mSTS5evcmpLva6AbRqiT6jovXNvv4XKEg9qPt2d77hBFXH22yPJNOs8fb2sBqB9TUQT 6ovQ== 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 h67si4687356pgc.324.2018.03.12.01.27.06; Mon, 12 Mar 2018 01:27:20 -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 S1751982AbeCLI0K (ORCPT + 99 others); Mon, 12 Mar 2018 04:26:10 -0400 Received: from mail.bootlin.com ([62.4.15.54]:45849 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbeCLI0J (ORCPT ); Mon, 12 Mar 2018 04:26:09 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id C881E2071F; Mon, 12 Mar 2018 09:26:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from florent-laptop.lan (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 402182037A; Mon, 12 Mar 2018 09:26:05 +0100 (CET) Message-ID: <1520843103.1513.8.camel@bootlin.com> Subject: Re: [RFCv4,19/21] media: vim2m: add request support From: Paul Kocialkowski To: Tomasz Figa , Dmitry Osipenko Cc: Alexandre Courbot , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Pawel Osciak , Marek Szyprowski , Sakari Ailus , Gustavo Padovan , Linux Media Mailing List , Linux Kernel Mailing List , Maxime Ripard Date: Mon, 12 Mar 2018 09:25:03 +0100 In-Reply-To: References: <20180220044425.169493-20-acourbot@chromium.org> <1520440654.1092.15.camel@bootlin.com> <6470b45d-e9dc-0a22-febc-cd18ae1092be@gmail.com> <1520842245.1513.5.camel@bootlin.com> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vi8lL/WrEHkMCOMTypE+" X-Mailer: Evolution 3.26.5 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-vi8lL/WrEHkMCOMTypE+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, 2018-03-12 at 17:15 +0900, Tomasz Figa wrote: > Hi Paul, Dmitry, >=20 > On Mon, Mar 12, 2018 at 5:10 PM, Paul Kocialkowski > wrote: > > Hi, > >=20 > > On Sun, 2018-03-11 at 22:42 +0300, Dmitry Osipenko wrote: > > > Hello, > > >=20 > > > On 07.03.2018 19:37, Paul Kocialkowski wrote: > > > > Hi, > > > >=20 > > > > First off, I'd like to take the occasion to say thank-you for > > > > your > > > > work. > > > > This is a major piece of plumbing that is required for me to add > > > > support > > > > for the Allwinner CedarX VPU hardware in upstream Linux. Other > > > > drivers, > > > > such as tegra-vde (that was recently merged in staging) are also > > > > badly > > > > in need of this API. > > >=20 > > > Certainly it would be good to have a common UAPI. Yet I haven't > > > got my > > > hands on > > > trying to implement the V4L interface for the tegra-vde driver, > > > but > > > I've taken a > > > look at Cedrus driver and for now I've one question: > > >=20 > > > Would it be possible (or maybe already is) to have a single IOCTL > > > that > > > takes input/output buffers with codec parameters, processes the > > > request(s) and returns to userspace when everything is done? > > > Having 5 > > > context switches for a single frame decode (like Cedrus VAAPI > > > driver > > > does) looks like a bit of overhead. > >=20 > > The V4L2 interface exposes ioctls for differents actions and I don't > > think there's a combined ioctl for this. The request API was > > introduced > > precisely because we need to have consistency between the various > > ioctls > > needed for each frame. Maybe one single (atomic) ioctl would have > > worked > > too, but that's apparently not how the V4L2 API was designed. > >=20 > > I don't think there is any particular overhead caused by having n > > ioctls > > instead of a single one. At least that would be very surprising > > IMHO. >=20 > Well, there is small syscall overhead, which normally shouldn't be > very painful, although with all the speculative execution hardening, > can't be sure of anything anymore. :) Oh, my mistake then, I had it in mind that it is not really something noticeable. Hopefully, it won't be a limiting factor in our cases. > Hans and Alex can correct me if I'm wrong, but I believe there is a > more atomic-like API being planned, which would only need one IOCTL to > do everything. However, that would be a more serious change to the > V4L2 interfaces, so should be decoupled from Request API itself. >=20 > Best regards, > Tomasz --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-vi8lL/WrEHkMCOMTypE+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAlqmOV8ACgkQ3cLmz3+f v9Enqwf/dGlUworp9wGBWUKSVsM7pgf2yfj2RcdyhkJ9JyD8udtaVguCtr+V45Ie Ve87E+0rWw97rRBHkZwL50g18s56PwsdYzNIv8p6w203LQ224RFDqSalCBkSxPWR QWCLz5PVsrKPWUdFTrcdsRviTAdqcsTAfarZ6hBVukhc0Uh8+sKS243AxN+BuaKz 9INTOr4HfLnYh/vLJjQf6n7CfKOyp12mfnIavkk75p24teRpjae9UNBrsbQJQ5d4 W9ncC8VVWXOgY41+FdkSCcLAUvrD75tGkAGUjF7xz102Or0J5djWSvR/PUjIBuMt s2+bmRRjii+T8U3PtwRyI8+3UXUH1Q== =J1Z1 -----END PGP SIGNATURE----- --=-vi8lL/WrEHkMCOMTypE+--