From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5391B606A6A0 for ; Wed, 2 Dec 2026 18:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EzsqXMCP; dkim=fail reason="signature verification failed" (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=Ftn45ANj 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-Unsubscribe-Post:List-Owner; bh=6nZ3TBbuaa1uJ/AEk4pI4kUviQGpbNcG4zmBUp2qPsM=; b=EzsqXMCPBDz7vJe7zAJamt1Xbc OWhBRqQluKVxQS67rPKmgY1uly9RvEQyK7mAXTJ1E8QLD+Z0upnZ2F87Ne6kzoXR8JUnSgru/eASt TROYySlk3BZ+LKgTm9gxl+IpIMl7omoM4ibeK2kPgyw8iXG1fiwbP5E/HaduQD9P7onTh9rgl8sZm WlcAE1thi37DFsnjCMQL7/fY0DCpeoTah5yqkvPaAl8ebQYOuXT7W8j5BeefJiy2QZb1adJqWAILu A2pQqBUdq5lvDHUNXcour3+KtofLw6RXI+eL1QabHaBwcC/QoE7V5iIlP45hpK7hdG34PD1ymsPbg yN5wfCwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYpAW-0000000CYk6-0XNY; Wed, 02 Dec 2026 18:35:04 +0000 Received: from sender6-op-o11.zoho.com ([165.173.180.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYpAT-0000000CYj5-0GF0; Wed, 02 Dec 2026 18:35:02 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1796236458; cv=none; d=zohomail.com; s=zohoarc; b=E8wpmDlJWwS+pMCP2wlfLo8VcerHYIvCsJLH9UMXe6b0GuFifA3zqq6d1KkX159hVv5DVe3TNVvJllM1Zx4aGmMDLmrDktYln46m1KGXNS1riBnHkWMiWHlHShXYe9kO7gTGxRLurl8UQVxK/3VAQJSoWzhEpDrTfwfwNnlFImk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796236458; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=2ouKyB/ksshCNy79MM5SkmQYaJM8iUmYg86YBAUvDJg=; b=HCsruwk4jo+UiESBKC2Ky0Ef9HMIkKBvsuGeP/+duLq8OUpG/sVB4fQ5BkZyqmoQhLYLwWoOvgSgb2XYM1EfTqhMFgX5NXh4pR7TTEFaNCnxVeYhxqJP2+LX3vJnmqs4yLo5ROhhQKiB40VM8S3Di/UdchOqP1UsfdF/7sHb7M0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=detlev.casanova@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=Ftn45ANjqALhNd8YbutPPoAcypx2WzdRJ55Liz4zKqcXoBYmXM0pmMT1+mgPzGOy5WE/aWj3ZmMkJvTvBAclAJ36sydexD2lvc1PNbLNNZo7JNaM2NF/MTZeoysfUr5+XRLkOrmE0tRBCqazmmxnlD+S+Ut8aGIbN03ZfOunKhw=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=2ouKyB/ksshCNy79MM5SkmQYaJM8iUmYg86YBAUvDJg=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 179623645659827.36550352070776; Wed, 2 Dec 2026 10:34:16 -0800 (PST) From: Detlev Casanova To: Nicolas Dufresne , Daniel Golle Cc: Paul Kocialkowski , Mauro Carvalho Chehab , Hans Verkuil , Heiko Stuebner , Ezequiel Garcia , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Brian Masney , Jerome Brunet , Philipp Zabel , Sakari Ailus , Michael Riesch , Mehdi Djait , Gerald Loacker , Dustin Lundquist , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [RFC PATCH 0/6] media: rockchip: RKVENC v1 H.264/HEVC encoder for the RV1126 Date: Wed, 02 Dec 2026 13:34:13 -0500 Message-ID: In-Reply-To: References: X-Archived-By: MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_103501_223484_264A9601 X-CRM114-Status: GOOD ( 33.77 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Daniel, On Tuesday, 1 December 2026 09:44:57 EST Daniel Golle wrote: > Hi Nicolas, Detlev, > > A follow-up on question 3 of this RFC, after reading the VEPU510 > thread [1] again. There the deciding criterion was memory protection: > an encoder that can confine its DMA through an IOMMU gets the > DRM-style driver with Vulkan Video in Mesa, and the V4L2 stateless > interface is for hardware that cannot. RKVENC v1 has its own IOMMU > (two MMU instances, venc_mmu in patch 5/6), so by that criterion it > belongs on your side, not under a V4L2 interface. My cover letter did > not take that into account. It is not that set in he stone, encoders with an IOMMU can have a v4l2 driver, but the DRM-style driver requires an IOMMU for security reasons. That being said, because of how device tree influence the IOMMU subsystem, it is possible that both v4l2 and DRM-style driver can't live together easily, because the DRM-style driver will probably have to manage the IOMMU itself, whereas the v4l2 driver can just rely on the IOMMU subsystem. > So, more precisely than question 3: > > 1. Is RKVENC v1 (RV1109/RV1126 "vepu541", RK3566/RK3568 "vepu540") in > scope for the DRM and Vulkan Video work, or is that limited to the > VEPU5xx generation (VEPU510/VEPU580) for the foreseeable future? I see no reason why they wouldn't qualify for the DRM-style driver, as long as they have an IOMMU. > 2. If it is in scope: is there a branch or a description of the > kernel interface I could start from? The RV1126 back end (register > image builder, recovery, devfreq and cooling) would carry over, and > I would rather contribute it there than build a V4L2 driver you > would then have to retire. One practical point for that path: the > RV1126 is a Cortex-A7 camera SoC without a GPU, typically running > OpenWrt or Buildroot with GStreamer serving RTSP. Is a GPU-less > Vulkan Video device in Mesa something you expect to be practical on > such targets? My current working branch is at [1] (rust kernel driver) and [2] (mesa UMD). Make sure to always have both synced as the uAPI is not stable yet. There is a preliminary Variant support (vepu580 + vepu510) in the kernel (same repo but branch detlev/tyr-dev/rkvenc-variants), but not in mesa yet. Part of the work was to create the mesa vkcodec vulkan video driver, to have an UMD only for video, not linked to any GPU. The kernel driver manages iommu/clock/power/reset... While mesa translates Vulkan Video commands to register values for each HW. The interface allows userspace programs to send register values to the driver for writing (the driver also validates values and ranges). Address registers, in the uAPI are passed as BO handle + offset in that BO and the driver translates that to a DMA address. Userspace is then signalled by a fence when the work is done and gets the register values it requested to be read back (like the output bitstream length) > 3. If it is not in scope: would a V4L2 driver be acceptable for it? > Paul's stateless encoder series needs a second implementation from > another vendor [2], and RKVENC v1 would be one; I have offered it to > him in that thread [3]. Your concern in [1] was that an exposed API > cannot be transitioned later. Without DRM work planned for this > block, the V4L2 driver would be its only interface, not an interim > one. As mentioned, there is work (close to an RFC) on the DRM side. Using the DRM subsystem is more future-proof (beacuse of the move of complexity to user- space and simpler uAPI to maintain. e.g.: FFMpeg officially still has no support for v4l2 stateless decoder) > On the rest of the RFC: the Sashiko findings and the Media CI checks > are being worked through, the bitstream overflow handling in > particular. Question 5 is settled: I have an RK3568 board and will > test the vepu540 variant before the next version. The next version > waits for your answer here, since it decides its shape. > > Dustin, thanks for testing this on the Comet. Noted that your > Tested-by covers H.264 only. Detlev, [1]: https://gitlab.collabora.com/detlev/linux [2]: https://gitlab.freedesktop.org/detlev.c/mesa _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip