From patchwork Wed Oct 4 09:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues Fruchet X-Patchwork-Id: 14901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6f87:b0:13f:353d:d1ed with SMTP id tl7csp2488052rwb; Wed, 4 Oct 2023 02:16:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpJq9aAldNXRuO2GRGaLZmZToooxog7iUzMGZMtSfSSVOiBbxHkM0GCPkS4dRactJVMWxE X-Received: by 2002:a54:449a:0:b0:3ad:fb3a:4b6 with SMTP id v26-20020a54449a000000b003adfb3a04b6mr1699479oiv.41.1696411012797; Wed, 04 Oct 2023 02:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696411012; cv=none; d=google.com; s=arc-20160816; b=PDIE0xG0fa1yRLvDO+guOvTHcFfIyeuw/Erghxid+pg8YTFyNZ+DQyP64eWcqds+2x Em0TqzqU0mMP+szGo2jpkcZi/fg5FZSA6rj8Xcpa00uv462nE5KBJSkp1PpVdtYMteWH s+z8cvQdTiTP67vC6LS+1eq8f3nUqvQtr3RJAlCKxD39O4WmUOnUw2m8uOIy7ky6I8XO zCMKu+F6P2OiCBYMEr3Uf7Y2iaaSMVBQALCoOFFOsNNomL0wTvkdhst+5yAvxal9MJ93 plEj7US0GTwDwNSWG8se2gmIk7Jen7qV8qo6eM6aM61MoZSYgeJwp3gXhym6gAQW3Odt 5qVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=H9wD0gTt+mkq/DOzMMafrG+djMfE5iECoB38jzPVI5w=; fh=ItXiUQa06G5NtzfQ6MBP/cGHELTOauPzcHi5SmTT7Sw=; b=xPKSLRkK3/MTMRc/bNpXZwqDq/hWeursypwVth6cmVBCds71xqCVto82Xd1hc62T24 0efR8b2DPGRyMWC7FqB8QCDMBrkZSbzx7xNparULsf93p4ncakCObieD+IxPf65F3NFV vXVqGCSpCFDxuolsl0jlswzK6loFB+NVBMFGcCbJ4E9b5QAGKR4SUw6k2mXtrHorvbjX 3ZJFNbwrRookcJi2PlAYdaOjd7WhvUKxXdYXcPTl8yEhLC8eC01l3A4SMO2b3IwDNeVi uab12I6wdsBhCDeuoZnKCwjX3MAsZ7tSweITRwqXHjX7fcbcWd5CbjPhCDU0XNRSZPdR 33fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=OUB8C4Le; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j70-20020a638049000000b005859bd29c5bsi3423390pgd.723.2023.10.04.02.16.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:16:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=OUB8C4Le; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0097F8339658; Wed, 4 Oct 2023 02:16:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242005AbjJDJQk (ORCPT + 18 others); Wed, 4 Oct 2023 05:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242126AbjJDJQd (ORCPT ); Wed, 4 Oct 2023 05:16:33 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F994A7; Wed, 4 Oct 2023 02:16:29 -0700 (PDT) Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39450iXO026794; Wed, 4 Oct 2023 11:16:00 +0200 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=H9wD0gT t+mkq/DOzMMafrG+djMfE5iECoB38jzPVI5w=; b=OUB8C4LeEMgys6L8eCVKok/ ytJ+t6z6jGwmthPPKi/+XRrp/BrcP0Etnmma8coqiMFrVpdmp1I6hyMmK4n6zeh8 UkwWzt02uCt5b/Exr3YSpBp2DkaIxSlfwiMnduNkUxkOkAXRiATZmBCK4L5Lr35i JcomaICqZlbvzo4EIbsxAM+03xmToUA9gRkeXGvvOYCmhg0PMDYsFyN/8IZhDaFp R/R4cxvzN3oEVUp5sU+IRNWmRHV0WrB91D3pbWl06xCdRM7Vs2K0quu+HjXCkcqG BiD086epi3+Tr8MF93e9ol6S+QrRmDImvhnO290K1OVLFE5w0hLFCT6KqtGU5WQ= = 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 3tew80nsd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Oct 2023 11:16:00 +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 D0B78100053; Wed, 4 Oct 2023 11:15:58 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C39A422A6DB; Wed, 4 Oct 2023 11:15:58 +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; Wed, 4 Oct 2023 11:15:58 +0200 From: Hugues Fruchet To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Hans Verkuil , , Maxime Coquelin , Alexandre Torgue , , Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , , CC: Hugues Fruchet , Andrzej Pietrasiewicz Subject: [PATCH 0/7] Add support for video hardware codec of STMicroelectronics STM32 SoC series Date: Wed, 4 Oct 2023 11:15:45 +0200 Message-ID: <20231004091552.3531659-1-hugues.fruchet@foss.st.com> X-Mailer: git-send-email 2.25.1 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.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-04_01,2023-10-02_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:16:52 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778815874331792891 X-GMAIL-MSGID: 1778815874331792891 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. Hugues Fruchet (7): dt-bindings: media: Document STM32MP25 VDEC video decoder media: hantro: add support for STM32MP25 VDEC dt-bindings: media: Document STM32MP25 VENC video encoder media: hantro: add support for STM32MP25 VENC arm64: dts: st: add soc & rifsc structure to stm32mp255 arm64: dts: st: add video decoder support to stm32mp255 arm64: dts: st: add video encoder support to stm32mp255 .../bindings/media/st,stm32mp25-vdec.yaml | 56 +++++++ .../bindings/media/st,stm32mp25-venc.yaml | 56 +++++++ arch/arm64/boot/dts/st/stm32mp251.dtsi | 12 ++ arch/arm64/boot/dts/st/stm32mp255.dtsi | 21 +++ drivers/media/platform/verisilicon/Kconfig | 14 +- drivers/media/platform/verisilicon/Makefile | 4 + .../media/platform/verisilicon/hantro_drv.c | 4 + .../media/platform/verisilicon/hantro_hw.h | 2 + .../platform/verisilicon/stm32mp25_vdec_hw.c | 92 +++++++++++ .../platform/verisilicon/stm32mp25_venc_hw.c | 147 ++++++++++++++++++ 10 files changed, 405 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/st,stm32mp25-vdec.yaml create mode 100644 Documentation/devicetree/bindings/media/st,stm32mp25-venc.yaml create mode 100644 drivers/media/platform/verisilicon/stm32mp25_vdec_hw.c create mode 100644 drivers/media/platform/verisilicon/stm32mp25_venc_hw.c