Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp197715rdd; Tue, 9 Jan 2024 00:52:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHseiogpC/XhCcofgCYQ6Mrmc6OhcsbqTF3xQT381aFWRnnNmiosdEKB0lujSJ266IXj5aY X-Received: by 2002:a05:6a20:12cb:b0:199:9541:c624 with SMTP id v11-20020a056a2012cb00b001999541c624mr5043350pzg.101.1704790374516; Tue, 09 Jan 2024 00:52:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704790374; cv=none; d=google.com; s=arc-20160816; b=DEDhGgZPdvyK2a94PY+lg/mXs8bOPY6WOdJM6rluvJB4pviUs8t6lIJxKDPBDQVzc0 fMtoPc665lBjDBMXY+6nhdxxw4xkKniEfYeCOimHQlyjIsDJZXhx27pwwRpc86OpH1V3 0IA7aILQNmWVl4TAC39Flg5cddLvY8+nK92X9kRjMnLVEHxmKpNlKJE5KKv5MZaTaU+r vmXD7iBxAvMX+86dFRbtFVMoGskzpvYLBzm0ChGWs2SxgFu679J11oUYrFG+ohAVs9MA rEAGARSyVWIDA5k8kg0Qvsj0KuWXEtGafCKMRJOQV2ICAhxFfl54ZC/V0rwSFLhwSevK 2ZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=mEkudfnbPoeAGsN0k1FwZZxBRhXTdPPOdbTjUnhj2ac=; fh=d3+8QaZL5Q12BYNNjvgOop8BJQqBBykIHDvrQ47QtiM=; b=TSqyczLPVGL29eCM/e1PBmYudIXNjb7wqt13ppc7wLWQt+KXUP69HqJGfBIYBj8fda 3+5OTEq+5wIfasivWT5IGNvIvkE7mREzBMYpxkOCb2+x0xLMhfAjBwr7WDKSPOzSBlrM k/krfcYZJYaX8iB3ZK9uUMDig6oPHste8xamJlorSqRPsPIQUUSfilUScTdUnSwGhAcP NiFnl75j/gHlejZ+2NArrByqFaC7k2kDep2Fvbu7VtvU+trcGo92LHOUBkUy9UHRSMtm xiWFxOdcaoEWpG7rFtz2XdlmWzbneAPbE1Zqs5mEm6NTdnu8HCgxbHFrNXRZh3Wd1q5Y jhow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=uEKeNxaU; spf=pass (google.com: domain of linux-kernel+bounces-20616-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i33-20020a635861000000b005ca4098bf5esi1095736pgm.613.2024.01.09.00.52.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 00:52:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20616-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=uEKeNxaU; spf=pass (google.com: domain of linux-kernel+bounces-20616-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B2A2D286432 for ; Tue, 9 Jan 2024 08:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C91D2D7AF; Tue, 9 Jan 2024 08:52:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="uEKeNxaU" Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF3712E636; Tue, 9 Jan 2024 08:52:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 409343pj004773; Tue, 9 Jan 2024 09:52:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=mEkudfn bPoeAGsN0k1FwZZxBRhXTdPPOdbTjUnhj2ac=; b=uEKeNxaUxpDuWX9I9PBRmTg 7usMLb5ibtMCzRX1/81ZCLaXYDEwAoYL+ld2Ay3EFsq+X7fDpG+xqtR9QU++ypKj NO9A4LEfAEq67s5zc05IbWY7AniR3uzKgdTWdQBOi1R1PlVQ/2vmZXOPNanFBmTB AOyZ+1hUUeKNLpeonOWqQyrLD+L9zbNOXf3yZcdHAicwLWhPysshMWaeeh2GPQiP CvLoaCJpuTBp8nbLsc/KaqZsJ1l4maqgO/GF7sPTvXpqxVOoqFmCXQTfo580REyh MspEwkURmFYh+YuI8qsFi2mHY9oc4pdIyUhc0uUjy2dkvojvFWURABawLGaONBA= = 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 3vey30jr8m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jan 2024 09:52:04 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DC1C710002A; Tue, 9 Jan 2024 09:51:59 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C852E22FA2D; Tue, 9 Jan 2024 09:51:59 +0100 (CET) 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; Tue, 9 Jan 2024 09:51:59 +0100 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 , , Maxime Coquelin , Alexandre Torgue , , , , CC: Hugues Fruchet , Marco Felsch , Adam Ford Subject: [PATCH v6 0/5] Add support for video hardware codec of STMicroelectronics STM32 SoC series Date: Tue, 9 Jan 2024 09:51:50 +0100 Message-ID: <20240109085155.252358-1-hugues.fruchet@foss.st.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-05_08,2024-01-05_01,2023-05-22_02 This patchset introduces support for VDEC video hardware decoder and VENC video hardware encoder of STMicroelectronics STM32MP25 SoC series. This initial support implements H264 decoding, VP8 decoding and JPEG encoding. This has been tested on STM32MP257F-EV1 evaluation board. =========== = history = =========== version 6: - Use a single file for VDEC and VENC variants as suggested by Alex Bee - Fix some typos raised by Sebastian Fricke - Add Krzysztof Kozlowski Reviewed-by version 5: - Precise that video decoding as been successfully tested up to full HD - Add Nicolas Dufresne Reviewed-by version 4: - Fix comments from Nicolas about dropping encoder raw steps version 3: - Fix remarks from Krzysztof Kozlowski: - drop "items", we keep simple enum in such case - drop second example - it is the same as the first - Drop unused node labels as suggested by Conor Dooley - Revisit min/max resolutions as suggested by Nicolas Dufresne version 2: - Fix remarks from Krzysztof Kozlowski on v1: - single video-codec binding for both VDEC/VENC - get rid of "-names" - use of generic node name "video-codec" version 1: - Initial submission Hugues Fruchet (5): dt-bindings: media: Document STM32MP25 VDEC & VENC video codecs media: hantro: add support for STM32MP25 VDEC media: hantro: add support for STM32MP25 VENC arm64: dts: st: add video decoder support to stm32mp255 arm64: dts: st: add video encoder support to stm32mp255 .../media/st,stm32mp25-video-codec.yaml | 50 +++++ arch/arm64/boot/dts/st/stm32mp251.dtsi | 12 ++ arch/arm64/boot/dts/st/stm32mp255.dtsi | 17 ++ drivers/media/platform/verisilicon/Kconfig | 14 +- drivers/media/platform/verisilicon/Makefile | 3 + .../media/platform/verisilicon/hantro_drv.c | 4 + .../media/platform/verisilicon/hantro_hw.h | 2 + .../platform/verisilicon/stm32mp25_vpu_hw.c | 186 ++++++++++++++++++ 8 files changed, 285 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/st,stm32mp25-video-codec.yaml create mode 100644 drivers/media/platform/verisilicon/stm32mp25_vpu_hw.c -- 2.25.1