From patchwork Thu Oct 5 13:37:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues FRUCHET X-Patchwork-Id: 13410029 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 1A92AE9370D for ; Thu, 5 Oct 2023 13:39:25 +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:References:In-Reply-To: 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: List-Owner; bh=d4u301xgUmUmNxrFWc1b06fnOeYfXl172zMoU4mhWgw=; b=ufrTHoEjTgOEaE UmmK5Ft3lDtOhQKV5p7ehBC8L19G5rE+VrtbIYuGN90i6+O4BrxnJK6MIuEZ6nEjTQbzATiVqj1hO idCrGl9s7TJdAh+JrCvjj8W5VTfUtS+QBJMG2BIoQ54hZO1GVsxMUySPvYX5oXxYA4kI2yyrp8RnL xssXC0rE1wRIAoAQ+L1+b2scc7xZV17bsEkOK5A+xQe6VL0xZHg+v+GSSkenpSPRQHiD06z/7fMUW 1gmuvQqRRmACdsgHdtPVJkSCvwU1ae3SFouznhiunxhuPE/v3sZZ72wEpt5EYN/wo+tmy75CDoOQw s7HdikgJEpzOt8YJ2Cmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoOZ8-003VTM-19; Thu, 05 Oct 2023 13:38:58 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoOYx-003VIV-1s for linux-arm-kernel@lists.infradead.org; Thu, 05 Oct 2023 13:38:55 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 395Bswiw002759; Thu, 5 Oct 2023 15:38:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=fjq+jjfSImcfRAA7FzJY437jVyVi0XlHt5CTjFzYrtw=; b=ho VIh7PUxONpr3zjZu8GPx7BhlUyUGVD0ptlu8813T6KWB6ryiutNDhq4wzC8iolpV GOWm5vvKt74kk4qyHgt7qxj72QHAY33YR1BNuSzEEc9IvySv4iZj5GQDTrx5xbH9 l194XIe10ohCjv1AlWftK/9xj+em4bd+eRSbWBqhmWo1v7bGIXJp7oOJuIPgIxNW 0d/gxtvmW0yyvy0UUssOi5e2iVnPLpVh8Dw3WiCQ1lWO7h/CHexz+fxxXXOjWCPO url5siOAj23iqJD6VT8jdYuJRIG2qcc7ItIoUxMxqeukiZnme1JInMcaYUFyGa1C 12F1feWmPS8BpXJKNxPg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3thvpjgdrx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 05 Oct 2023 15:38:38 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 38DFF10005D; Thu, 5 Oct 2023 15:38:36 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 301D722FA2D; Thu, 5 Oct 2023 15:38:36 +0200 (CEST) Received: from localhost (10.201.20.120) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 5 Oct 2023 15:38:35 +0200 From: Hugues Fruchet To: Ezequiel Garcia , Philipp Zabel , Andrzej Pietrasiewicz , Nicolas Dufresne , Sakari Ailus , Benjamin Gaignard , Laurent Pinchart , Daniel Almeida , Benjamin Mugnier , Heiko Stuebner , Mauro Carvalho Chehab , Hans Verkuil , , , CC: Hugues Fruchet , Marco Felsch , Adam Ford Subject: [RFC v2 6/6] media: hantro: add NV12 single-plane support for STM32MP25 VENC Date: Thu, 5 Oct 2023 15:37:10 +0200 Message-ID: <20231005133710.3589080-7-hugues.fruchet@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231005133710.3589080-1-hugues.fruchet@foss.st.com> References: <20231005133710.3589080-1-hugues.fruchet@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.120] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-05_08,2023-10-05_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231005_063847_966773_5B078ACD X-CRM114-Status: GOOD ( 11.12 ) 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 Add support of encoding from NV12 single-plane frame. Signed-off-by: Hugues Fruchet --- .../media/platform/verisilicon/stm32mp25_venc_hw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c b/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c index 2176eccd1f79..d66f20bee9eb 100644 --- a/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c +++ b/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c @@ -21,6 +21,19 @@ */ static const struct hantro_fmt stm32mp25_venc_fmts[] = { + { + .fourcc = V4L2_PIX_FMT_NV12, + .codec_mode = HANTRO_MODE_NONE, + .enc_fmt = ROCKCHIP_VPU_ENC_FMT_YUV420SP, + .frmsize = { + .min_width = 96, + .max_width = 8176, + .step_width = MB_DIM, + .min_height = 32, + .max_height = 8176, + .step_height = MB_DIM, + }, + }, { .fourcc = V4L2_PIX_FMT_YUV420M, .codec_mode = HANTRO_MODE_NONE,