Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp950051pxb; Wed, 3 Mar 2021 22:13:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoxv4S3YT+1olOxdhQHfubbCGtzGS62M6UVc5r+lPAojdzhZW8G3Sz9KjjJLDHgHdUBth8 X-Received: by 2002:a17:906:380c:: with SMTP id v12mr2494225ejc.65.1614838402888; Wed, 03 Mar 2021 22:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614838402; cv=none; d=google.com; s=arc-20160816; b=Nm8ChqYJox6LzdqOqLpIMV9zLFJx0o3HpJnqoXaebmjyok2e8255vYH0Zn5ZVUR9a9 QgnNLk9gOy/bmo7vRjm3V0Xti9+Xju3vDj6BetWMJe1Q7V3szbgDdEeRYJfRVqhdtaeO rcio7NaO8/lG0ydI+zREC/CLUlMRHIzPd22/GFznn4VxnErS/fMcnJ4i+RUxIOq0q4q7 635cQrWWciRHp+jbRtnfhT1OSC8Dnah7eSal4J504XKoqmNKmm/KtagZ1Ftmnj1HX1hO 7vj7xYXkZw7UAntRyE4z34+4Ie/Sj3aqYUBr2VlV8eeaMXX3rHtdcrqkj0t/TRt+MJ/J v4aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RF8o3G0Xz1ovVmyTz0LE8nmr/a9IOJBCZQzOLkdGz5M=; b=qDb8yhHkYck9hMVQ9gl+jRERkWMK9CLGSdCHBJ+MfIIdMYQYZcY/wBwcsiIQ8Hhh9W lj/eT25Ekg2JUWYreRv5/XmjwjBbpbCPTQTI/F3/sGJYFnd16I/RgPkhr/dNpd/ImKvm bV0sbX9jLIATPCsHNMmZOduct8R2pmFXZ4T5y9Q6Iu58SE0SW8og54sPpmmnKOHDczL8 ci5dbttd1FlpOePRVx2IfOriHmrjTiDpx86DKn4BLSfDVn2E3nRgtT9WUf6dSKE0Qune brFgRtuBLnnd4jyjAhvRy4OQlBHWY335aplcMN2IRntq5SFi8L+COvgjE1qpmhOv7a1r lFwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=1M2npcI4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p32si17440893edd.89.2021.03.03.22.13.00; Wed, 03 Mar 2021 22:13:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=1M2npcI4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380535AbhCBLeB (ORCPT + 99 others); Tue, 2 Mar 2021 06:34:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442190AbhCBLR4 (ORCPT ); Tue, 2 Mar 2021 06:17:56 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48B78C061793 for ; Tue, 2 Mar 2021 03:16:43 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id mj10so14406987ejb.5 for ; Tue, 02 Mar 2021 03:16:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RF8o3G0Xz1ovVmyTz0LE8nmr/a9IOJBCZQzOLkdGz5M=; b=1M2npcI4L13+kb2WpBZyNmExW6Ysb2w1U5IU1t0e7n/59wjk+NVisOO0ZPmc+X+DRm oRfkUSPQlL3XSV9HLg7IaSLcRZwvOXi51tiW/MQZtsnKbzKQqZyTV1DhASNJxfyDrnUM /+XPe4D58LpQ0a5pqraIkIaicJx4USEK8SwMyu5unSPersA+EbDezjNlZWApb8gSh7ru F+WPtdZ4W1C88AQQ6BdAy+cWxXhoG3Qa3nDShlxi7ESnSg23jCduGgpV3FVzvcS6YJcm 89dS8EekzRj6jNRTIuhV0AQySic9bPbuB2PRnB7OL9mYAN24TJFgfmnpIPR/qkAb54Yt 3Ocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RF8o3G0Xz1ovVmyTz0LE8nmr/a9IOJBCZQzOLkdGz5M=; b=dr0a/RkOhzuOAlHNBI+etekdeMPrb5/fllvQ4KoBGpLoMIzcmj4Gp9QZUL/TknLWID Ablj2AOqC0hkVJMTOp45WGMAOehZhq0fCcShyOvLtURX760WyL2io6BRJbU4bnDzvCPx XDxFKmC3F2xTx8Us+iakozie/wUf4otuAEhtMJGKnC9+DJiaSnq7y1Up1tFaV4AyA2TP Abhfw4rwYLL1EWk61bVyWXl0wEq+1Rs5GhBzq1VOeLk2g1L65Dk+oXfgKBo76JWfuxKa d/Nqg7+isLV7KFbzviUdAXbcBBiaNOvABqBaLB7ekeYTIt2aUFHb8ExdicwGGxWkvhCw Q3AA== X-Gm-Message-State: AOAM533QIx8niQK0CrCwc/q8LZLiHRg90DUu7iC9BD9MzQxSf7XvIZxH Mhk5j45RqwufYINGiFXW2JjhljoylY/5wwC4Y7tmpA== X-Received: by 2002:a17:906:29c3:: with SMTP id y3mr19539341eje.430.1614683801754; Tue, 02 Mar 2021 03:16:41 -0800 (PST) MIME-Version: 1.0 References: <20210225225147.29920-1-fabrizio.castro.jz@renesas.com> <20210225225147.29920-5-fabrizio.castro.jz@renesas.com> In-Reply-To: From: Ezequiel Garcia Date: Tue, 2 Mar 2021 08:16:30 -0300 Message-ID: Subject: Re: [PATCH 4/7] misc: Add driver for DAB IP found on Renesas R-Car devices To: Fabrizio Castro Cc: Arnd Bergmann , Rob Herring , Arnd Bergmann , Laurent Pinchart , Geert Uytterhoeven , Greg Kroah-Hartman , Linux-Renesas , DTML , Linux ARM , Linux API , "linux-kernel@vger.kernel.org" , Catalin Marinas , Will Deacon , Chris Paterson , Prabhakar Mahadev Lad , Phil Edworthy , "REE dirk.behme@de.bosch.com" , Peter Erben , Linux Media Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, On Mon, 1 Mar 2021 at 14:36, Fabrizio Castro wrote: > > Hi Arnd, > > Thanks for your feedback! > > > From: Arnd Bergmann > > Sent: 26 February 2021 10:38 > > Subject: Re: [PATCH 4/7] misc: Add driver for DAB IP found on Renesas R- > > Car devices > > > > On Thu, Feb 25, 2021 at 11:51 PM Fabrizio Castro > > wrote: > > > > > > The DAB hardware accelerator found on R-Car E3 and R-Car M3-N devices is > > > a hardware accelerator for software DAB demodulators. > > > It consists of one FFT (Fast Fourier Transform) module and one decoder > > > module, compatible with DAB specification (ETSI EN 300 401 and > > > ETSI TS 102 563). > > > The decoder module can perform FIC decoding and MSC decoding processing > > > from de-puncture to final decoded result. > > > > > > This patch adds a device driver to support the FFT module only. > > > > > > Signed-off-by: Fabrizio Castro > > > --- > > > MAINTAINERS | 7 ++ > > > drivers/misc/Kconfig | 1 + > > > drivers/misc/Makefile | 1 + > > > drivers/misc/rcar_dab/Kconfig | 11 ++ > > > drivers/misc/rcar_dab/Makefile | 8 ++ > > > drivers/misc/rcar_dab/rcar_dev.c | 176 +++++++++++++++++++++++++++++++ > > > drivers/misc/rcar_dab/rcar_dev.h | 116 ++++++++++++++++++++ > > > drivers/misc/rcar_dab/rcar_fft.c | 160 ++++++++++++++++++++++++++++ > > > include/uapi/linux/rcar_dab.h | 35 ++++++ > > > > Can you explain why this is not in drivers/media/? > > I wasn't entirely sure were to put it to be honest as I couldn't find > anything similar, that's why "misc" for v1, to mainly get a feedback > and advice. > > > > > I don't think we want a custom ioctl interface for a device that > > implements > > a generic specification. My first feeling would be that this should not > > have a user-level API but instead get called by the DAB radio driver. > > I hear you, the trouble is that the modules of this IP should be seen > as part of a SW and HW processing pipeline. > Some of the SW components of the pipeline can be proprietary, and > unfortunately we don't have access (yet) to a framework that allows us to > test and demonstrate the whole pipeline, for the moment we can only test > things in isolation. It'll take us a while to come up with a full solution > (or to have access to one), and in the meantime our SoCs come with an IP > that can't be used because there is no driver for it (yet). > > After discussing things further with Geert and Laurent, I think they > are right in saying that the best path for this is probably to add this > driver under "drivers/staging" as an interim solution, so that the IP will > be accessible by developers, and when we have everything we need (a fully > fledged processing framework), we will able to integrate it better with > the other components (if possible). > > > > > What is the intended usage model here? I assume the idea is to > > use it in an application that receives audio or metadata from DAB. > > What driver do you use for that? > > This IP is similar to a DMA to some extent, in the sense that it takes > input data from a buffer in memory and it writes output data onto a buffer > in memory, and of course it does some processing in between. That sounds like something that can fit V4L2 MEM2MEM driver. You queue two buffers and an operation, and then run a job. > It's not directly connected to any other Radio related IP. > The user space application can read DAB IQ samples from the R-Car DRIF > interface (via driver drivers/media/platform/rcar_drif.c, or from other > sources since this IP is decoupled from DRIF), and then when it's time > to accelerate FFT, FIC, or MSC, it can request services to the DAB IP, so > that the app can go on and use the processor to do some work, while the DAB > IP processes things. > A framework to connect and exchange processing blocks (either SW or HW) and > interfaces is therefore vital to properly place a kernel implementation > in the great scheme of things, in its absence a simple driver can help I'm not entirely sure we are missing a framework. What's missing in V4L2 MEM2MEM? Before considering drivers/staging, it would be interesting to figure out if V4L2 can do it as-is, and if not, discuss what's missing. Thanks, Ezequiel