Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp208275rwe; Wed, 24 Aug 2022 21:11:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+A/8E+VerUdSNNEdepgS9HwCmRsMP7b11saoq5YzuhMGbby1yW/pwOtIvO7nP6fhi4Izd X-Received: by 2002:a17:903:22d1:b0:172:f11f:de35 with SMTP id y17-20020a17090322d100b00172f11fde35mr1946607plg.150.1661400695218; Wed, 24 Aug 2022 21:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661400695; cv=none; d=google.com; s=arc-20160816; b=06uTJ2MGzAFnwMiuR+SQPAZXSthBB8s2eOmTktEXyPQxpMTaXvSflDnP7ZfaqU4NHE 0qZYL8zJ3OpZDoTPIXjyj+C4DGb5oBr5etyy5TlicgLdZi7yWXi5prEpRfh6AdxHp3tv ZUvSKtos0Gx7cK29OfM8z8UkdDddOumZ5DpWRFjcI+kKRc37Il8657R0XTitBi6dtpig jnGZzWkkn4pUBrFzJdZvJ7a8G0/+RAqn7UReM6DNcG34V32fFt8nnq5R+wkxQQylkmES +J833Ic7pEMXAY24Ko8BkobUSmYdftAtRljxp6ookbAtRQUeb0ow7F8X62EpijI7uJCG 9Dng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=QOBOjdM80auaLFqiLz2HryuF9Bx4PCj92SDetnBUxZU=; b=mGSKPQstm0AB3q2ohG6vUj+AMGoKJw3YaFi77yCfk+GzzkAH+bhCnFPgVi1WJR6bPv +SXKHAFYZVHf5qrD9reyB4SS5IUHfao1SBUnVWSTRNP6pSnKh5z0sbVUCd3rYJyg3lof 25+DSVkdR+pMKb5qWaWMImu/glEqlSuO7syMrN3H8HQjm/wixOGjPNdUZ5xR0jzTvuo3 u8tnOf+T4pz8kLVXnX6fyFelPRT7YXW9MhJnIESwR9AFNNe1SGM9pHOoD6ID3b9OqVRZ C5z9MUb1vD1jqhP6W+v0gu+Gytz4nWnXtHO/cOzbwrAJsPgRPMs1nFrQAS+Si0JcMJSv zwnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=NL0GZK25; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i75-20020a639d4e000000b0041d8f25d40bsi19550695pgd.851.2022.08.24.21.11.20; Wed, 24 Aug 2022 21:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=NL0GZK25; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbiHYDgA (ORCPT + 99 others); Wed, 24 Aug 2022 23:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbiHYDfq (ORCPT ); Wed, 24 Aug 2022 23:35:46 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD6B564C0; Wed, 24 Aug 2022 20:35:29 -0700 (PDT) X-UUID: 4f08e4b054ed424a8dc360fc0a80509f-20220825 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=QOBOjdM80auaLFqiLz2HryuF9Bx4PCj92SDetnBUxZU=; b=NL0GZK25BIh/BLmYn9YAeKLrlUh9zPFgcivkjareyNF+fG6IUvs6suYpuJxB7POmS6J0kXWOWsU/8RSiPVQfezxPZ7aOnN4EvsyC2w+Rpx7uZDn9eFn2pDDsGes8efvjQGKKSv+sJQQEZVhkN4ecpztvq688BQQf3YriOab8w3Q=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.10,REQID:c641f423-7d6b-48b2-802d-6cfa24f99bb6,OB:0,L OB:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release _Ham,ACTION:release,TS:-5 X-CID-META: VersionHash:84eae18,CLOUDID:119f0920-1c20-48a5-82a0-25f9c331906d,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 4f08e4b054ed424a8dc360fc0a80509f-20220825 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1616451944; Thu, 25 Aug 2022 11:35:24 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 25 Aug 2022 11:35:22 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 25 Aug 2022 11:35:22 +0800 Message-ID: Subject: Re: [PATCH v28 4/4] media: platform: mtk-mdp3: add MediaTek MDP3 driver From: moudy ho To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Krzysztof Kozlowski CC: Chun-Kuang Hu , Rob Landley , Laurent Pinchart , , , , , , Alexandre Courbot , , , , , Benjamin Gaignard , AngeloGioacchino Del Regno , , , Ping-Hsun Wu , daoyuan huang Date: Thu, 25 Aug 2022 11:35:22 +0800 In-Reply-To: <3ccf3023-9b1c-2ae6-dd70-6f318eec22e2@xs4all.nl> References: <20220823023803.27850-1-moudy.ho@mediatek.com> <20220823023803.27850-5-moudy.ho@mediatek.com> <3ccf3023-9b1c-2ae6-dd70-6f318eec22e2@xs4all.nl> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED, URIBL_CSS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, Thank you for your time and effort. As a small reminder, Matthias also mentioned that he will help apply patches 1 and 2. Regards, Moudy On Wed, 2022-08-24 at 10:39 +0200, Hans Verkuil wrote: > Hi Moudy, > > On 23/08/2022 04:38, Moudy Ho wrote: > > This patch adds driver for MediaTek's Media Data Path ver.3 (MDP3). > > It provides the following functions: > > color transform, format conversion, resize, crop, rotate, flip > > and additional image quality enhancement. > > > > The MDP3 driver is mainly used for Google Chromebook products to > > import the new architecture to set the HW settings as shown below: > > User -> V4L2 framework > > -> MDP3 driver -> SCP (setting calculations) > > -> MDP3 driver -> CMDQ (GCE driver) -> HW > > > > Each modules' related operation control is sited in mtk-mdp3-comp.c > > Each modules' register table is defined in file with "mdp_reg_" > > prefix > > GCE related API, operation control sited in mtk-mdp3-cmdq.c > > V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c > > Probe, power, suspend/resume, system level functions are defined in > > mtk-mdp3-core.c > > > > Signed-off-by: Ping-Hsun Wu > > Signed-off-by: daoyuan huang > > Signed-off-by: Moudy Ho > > Tested-by: AngeloGioacchino Del Regno < > > angelogioacchino.delregno@collabora.com> > > --- > > drivers/media/platform/mediatek/Kconfig | 1 + > > drivers/media/platform/mediatek/Makefile | 1 + > > drivers/media/platform/mediatek/mdp3/Kconfig | 20 + > > drivers/media/platform/mediatek/mdp3/Makefile | 6 + > > .../platform/mediatek/mdp3/mdp_reg_ccorr.h | 19 + > > .../platform/mediatek/mdp3/mdp_reg_rdma.h | 65 ++ > > .../platform/mediatek/mdp3/mdp_reg_rsz.h | 39 + > > .../platform/mediatek/mdp3/mdp_reg_wdma.h | 47 + > > .../platform/mediatek/mdp3/mdp_reg_wrot.h | 55 + > > .../platform/mediatek/mdp3/mtk-img-ipi.h | 290 +++++ > > .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 466 ++++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 43 + > > .../platform/mediatek/mdp3/mtk-mdp3-comp.c | 1033 > > +++++++++++++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-comp.h | 186 +++ > > .../platform/mediatek/mdp3/mtk-mdp3-core.c | 357 ++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-core.h | 94 ++ > > .../platform/mediatek/mdp3/mtk-mdp3-m2m.c | 724 ++++++++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-m2m.h | 48 + > > .../platform/mediatek/mdp3/mtk-mdp3-regs.c | 735 ++++++++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-regs.h | 373 ++++++ > > .../platform/mediatek/mdp3/mtk-mdp3-vpu.c | 313 +++++ > > .../platform/mediatek/mdp3/mtk-mdp3-vpu.h | 78 ++ > > 22 files changed, 4993 insertions(+) > > create mode 100644 drivers/media/platform/mediatek/mdp3/Kconfig > > create mode 100644 drivers/media/platform/mediatek/mdp3/Makefile > > create mode 100644 > > drivers/media/platform/mediatek/mdp3/mdp_reg_ccorr.h > > create mode 100644 > > drivers/media/platform/mediatek/mdp3/mdp_reg_rdma.h > > create mode 100644 > > drivers/media/platform/mediatek/mdp3/mdp_reg_rsz.h > > create mode 100644 > > drivers/media/platform/mediatek/mdp3/mdp_reg_wdma.h > > create mode 100644 > > drivers/media/platform/mediatek/mdp3/mdp_reg_wrot.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-img- > > ipi.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > cmdq.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > cmdq.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > comp.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > comp.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > core.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > core.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > m2m.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > m2m.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > regs.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > regs.h > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > vpu.c > > create mode 100644 drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > vpu.h > > > > diff --git a/drivers/media/platform/mediatek/Kconfig > > b/drivers/media/platform/mediatek/Kconfig > > index af47d9888552..84104e2cd024 100644 > > --- a/drivers/media/platform/mediatek/Kconfig > > +++ b/drivers/media/platform/mediatek/Kconfig > > @@ -6,3 +6,4 @@ source > > "drivers/media/platform/mediatek/jpeg/Kconfig" > > source "drivers/media/platform/mediatek/mdp/Kconfig" > > source "drivers/media/platform/mediatek/vcodec/Kconfig" > > source "drivers/media/platform/mediatek/vpu/Kconfig" > > +source "drivers/media/platform/mediatek/mdp3/Kconfig" > > diff --git a/drivers/media/platform/mediatek/Makefile > > b/drivers/media/platform/mediatek/Makefile > > index d3850a13f128..38e6ba917fe5 100644 > > --- a/drivers/media/platform/mediatek/Makefile > > +++ b/drivers/media/platform/mediatek/Makefile > > @@ -3,3 +3,4 @@ obj-y += jpeg/ > > obj-y += mdp/ > > obj-y += vcodec/ > > obj-y += vpu/ > > +obj-y += mdp3/ > > diff --git a/drivers/media/platform/mediatek/mdp3/Kconfig > > b/drivers/media/platform/mediatek/mdp3/Kconfig > > new file mode 100644 > > index 000000000000..af371c17c386 > > --- /dev/null > > +++ b/drivers/media/platform/mediatek/mdp3/Kconfig > > @@ -0,0 +1,20 @@ > > +# SPDX-License-Identifier: GPL-2.0-only > > +config VIDEO_MEDIATEK_MDP3 > > + tristate "MediaTek MDP v3 driver" > > + depends on MTK_IOMMU || COMPILE_TEST > > + depends on VIDEO_DEV > > + depends on ARCH_MEDIATEK || COMPILE_TEST > > + depends on HAS_DMA > > A 'depends on REMOTEPROC' is missing here (see the 'kernel test > robot' email > you received), but I have added that myself. > > It's now in my for-v6.1c branch. If I don't see any new 'kernel test > robot' > emails in the next few days, then I'll make a PR early next week. > > Regards, > > Hans > > > + select VIDEOBUF2_DMA_CONTIG > > + select V4L2_MEM2MEM_DEV > > + select MTK_MMSYS > > + select VIDEO_MEDIATEK_VPU > > + select MTK_CMDQ > > + select MTK_SCP > > + default n > > + help > > + It is a v4l2 driver and present in MediaTek MT8183 SoC. > > + The driver supports scaling and color space conversion. > > + > > + To compile this driver as a module, choose M here: the > > + module will be called mtk-mdp3.