From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B653D49206 for ; Mon, 18 Nov 2024 10:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MZ2uPcMwugiZJT4SwPgnJiQdeoEx/ijyjEhzPQFF+h8=; b=yijUsaAjoSUeX7OwBY6lqnLSQi 1KVyiD/wOqi3jct9YR4Q1nFuyJW9SBcQEEeXTst9jxR4xIeXrF8JTIzdABN3DLP7wlTFiaZK0VRBf 8KWQiAiYQaB9FcYFdp0NlMxRHTV54+SSzFkfgLuNHU4IIi+Z8bhv+7L60ec9Lt9tWaEdi5IZ1w+tS H1T0j21rodJlxAavx07aDnaJs3VsT8HzQNkRnNMm1AK72o4lQB8l/edgvgdx5ptWt7Axhy1c/mC41 1n7gV7WglUCThAmAnIlO1POxVtmQMoW0Wfk4SUwKg49Ijz6RWXKX7Mb2Axa+VVTQzTmPuGfmWFTnS Kz4ZBdHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tCyY7-00000008zKv-2p9G; Mon, 18 Nov 2024 10:00:03 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tCyX7-00000008zBP-2LBD; Mon, 18 Nov 2024 09:59:06 +0000 Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 31B645B3; Mon, 18 Nov 2024 10:58:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1731923923; bh=qN1yEu+NGkQCj48gFcQZwFz/XJ1FgWBwwPxbDANCw9w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pe+JC0uwHPx+KOIPFxnimZbp3cuJ5ps5rS7lyqpoJtge1Iqdqikxwb+BSL28geDV+ IaKD8BXbVEoGzjYZ+p2+/8KNA4EziQkPFZuU+fx8vLVpU8J+6LLtZlRGQ2w444o2vV hH0A5MAAgtUWa4DitvxCT3NmVJhbzlfOJwCxgFzI= Date: Mon, 18 Nov 2024 11:58:50 +0200 From: Laurent Pinchart To: CK Hu =?utf-8?B?KOiDoeS/iuWFiSk=?= Cc: "sumit.semwal@linaro.org" , "christian.koenig@amd.com" , "mchehab@kernel.org" , "conor+dt@kernel.org" , "robh@kernel.org" , "matthias.bgg@gmail.com" , "krzk+dt@kernel.org" , AngeloGioacchino Del Regno , Shu-hsiang Yang =?utf-8?B?KOaliuiIkue/lCk=?= , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "yunkec@chromium.org" , "linaro-mm-sig@lists.linaro.org" , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , Yaya Chang =?utf-8?B?KOW8tembhea4hSk=?= , Project_Global_Chrome_Upstream_Group , "dri-devel@lists.freedesktop.org" , Teddy Chen =?utf-8?B?KOmZs+S5vuWFgyk=?= , "linux-arm-kernel@lists.infradead.org" , "hidenorik@chromium.org" , Shun-Yi Wang =?utf-8?B?KOeOi+mghuWEhCk=?= Subject: Re: [PATCH v1 10/10] uapi: linux: add mediatek isp_7x camsys user api Message-ID: <20241118095850.GA30268@pendragon.ideasonboard.com> References: <20241009111551.27052-1-Shu-hsiang.Yang@mediatek.com> <20241009111551.27052-11-Shu-hsiang.Yang@mediatek.com> <20241106130437.GA16791@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241106130437.GA16791@pendragon.ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_015901_736843_B0CD74F7 X-CRM114-Status: GOOD ( 19.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 06, 2024 at 03:04:37PM +0200, Laurent Pinchart wrote: > On Mon, Oct 14, 2024 at 05:56:40AM +0000, CK Hu (胡俊光) wrote: > > Hi, Shu-hsiang: > > > > On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote: > > > Add UAPI for MediaTek ISP platform, providing user-space > > > interfaces for the new camsys driver. > > > > > > Signed-off-by: Shu-hsiang Yang > > > --- > > > > [snip] > > > > > + > > > +/* MTK ISP camsys controls */ > > > +#define V4L2_CID_MTK_CAM_USED_ENGINE_LIMIT (V4L2_CID_USER_MTK_CAM_BASE + 1) > > > +#define V4L2_CID_MTK_CAM_BIN_LIMIT (V4L2_CID_USER_MTK_CAM_BASE + 2) > > > +#define V4L2_CID_MTK_CAM_FRZ_LIMIT (V4L2_CID_USER_MTK_CAM_BASE + 3) > > > +#define V4L2_CID_MTK_CAM_RESOURCE_PLAN_POLICY (V4L2_CID_USER_MTK_CAM_BASE + 4) > > > +#define V4L2_CID_MTK_CAM_USED_ENGINE (V4L2_CID_USER_MTK_CAM_BASE + 5) > > > +#define V4L2_CID_MTK_CAM_BIN (V4L2_CID_USER_MTK_CAM_BASE + 6) > > > +#define V4L2_CID_MTK_CAM_FRZ (V4L2_CID_USER_MTK_CAM_BASE + 7) > > > +#define V4L2_CID_MTK_CAM_USED_ENGINE_TRY (V4L2_CID_USER_MTK_CAM_BASE + 8) > > > +#define V4L2_CID_MTK_CAM_BIN_TRY (V4L2_CID_USER_MTK_CAM_BASE + 9) > > > +#define V4L2_CID_MTK_CAM_FRZ_TRY (V4L2_CID_USER_MTK_CAM_BASE + 10) > > > +#define V4L2_CID_MTK_CAM_PIXEL_RATE (V4L2_CID_USER_MTK_CAM_BASE + 11) > > > +#define V4L2_CID_MTK_CAM_FEATURE (V4L2_CID_USER_MTK_CAM_BASE + 12) > > > +#define V4L2_CID_MTK_CAM_SYNC_ID (V4L2_CID_USER_MTK_CAM_BASE + 13) > > > +#define V4L2_CID_MTK_CAM_RAW_PATH_SELECT (V4L2_CID_USER_MTK_CAM_BASE + 14) > > > +#define V4L2_CID_MTK_CAM_HSF_EN (V4L2_CID_USER_MTK_CAM_BASE + 15) > > > +#define V4L2_CID_MTK_CAM_PDE_INFO (V4L2_CID_USER_MTK_CAM_BASE + 16) > > > +#define V4L2_CID_MTK_CAM_MSTREAM_EXPOSURE (V4L2_CID_USER_MTK_CAM_BASE + 17) > > > +#define V4L2_CID_MTK_CAM_RAW_RESOURCE_CALC (V4L2_CID_USER_MTK_CAM_BASE + 18) > > > +#define V4L2_CID_MTK_CAM_TG_FLASH_CFG (V4L2_CID_USER_MTK_CAM_BASE + 19) > > > +#define V4L2_CID_MTK_CAM_RAW_RESOURCE_UPDATE (V4L2_CID_USER_MTK_CAM_BASE + 20) > > > +#define V4L2_CID_MTK_CAM_CAMSYS_HW_MODE (V4L2_CID_USER_MTK_CAM_BASE + 21) > > > + > > > > Please give introduction of how to use these user space interface. > > I'm very, very *not* thrilled by all this. It looks like a big pile of > hacks really. Every single parameter used by those controls needs to be > clearly documented, including explaining how they are used, in order for > us to review the API. I suspect that many of the parameters should > instead be handled through the ISP parameters buffers, or be controlled > from standard V4L2 APIs. While on the topic of documentation, we also need a high-level architecture document. This patch series adds 30000 lines of code, it's very hard for reviewers to understand the architecture of the driver just by looking at the code. At the very least, a high-level description of the hardware (at least from the view point of the interface the firmware exposes) is needed. -- Regards, Laurent Pinchart