From patchwork Tue Dec 20 03:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13077472 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 89D90C4332F for ; Tue, 20 Dec 2022 03:13:48 +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=AdhoaPPTQhdqVFgoae4uvOM04uxHRggvPdFUzR7Ldxk=; b=Pla2c6cYdrqbkr yHY97bYt6vi/OiEikBd53jGDXIStSTAXD5ss5asb/oOZf0q03d2opJtapu4bLXYLLo2bBSK5aoRB3 qkOMgenH0pDD85AqBYn1NLwyqGtdXEsgyfIHq8WgCEM5TwrZ68RKCpB8XA0rEt/8LstDsNhMO0TgI SwUwRatOsauENPV/h0HSjo1RefWw3BW9tPaY+VVJUDv3YJJ7OEZCyiyjpe5DpJvZJYKaWGV9/CJHR dq5BVmwqlNZn7F0zgdhbh7EEtQnvPItOvBTk+A9aBn5hrFO4l4yU/UcjMoQzlImeFpejgO7X4qzSL etXFXT/CwbnEp2AnC7xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7T3P-008P6W-Tv; Tue, 20 Dec 2022 03:12:32 +0000 Received: from mail-db5eur01on2078.outbound.protection.outlook.com ([40.107.15.78] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7T3M-008P2p-9M for linux-arm-kernel@lists.infradead.org; Tue, 20 Dec 2022 03:12:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jMbfURUq7bl4DXOfzoujT0ao1SIngcTGFx12W6/ej2JcO34I0nRExFlh8Oau8q3SFDtOU2kNjz3efH1yHVt9NPub/w4wO3JMQIlaN6fzOFCletB/SiVGnwgMZAxK+JXF6CNLyCTsDOmTFhVNtkasU17E9GLoJQlMr3dmcIOL9A/85vY2/zqIytuQ/KvM2z+5WlhTigYik9r9H4pvH7qBCr7oslkX7OLdMnjq8OLfLhd/RGO5xG/ErI3LTdmzjVM2P0i7kfIMAqorptuIipRBX3UQGHkrun5IQ4FQZWJi37r+Skr9cN/YZId4eO32niNWnOoKrCX6Cr+Vi3JHovfnMQ== 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=onDvRx36hzQTbrWH/7EsNnQuFRKaCZVGcXYH3ZOTRNE=; b=PH9OUbkh4mX8ZfTWsWhgxQitHWWGwTXDVAuWc5wYX9Y1FxehpXc1tSA5mzZLHNv8/klF1OFK51k7Pax5vp4FFFFbe29cNP8/3yx6MI1LFAdInDc1PduNghZB7J6mQ1NojZHW5oT5+tProoPnLszSnhPjXQa2d5kiLjuaEIJBbMtlZGiv0u05V/Q4+mv0rs2O0gAXTteuyXGh9ja2nykH1SDPVurbwS30kpdsMQa/pDB+LlWsx8soBchJSdi/Gqc4QLMX6zErkhUrTlDLHm4Ak4eD4BSElqzQUMcJxOhnYQMjwdQAaMqJTkMT5jWbLnd95I41c+XILIc2tc1WPre+kQ== 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=onDvRx36hzQTbrWH/7EsNnQuFRKaCZVGcXYH3ZOTRNE=; b=QwWz3d9e0XmxVbCXO2BKqc3XG+1VtYTElIGp0K8mXGJe6ZCXkbaMfOrOLk4XjQwV1q5xrVzQGWjYKt2QKxRgvmvESzwY4WydpHzwo1jmJmjcMes7NhLok41AyZGXc6ZX0qwSnKINSAFsGqhRi/cF6V77NiYh4uVLOkF6/mQbCmc= 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 AS1PR04MB9405.eurprd04.prod.outlook.com (2603:10a6:20b:4db::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Tue, 20 Dec 2022 03:12:22 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d%7]) with mapi id 15.20.5924.016; Tue, 20 Dec 2022 03:12:16 +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 00/10] media: imx-jpeg: Add support for 12 bit extended Date: Tue, 20 Dec 2022 11:11:30 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 X-ClientProxiedBy: SI2PR04CA0014.apcprd04.prod.outlook.com (2603:1096:4:197::18) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|AS1PR04MB9405:EE_ X-MS-Office365-Filtering-Correlation-Id: 137a8540-4fb3-4161-a8a0-08dae237ff1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yZlNrVIMiEBiXhHGP0LHAwx3Taig0cQNmAowA1jJq90bZ8cNxokahOZIng5dfz1oq8JgL9ydroSyKAXl0pt0AYAN2+Zb/Gpo8O06j6PMUapGqofyDtTT2Dlg3nWXnueVLuwgOz2JhL9dgHfhAx4ghK+kovUfOJ8WIZDWjq2vFmQLcczBUBj0rbealrxs3B6CRP5K5H5GXFWrOigUBXbydG/iyaPsLTRgEbSFb6okYOKCiyUupslKXDptv1ua+/ebPTG2UHB8kybwCX1E45FaD84P8EPSj72vZKQe3XiM7Sy2SGxRkmNvFi1DmE82dBoCyA5iStwWDqlxldlwI4Zu8ngU9ZkH9Ox72Jbzpyw+9xor4uodUJLlMdQAnAvRJ4xYtECwUSlrzOj3Z1smDbZNIxKbby51L8uRR3dvyTenWogK32mW2fMB219I+JQmjw3b8q+7NXI6DXa3KDRGLxS/Bfk5QQJQz3pWg+7y2j5TM5GlNZzE8mnMbQaTaqKr60LXkOKkTLZ+knYEFOyMr6vmRhi2PVgbRmQmidjHHz5L9x1wH6ya/RO1n8K69VES4xxNSv/Bvue11AjAZlGUzTIhDBE7o7yc0F7Y8WStc39x3s3Y8dCvj/uumkdABt83zmf6xgyLEOSoWr7Ex8DRy+A+qFRu+088AlCLlnnYwZyDoryFnQIWmoSShfHjJdpjQ2ujJ0qwxDArvB1C/+fQuQnkhQ== 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)(136003)(376002)(396003)(366004)(39860400002)(346002)(451199015)(36756003)(86362001)(478600001)(316002)(6486002)(66476007)(8676002)(52116002)(7416002)(2906002)(6666004)(5660300002)(44832011)(66946007)(41300700001)(8936002)(66556008)(4326008)(6506007)(38100700002)(26005)(38350700002)(6512007)(186003)(83380400001)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /GvBuRMnFE7mtWANEHykkc1oc2i5x3MZp/AWpoBoNB9xp0f538e6Kj4oMAWCeyRaDcyxNA/KRnqMnBdrtifGgkDkll+lFKRB1v9Icc2LftSswE/4zVbUtVNyDK7C4PeHI07eLnJ+nJre0cksIB/obWI4XvM2Svd/jEwIVtqO/b/adNbE0YFZmxJhnucAj1Tm2LerEQdRnEG7ENUoNy977cBJlrcOmfYX/U/UVEgz8T/pYtg7Y2MgjP5ZLRT2ZfvmrGQfeWOwanBReZ061uKLQwmfJ7WOD/N6sItNgvsXxc5X2JiVYsbA6fbm5dFEzaT85wHsM5AgZq3Ps4Mq1Nm96tlLe5DGg1pp/mh2HFkzLMz5Oh6H3NxL0mrT33toSxT+DfXdOO0v8FhfXIa9ag+eKEW9eVulWO0eloLtrBjyXvIe1N1BZGrMkfIsRJ3J6IDs7455s3INZtnwYrhhz5xQ7YQRsOzw2nHsXZhealqWW2rYJRQktHHtWxl+NJXGVAXE4wAsoZ0SOa2Dk2IZJ7VitLBImR+vvw/qnyXMDVEsRVfYQi35kDx1PJyIYHf+5n9cLkmRSAG8/puL5DIrFItxP523c9XkPqyrlU5vEAqaMqureJRLfE15/20HkDidWqwWu3lZwYzJRmH/OLrhSJ2HTxJO8jEuvO+cY+C3M/ZULs2AmBu7ydbiOlcgi3UI0usYj8Qy/545YLC5bTNvkQDZKO9kV9bAi1tfPj/cGwe5J40jELW9Ca3F0iyuoD2wbtHQER5+GIxyr82Cf0WogQiV4hJnw7tDaK6Y499MqxH+7YM7V1q//7Sgbeeq45ExsBnUS8AGCKlAam10p5ADmWt3NU+vAHkh60NKGNZL3t8nvPXQMn23uaKVIWUzi+mNoOayrF73jCeiVIU+vi/7+iaXdYeMhteb8HrqfAYRkuo8p+2i85lLuV3eFDBoZke+LVjbQ+Z/bPJYtEWeshY+IYUGXbBqktIaBNC1Z0hxjHgYu9Xjr9f4T13H7p9LFEmezEpAWnE4A5UjNr61XZCizcGeFv2m1dISKfzyNto0yFTd6+rQrmJPc3/N1DdlT047tyDekq978DAH49JcEIiXxUMWqCeGxEGw+gfb46SlHvmUoypkOnCMD6gnHykHkEW9rM1ZV66dUIwfnURXEinJuAcdsHYLX2C9eaerKO+Pcl9auGiOKwia3tWT5h9T1DmDwPRLAMSABvXmQxvpcTUizpPqXp/o0ExNgl75GGmc1VR7N5FmmymKxXdyeh5dYSkNgllPmDJ84wDb3VvUh8vn/Gd3898Ft4mhgJeth6ZosCEA6um6SLlUkac6WL8EgUNoo68x10DE8o658xeYs1azBkCWzfjN6Vijy/fqJIoGs+1m8iRgnia1blPpATO3aR7flZJQm4zUv1qQkCFJ+K8HOMb6tXI+CkpU9hA0f0Gmssmu+6gTDMzK216t6PPldk7m1Menaijqw411zwIh3caqIAaI0iw6YucmXndInzpmEvyR6Wnomx5qvMeNqGCONB8g2ylWPALNrB73UmunRh/ggXljAacxzTWIrTs90rIfGn2L2z9r/ZDvMqd6dfZbJFcvJYpz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 137a8540-4fb3-4161-a8a0-08dae237ff1f X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2022 03:12:15.9408 (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: r5KI4vVUpng7hdCA0BypxJ0WkB0jVAgu1NWFJ4DwSdjFaMNJ/KuJismgPnjE95uDKthahxmfCbpHQZOK644cIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9405 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_191228_360012_4A8B24E7 X-CRM114-Status: UNSURE ( 7.40 ) 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 the imx8 jpeg codec support ISO/IEC 10918-1 Standard Baseline and Extended Sequential DCT modes. it can support 8-bit and 12-bit per color samples. Currently we only enable the 8-bit jpeg, and we can enable the 12-bit extended jpeg with the new defined 12 bit pixel format. Ming Qian (10): media: Add P012 and P012M video format media: Add Y012 video format media: Add Y212 video format media: Add Y312 video format media: Add B312 video format media: Add B412 video format media: imx-jpeg: Refine the function mxc_jpeg_find_format media: imx-jpeg: Clear slot next desc ptr if config error media: imx-jpeg: Decoder add support for 12bit jpeg media: imx-jpeg: Encoder add support for 12bit jpeg .../media/v4l/pixfmt-packed-yuv.rst | 70 ++++ .../userspace-api/media/v4l/pixfmt-rgb.rst | 44 +++ .../media/v4l/pixfmt-yuv-luma.rst | 11 + .../media/v4l/pixfmt-yuv-planar.rst | 94 +++++ .../media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c | 19 +- .../media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 5 +- .../media/platform/nxp/imx-jpeg/mxc-jpeg.c | 326 ++++++++++++++++-- drivers/media/v4l2-core/v4l2-common.c | 6 + drivers/media/v4l2-core/v4l2-ioctl.c | 7 + include/uapi/linux/videodev2.h | 9 + 10 files changed, 565 insertions(+), 26 deletions(-) Reviewed-by: Mirela Rabulea Tested-by: Mirela Rabulea