From patchwork Tue Sep 27 03:12:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12989799 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 DE2BBC32771 for ; Tue, 27 Sep 2022 03:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7QnxeP6ZkXdpMdp986IlYz+PLWLev6jnwMsmcT+cyKQ=; b=SQdoCJrgKGVg1F yGbFRv499dTXWIjaNEUvyLFkSlXxERlzUN71zdUhJwdLW0qtOXFCJRQ88f+CaiJGchZZweIknirnF 1LOimtfrzeDS3bgKvNNgdzQHNq8BGertkUajNSdkoaaf9NLABLap36yzjXu5I31iVHKqSbn2cSVJ6 gDEQdTq0r8q3olLh2pUWPv6xNFWMDXfKAS9ahODOgdJKLoOCLx826hWx5DOIc6HzJeKWG/Iqw509x 76UTBe29oftVyYFc6B1XSpd7RSjXm5vIdbficxNMNPdUcaEZg4yqlBgeilYy0dy5jiZrYlxhS2pq8 NgOmydWF4oUnBoLP79jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1od12c-0082i5-UF; Tue, 27 Sep 2022 03:13:51 +0000 Received: from mail-am7eur03on2044.outbound.protection.outlook.com ([40.107.105.44] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1od12Z-0082hL-Lr for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 03:13:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MvEx5aMV0fBUZsKWcKorpsdSpslqJJovKyYEW/E/9cldscelbAb2pua0QDTC4+W483ioGH8sx6MtqtpoZeRJT7MPYitq1sMRZB+tAaR1Y307QKaE2iZa8jiZbAiZre5GRLT2g8Jy3ScPoFzE3dFxumR+mymmeYS++/A2g8+V1SsGqS6g0CXkFdtUoJhQTzFDo2SXKpO4c+gQ7k1QPpbVOHa0nQn3Wj1Y6Qart41p2vSk8MRMGoLaV6xDK6hjC3hH0/1dBgrnt/U/Gf/3mFzpmwXcXL91J03e+bKZctvIeYirj0mybdz5se/NzVYKibMIOXzq62/IDuEB8UOaD9uxIg== 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=xFemOgbH07rGETI1rxecZ2Vqjd4v/8YG1LomU2tjtRM=; b=JxFM3DrWgJrvrV5IR1CRltrJpkF2I8VSWcLVdTjweLr7O9fqopaE82ZbXYDeDjynLVnsHYBrBG/mK2k9tMuMER3eSBbv2OSwnFAkjUloMFPdM2rOGd/anzD8JcXDqLZdjd3ZBvfVSh2ixVr22lPp8BrcED/yNwlbjaljjUDDRqWxhI216W+ZZGmn/lKrvARSvxsPG8s/HMN4DaffsP8pZZ5ehmoOz/lEiSrhK3ZBYp6top0EyF3g5qMyYrQSxHTA5tiix+woRYjoqP0msk1zZ4aeCjtZAv5LDXm1UlYZhOatyP+0n2+OEPQw9RzLuj1yXEuUyCYEGlHBe55B+8m/cA== 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=xFemOgbH07rGETI1rxecZ2Vqjd4v/8YG1LomU2tjtRM=; b=Quj6NO8Yym2EgD0bAqZO6zT08F2TZklrfC4TPWVE9r82fSnSgnU3vgFNO/rofMl3Uoixn8PBiCbkKBu8FsM3tsz0q+pikrxy8RH93ipulHZ17hYtOSxAmeHIC4O74mnGskzHGG4IwyPbisd21RF6Z0HtIs+DYrmOVpjJDCaDAzw= 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 AM9PR04MB8811.eurprd04.prod.outlook.com (2603:10a6:20b:40a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Tue, 27 Sep 2022 03:13:41 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::4550:e439:2389:be53]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::4550:e439:2389:be53%5]) with mapi id 15.20.5654.026; Tue, 27 Sep 2022 03:13:41 +0000 From: Ming Qian To: mchehab@kernel.org, mirela.rabulea@oss.nxp.com, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, xiahong.bao@nxp.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/2] media: imx-jpeg, Add support for contiguous NV12 Date: Tue, 27 Sep 2022 11:12:15 +0800 Message-Id: X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2PR01CA0035.apcprd01.prod.exchangelabs.com (2603:1096:4:192::13) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|AM9PR04MB8811:EE_ X-MS-Office365-Filtering-Correlation-Id: beacf73b-1f7b-417a-1c4f-08daa0364708 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fvjkEo4znpdPqg6eUk3WQkKidO75IKw4olVpRmHVLgMUOvE+mOq8LV5/ZGgC8nltnht03lsk2dNnbeAcpRz8Dydg7CmX+b4rsoZxuDQHYxHvl1IlfjHD0d0bgt1QA3FskPh+VhXQCl653JVa2MDUx28tE04HqQuBBlTbQ1/KRoI5o2s/1SSFLKLnQfOb8TYvYfzp/7ud3+vCX+CWQs236QtmV2jqQTYSgnmNuBKKoxz/mSA6q2jDJyBjSMFkyumzcuaZ71vZtGXTAE6almmiLfLYhaohalMNfhz97yY/ELRYEJaMODLTco1vCfRbVNoWE3vRodeEC9NUvD17HX4Nc5mS3lRE5W7tu+sv7exb0rkpdhNz+cW4J7fmzb0qPb3x1lR6SZFVwP0sMf7kb8qRVxCwIIUxZOIbCHPo43RyxBIuvFqH2oFyrNc56KDPupAnSUI991AtUwv02b/MbSf+r5Z9P8IJsvonDvh94GqECQ99M7RcUuHmHe673Zsi8PhYoMtdB0JvooSotuLp6EcT8gLkVrPrbLu1aDZaZj1eg7sT38Xt7KEk2dGbg4xeehPXYt07NoCxe5Mec1eLXdr+Fe+9Q1jOWVAXeHUU8oKPeFbb9/eaiLMA+U97jVmuw1mEEH43lbXWKqquM9wIwMkTWo36hDWuVLS4FsKzFKte7WfnVcP1geIFeySCRD9Muhayv9BFIQLA1vZXiYZfODnRhbXdhx1gqtApFJAmAWn4h5lhhsvvE5ZCeBkGMcSS849FU5k5imV6dwwW4+Jglkr9cw== 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:(13230022)(4636009)(39860400002)(136003)(366004)(396003)(346002)(376002)(451199015)(186003)(2616005)(83380400001)(38100700002)(38350700002)(86362001)(4744005)(44832011)(5660300002)(66476007)(66556008)(66946007)(8936002)(41300700001)(2906002)(7416002)(6666004)(478600001)(6506007)(8676002)(26005)(52116002)(4326008)(316002)(6512007)(6486002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NIjixmkSr0aEIHURFGo2ijNS+QibDvs0kjs8qkHXw82gwmcczqNWR13RNaiWRhYWkdHy1D9l4ZuiGTiEjOeg+ve5pLOebVksN1Dvtw/3ymN1qRseI7/ZP5WN4CJnZjAQ1AdOomB1DaTU6LrfCIua0xzTZ0N+IGH5bEJH3QHFwTCRZNuSxudvMHCGvTm3/jURbdzHNRAwpQD2W2nlC4qyqvr9YWaSfhJWDP8C31Mob7oOKgKlFWKt8YrmR5HkMGPv5DagzcOLHQpBvtpxCJZEqCiN/BKjV0fUk3wCqjXaSg+rkYlyTLUT8xjLc9vfJeuqsbaJ41AaqFiWBX7kwmyoTasnq/BEn2byw+dVqUd44VRRWdeoToc/h5W4k073KykDypTqsxy2VKYCOILgfOhnGQ1JaEu2Kr3trJrRpAzpZNZFISp12nCHfee8uqycLu1NQVM+Fuiw6drKYeNPsWA/tt2N+XqfgsT8inSGFlRoRk/ldFlQwyebHDBwpb6gWN4Q+9Prn8CSgA2t1w0Y648mHNb68bUWJWQwHKv+4jmw4eMIvlABw0ANHSjIC9gsPk7skL2C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-Id: beacf73b-1f7b-417a-1c4f-08daa0364708 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 03:13:40.9707 (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: 7pNnfb0DVgxbaPrqfBf1MM7JHICEmV81dtNz3zc0b8/tNZ5RJnTmA+W1aVU0PhoWCnL71qefPNcAcougEyXmzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8811 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220926_201347_758109_E7FF8786 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. 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 mxc-jpeg supports non contiguous format nv12m, and in order to compatible with the devices who only supports contiguous format nv12, jpeg can support nv12 and nv12m in the same time. And client needs to calculate plane size for format NV12. driver needs to report the aligned resolution, otherwise they can't the correct uv address. So driver needs to implement g_selection to report the actual picture size. v3 - correct the strm_bufsize of encoder v2 - correct the target V4L2_SEL_TGT_COMPOSE_PADDED of decoder - add Fixes tag Ming Qian (2): media: imx-jpeg: Implement g_selection and s_selection media: imx-jpeg: Support contiguous and non contiguous format .../media/platform/nxp/imx-jpeg/mxc-jpeg.c | 545 ++++++++++++------ .../media/platform/nxp/imx-jpeg/mxc-jpeg.h | 8 +- 2 files changed, 389 insertions(+), 164 deletions(-)