Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1827737imn; Mon, 1 Aug 2022 01:20:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7L9gXyBThUDuvjg7N9TUsdYVFT4PkGvwa5hluW+zjEsWrP38RzjIW1dehVt4PmGy/Zo3Pv X-Received: by 2002:a17:902:e885:b0:16e:c85b:e3bd with SMTP id w5-20020a170902e88500b0016ec85be3bdmr11602145plg.63.1659342029572; Mon, 01 Aug 2022 01:20:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659342029; cv=pass; d=google.com; s=arc-20160816; b=tU0/DdFyF3FF+zssnpCpBjOCtmPNmLvM0tVN7Z6URCOFyFkXtX2xisfYgi9U/hAPZc DZZ8jSEtEFht/iXsFxzHTopvV50hn/mC4+5JMd1R58UHtAW232hxO5alEjYfwZsrn5DY kwSOZcqCUSwDfsOXorw3q7BQqiSSGmWgyY9OsSUZLvi79amESi0RNSyB0d3ElWwXbamc ubiTh4P91xjw9D27teKuqHlDc1GYPTbsiUQHDYn1mWQMldQxzkEeSMfB6a5LGhNttWUV GxnaRzMXu1snYrxbtCGundrkD60w9Dbe6hzbmd83bV4U9/BmG6IdRplTm8oPm+yktCkK WAEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=4WRWkwxVz0KsUp5T//s3RChgbJk5OaYFW0ByucVJsog=; b=yu6cKMnq/+28RZjjcUfszznVd26YbogD/PDrnNb+OKTMDc4qEKFET0b/PNUBEOribB OZRXTSEea05Seh/obbermVpvbC/BeJJV/aJwhW59z/ZYWCZDuNUE8HWkcsNO19D5j57X fulguD4MOigEPHERLYqExUOAv54eOUsL+17QU7SXS61LuzHedaFrhtnGzf9dTWbZQynx eAygwezS1iLWxPBVGzdx186T+dkTl3Im/MvvNIhftaKi80JrmXdZa3K7SAnaZGqQ6WFf kUS2tv4lqLjhpV5/i3Ro2zSdj54II7VsBkMiGpVj6/7biazDZQpy3GzMF2Dx1+xLjmah rH2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="V0/WNiA9"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a17090274c800b001678ce90824si10221096plt.542.2022.08.01.01.19.52; Mon, 01 Aug 2022 01:20:29 -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=@nxp.com header.s=selector2 header.b="V0/WNiA9"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbiHAIS5 (ORCPT + 99 others); Mon, 1 Aug 2022 04:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiHAISz (ORCPT ); Mon, 1 Aug 2022 04:18:55 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2040.outbound.protection.outlook.com [40.107.21.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 897D53A4A2; Mon, 1 Aug 2022 01:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+pPn35vwDx7DsOCFBA61xn7+75Z6Lq931PJFar+LFu7AkDPlQGB0Xvsos7aCrqMiybA8uqAAE5t+pfaZraWGME4wliDI+7+hmDUqJ8L7WIlrf1dzlKvJVzzK+V9Lgc8WU0OpovgP6pvG9hwuw8PLXwYiDGo3t1gUXueFMhcQLN8dw01zXxMPkQt+dbDcWeagRPAJhBJqbJzv/7PyaCINsjGPlmv1ci4eX5pGEFzM7bLoRS7zg/Wg15reV0WA3v/5wlP3Zc/SBUTG4cd+08ggf1X25fpc7yo7VSSL93Ke2Pd5TaNVVfqWEJWn5cmKdM0l+qd5gFCmca7qDaDVTfYIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4WRWkwxVz0KsUp5T//s3RChgbJk5OaYFW0ByucVJsog=; b=TWtLCEW8jvvaCPKryM5PliABWS36i1UqZ92JLZdzWtJm5GJjAtii0V5v1wH7rhk00D3rNbZqnWu9DM74nYsZ5P4ga1aIoyGEQyRGVELj7Wfdy/IB3KkXAGdug3yuVO/YLzLKinAu0pCt2TZ3S3TSYpteRTGLfP2HWT7LQiOZ6oh050zR+ZvF0UVZewM8abT3vtSb9eMvGmGzxa1kIovIAkIy8GK8yOet/f6myjaHTtWsLonV+LWeqUpJV8lAYe6JzIoFoSsAahoEwKy+47/9jitZEoejAqjp0dA53AscXYqaT1L7/fozKilD6KCkP/4rMBHyhrDaQuyNKn1r0jtEng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4WRWkwxVz0KsUp5T//s3RChgbJk5OaYFW0ByucVJsog=; b=V0/WNiA9/bwxFUdLPTS/rRmT5yg0YVzHLdEtIOTbdDHCaViq4QNMqA0IgmbVbiJSwZ8ZYO7NrgZ3/whmt6nUTuR2b2Nd32RXlLlcOZSWSL3Bewgo+PyjN2ISZ3sVmrG2uNctuOGEOkR9hSCdMCUOnDyQ4e4+J9o2Vq2c3YSAB1c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by AS1PR04MB9334.eurprd04.prod.outlook.com (2603:10a6:20b:4de::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Mon, 1 Aug 2022 08:18:51 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::5db6:3f08:2e04:33c]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::5db6:3f08:2e04:33c%4]) with mapi id 15.20.5482.014; Mon, 1 Aug 2022 08:18:51 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/4] media: amphion: add support for contiguous format Date: Mon, 1 Aug 2022 16:18:01 +0800 Message-Id: X-Mailer: git-send-email 2.37.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGBP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::23) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 276f7975-c820-41aa-8b96-08da73967742 X-MS-TrafficTypeDiagnostic: AS1PR04MB9334:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gKjs5PlcnNkOYUoPJAkN2467vatbCXAOgqq8uw+oGXizkhZ+zehY7V6XM6b5m9tlOonW7iv5mVa2Y21ioS1XxpM/V31OmfJqX1NwHKssjpp1/PFTSmwSTySfxWEQK4XDsb28oSG9KHOnkdYVINRJtyqGwPNm5qzcXK5omUKdWFMJvy94UY3J44VMUHloihQSc9oMc3RTmn3QobjtKWqIuSGEsxrs6fM/pI6vKrJDYohCLiVICkfSJrxEbU6Q0IXD9CvATSnzyheZn+oxswOCFxdJ1UtB2dUEtFguH3bOZd8KQZ4HrhDPBbUoivlYTWSRDnIQbsTT5av7M/wAOwE0yIbk0TRDh9954JAh7Z1M9qZwbzeyk/WchWm44ZjEl/hB7GA+IU1cvPvE4pT5d2vND4S1Bvx+dMMjGR6jrEkDC45wJdthdwWtZy0jkLf7s/6Smx8xwolwPXNI4bvXP4cEfNA5+9Q66TeGFPmKBoSVBi80hIoAmwSWwG2AFqksuT/51cyW0/YEHEJr3PconvKr6kSXj0V1J/ETXsubhtbdJgXZDy+X2qELuNBNfPkjXMk1XmnuVGi756hk7Bry3uh/YGv+Rb/b+dJhBCGGdOa+8kEuFRxT3phZo0C1vpsF0frR3orkuwuDL9KkGbMW4WKPZlTwxbdOaJXk3UYffATbAmtoTVwKCyXk0QsovZEn7i6lNodWi8Ay8Jc2Vx2+t1pqPashsZc9MAFWALysoEMJ/NDHladW0p3k436q6K4LH8RaXti1piMMTR9moUgBPLs+uL/4bxyCd4D4EMF2rqoo55k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(366004)(376002)(346002)(39860400002)(396003)(66946007)(6666004)(316002)(6506007)(6512007)(52116002)(26005)(6486002)(86362001)(2616005)(41300700001)(38350700002)(478600001)(83380400001)(5660300002)(7416002)(44832011)(36756003)(38100700002)(66476007)(66556008)(4326008)(8676002)(8936002)(186003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?URNl62aCOlzEe77IGR6N6Dz9FcaLyKoFT5XMbR+gF/ipCxUEzQBc2dRIPc0I?= =?us-ascii?Q?dEeeryy848XnD16wI+OY7WJY8b8vlEoP4iwnY3zlt3FJTb/wtBeZl0Qh6Sev?= =?us-ascii?Q?r+vzOTmyiYDFM99+2h7Ff827scvqWeIZrTwAVb8MhQfZpFCNVAbDV5KoJA3Y?= =?us-ascii?Q?+FdNmUlxkWLVkrCJG2cihC316yImGN7UFsY8glJ6oZW7FLOA0tik6qYQIQG3?= =?us-ascii?Q?7AkDbDPcpOmFDzWutxS1xrvjx3OpC+RrpLcwmcwOQiCgo6/CT6xwZzlfSPXZ?= =?us-ascii?Q?NDbXAahLrcRWBnrFvZfP0gpSpDtOpk6KsVBGKuXP+/GLlfFTfkyVqvxUjO6X?= =?us-ascii?Q?UuKFTVLood/bd7e0EaJR3ahl5755CGjTrNPbSIJVKYEszsVzjMauW0ID1A1N?= =?us-ascii?Q?qnV+M1+BWSngZqfF5MWtpIEQ/u25dyVJgo3CQRT6cw4L8ePKbYgIMRkLkN8v?= =?us-ascii?Q?iC9+q0Pt/nDAuvlotFuY5KC6bOGcHqrfzECzMInbTgXs+/IuucZwJ6R3Mkc2?= =?us-ascii?Q?ynd0RSwi33sa0NiyDMRJm/HvHfcWcTmq70fxC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ZqQZVHF5fiXwQ+uZPSMjDztmrhUtjvKcSkWfdQ8A90eduaqATV?= =?us-ascii?Q?lkwn24YhI017+ngdlL0ANT1kQ2Tu5skR/ZOfD/dnIVK+xumhpUS/Y4Yf4gT3?= =?us-ascii?Q?40slM9bevXon1ZtXVOs+6JWz6De3tGVSJcXDOduC?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 276f7975-c820-41aa-8b96-08da73967742 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2022 08:18:51.1047 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Hgn+ZsW8uphlCwU49w9HjPEPeHOInIGE1Pjnojp9Zf+Q9qQEc5jF2uguQWkp2NNzBIY/1Oqb+rIb76AnuyTndA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9334 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 amphion vpu support non contiguous planes yuv format, but when we make pipeline with other device, the device may only support contiguous format, for example, amphion encoder support NV12M, but the capture device may only support NV12. we can't connect them directly. So to improve compatibility, driver can add support for contiguous format in the same time. Then encoder can support NV12 and NV12M, decoder can support NV12_8L128 and NV12M_8L128. v2 -- fix an uninitialized array index read error -- remove an used variable Ming Qian (4): media: add nv12_8l128 and nv12_10be_8l128 video format. media: amphion: tell and handle contiguous and non contiguous format media: amphion: decoder add support for contiguous planes media: amphion: encoder add support for contiguous planes .../media/v4l/pixfmt-yuv-planar.rst | 8 + drivers/media/platform/amphion/vdec.c | 203 ++++++++++-------- drivers/media/platform/amphion/venc.c | 41 ++-- drivers/media/platform/amphion/vpu.h | 4 +- drivers/media/platform/amphion/vpu_dbg.c | 8 +- drivers/media/platform/amphion/vpu_helpers.c | 38 +++- drivers/media/platform/amphion/vpu_helpers.h | 2 + drivers/media/platform/amphion/vpu_malone.c | 3 +- drivers/media/platform/amphion/vpu_v4l2.c | 134 ++++++++---- drivers/media/platform/amphion/vpu_v4l2.h | 3 +- drivers/media/platform/amphion/vpu_windsor.c | 8 +- drivers/media/v4l2-core/v4l2-ioctl.c | 2 + include/uapi/linux/videodev2.h | 2 + 13 files changed, 296 insertions(+), 160 deletions(-) -- 2.37.1