Received: by 2002:a05:7412:9c0d:b0:e4:3794:b17d with SMTP id lr13csp2456952rdb; Tue, 10 Oct 2023 02:18:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8nF9k1fRFE9x7buLwW5qQIlQTWmHJGl6TAKGB0lHdlKbydi6JfBg4ZXuFwPSNo7RIJXBJ X-Received: by 2002:a25:ad5b:0:b0:d80:8aa6:5abc with SMTP id l27-20020a25ad5b000000b00d808aa65abcmr16865083ybe.61.1696929498873; Tue, 10 Oct 2023 02:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696929498; cv=none; d=google.com; s=arc-20160816; b=0iCVUEmnKP0sSe+wzsvYc1KF1YX4MXNPzqQtl3x34515OAq87gAA/K1dEcouRmn3pk XZWQGFQz1YVhVM9VgqdhxALTYiF2HUuyMIcKgeXkuCFQnBqJQNNtv4zLesLWddaBXSRD nncch8T8dNWJ7byzObJv6KOMB+L7gclDGOg0fwayufEKUev+5iEFAedLTOOJGM4yhP9o T90r0RAw4bpBqRW/etzLjpKDghvaplS3QU9/Tzb50oyTsi1T96xmPXHHjw49j21z0L7q FoEtwNKqxtR5q+uDSPJ6MKH9ewFwzq5Q3sNPY7c7YRDD2E08lawdffad+TFDQ3pOus5e bq6Q== 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=bQ+mwMv2GMXDQf764N7qmXyJrCQeTnM9Hg+Q5Uk+ITA=; fh=ErwLDw9+98Mb4Q3i5RoHr7UOS7Ns3CK5YbB+qheGbUs=; b=ih2zcSeW87lkm52xh1tEuGOC0qE5GuUMPUduqculAhNHh5B7lr93GkKRs00Wlm/2rs Aa0iSBo0PDjCvTVs/1id3gCEqns3+0E6RibfTaoEz8lTu7xerUPsvoDphYK7qfRTrKmG HHgwH3cWQG4c2ToGM6Ar7JRBWFz1V/Qbfmna0brYwJTeCJBvdPur5mnDcUcgpirJLylX yf7fpEJLsTmgUd7Vyiqc77gMnlkLYgdKvFbDgc0DSM764ZIX9/itZrhB1NPLBnx++X8o WnSA7IIFGHc+TEvlENgLXhyWk1JVRrIKn/NQHAN8qs84ZrFTxnEk7c49ZnmROkK9cKFR MVCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=fncGbiBc; 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 Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x13-20020a65538d000000b00578eafd0826si11240000pgq.398.2023.10.10.02.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 02:18:18 -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=fncGbiBc; 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 49D6B802745F; Tue, 10 Oct 2023 02:17:37 -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 S229788AbjJJJRU (ORCPT + 99 others); Tue, 10 Oct 2023 05:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjJJJRS (ORCPT ); Tue, 10 Oct 2023 05:17:18 -0400 Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366D493; Tue, 10 Oct 2023 02:17:17 -0700 (PDT) Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39A86UJj026211; Tue, 10 Oct 2023 11:16:48 +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=bQ+mwMv 2GMXDQf764N7qmXyJrCQeTnM9Hg+Q5Uk+ITA=; b=fncGbiBcXl7cajFxjY1ruYt /LXieHxa9Q0iv/zqnr4BVrQg5kgegreoqT/L+sgqXLb/y9ybVhIaydBIp6u642lk Dtfcv5U4ChtnTf7GmitNHh+5H4EWYzG+0zG8m1SKDLFSaxAa+sg5Cu50bRO3S77k h+IRMHWJjcigmH+COIP1CEBxo2h1X5PRvkV5WHLbzaBQb070qp5RJK6pELEE+yaR sYthF9lqZINrTEk/jbhcE3nPdm9iUjTJSNEI7OpMmk56CwUb0HQC+5+abYMPwTW1 SzEDRyJHSKOpK7yTNLUGlZAWGGqqKXzCM/yYq5U5iJzCw1yBQmGTW17OPywtODg= = 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 3tkj9gs37j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Oct 2023 11:16:48 +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 D1B6C100058; Tue, 10 Oct 2023 11:16:46 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BE4F621BF69; Tue, 10 Oct 2023 11:16:46 +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; Tue, 10 Oct 2023 11:16:46 +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 , , Maxime Coquelin , Alexandre Torgue , , Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , , CC: Hugues Fruchet , Marco Felsch , Adam Ford Subject: [PATCH v2 0/5] Add support for video hardware codec of STMicroelectronics STM32 SoC series Date: Tue, 10 Oct 2023 11:16:38 +0200 Message-ID: <20231010091643.3666290-1-hugues.fruchet@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-10_04,2023-10-09_01,2023-05-22_02 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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]); Tue, 10 Oct 2023 02:17:37 -0700 (PDT) X-Spam-Level: ** 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 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 | 58 +++++++ 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 | 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 ++++++++++++++++++ 9 files changed, 347 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/st,stm32mp25-video-codec.yaml create mode 100644 drivers/media/platform/verisilicon/stm32mp25_vdec_hw.c create mode 100644 drivers/media/platform/verisilicon/stm32mp25_venc_hw.c -- 2.25.1