From patchwork Wed Aug 13 16:51:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Lannynd X-Patchwork-Id: 68465 X-Patchwork-Delegate: reatmon@ti.com 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FC6CCA0EE4 for ; Wed, 13 Aug 2025 16:52:01 +0000 (UTC) Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) by mx.groups.io with SMTP id smtpd.web10.1529.1755103912669459711 for ; Wed, 13 Aug 2025 09:51:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=N8riePEA; spf=pass (domain: ti.com, ip: 198.47.23.235, mailfrom: t-lannynd@ti.com) Received: from fllvem-sh03.itg.ti.com ([10.64.41.86]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57DGpqXt2191832 for ; Wed, 13 Aug 2025 11:51:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755103912; bh=o9Fi1emYi5XLe66SdIzkXKW+wDoEFwC7L8VWQ/OiT7o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=N8riePEAthkuxNZy436VCf94M55vsYE+9Nnj7a1k34b09qOuas0o6XbDTJjA/M7U4 B5xyt70hzEoNeQt+1eAobWiF447FAr8nLchEXcar36To6WbuVh6o4GFuRji/WI7FlO l1j3sWZlv16Owblq56mmoUWURG4lAtbf9jt2w9OI= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllvem-sh03.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57DGpqL6527018 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL) for ; Wed, 13 Aug 2025 11:51:52 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 11:51:51 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 11:51:51 -0500 Received: from uda0867391-2.dhcp.ti.com (uda0867391-2.dhcp.ti.com [128.247.81.58]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57DGpo9x2292823; Wed, 13 Aug 2025 11:51:51 -0500 From: Thorsten Lannynd To: , CC: , , Subject: [meta-arago][scarthgap/master][PATCH 1/5] meta-arago-distro: chromium: upgrade to 132.0.6834.83 Date: Wed, 13 Aug 2025 11:51:44 -0500 Message-ID: <20250813165148.220012-2-t-lannynd@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813165148.220012-1-t-lannynd@ti.com> References: <20250813165148.220012-1-t-lannynd@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 Aug 2025 16:52:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/16362 Upgrade the files to chromium v132.0.6834.83 to match the version we are using in scarthgap/master. This patch is needed to make sure the patch is applied correctly by keeping the version number consistent. Signed-off-by: Thorsten Lannynd --- ...omium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch | 0 .../chromium/chromium-ozone-wayland-arago.inc | 7 ++++++- ...ppend => chromium-ozone-wayland_132.0.6834.83.bbappend} | 0 3 files changed, 6 insertions(+), 1 deletion(-) rename meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/{chromium-ozone-wayland-130.0.6723.91 => chromium-ozone-wayland-132.0.6834.83}/0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch (100%) rename meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/{chromium-ozone-wayland_130.0.6723.91.bbappend => chromium-ozone-wayland_132.0.6834.83.bbappend} (100%) diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-130.0.6723.91/0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch similarity index 100% rename from meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-130.0.6723.91/0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch rename to meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc index 3573c112..d28acc9e 100644 --- a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc @@ -1,6 +1,11 @@ PR:append = ".arago0" -FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland-130.0.6723.91:" +FILESEXTRAPATHS:prepend := "${THISDIR}/chromium-ozone-wayland-132.0.6834.83:" + +PACKAGECONFIG[use-v4l2] = "use_v4l2_codec=true,use_v4l2_codec=false" +PACKAGECONFIG:append = " proprietary-codecs use-v4l2" + +CHROMIUM_EXTRA_ARGS:append = " ${@bb.utils.contains('PACKAGECONFIG', 'use-v4l2', '--ozone-platform-hint=wayland --enable-features=AcceleratedVideoDecoder,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL', '', d)}" SRC_URI:append = " \ file://0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch \ diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_130.0.6723.91.bbappend b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_132.0.6834.83.bbappend similarity index 100% rename from meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_130.0.6723.91.bbappend rename to meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_132.0.6834.83.bbappend From patchwork Wed Aug 13 16:51:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Lannynd X-Patchwork-Id: 68466 X-Patchwork-Delegate: reatmon@ti.com 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD4E7CA0EE5 for ; Wed, 13 Aug 2025 16:52:01 +0000 (UTC) Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) by mx.groups.io with SMTP id smtpd.web10.1530.1755103914276698342 for ; Wed, 13 Aug 2025 09:51:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IJPDNkjE; spf=pass (domain: ti.com, ip: 198.47.23.235, mailfrom: t-lannynd@ti.com) Received: from fllvem-sh03.itg.ti.com ([10.64.41.86]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57DGprLc2191838 for ; Wed, 13 Aug 2025 11:51:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755103913; bh=mbXC3A+utcHNR1ntsucVr5UVqO4UWYi0kBv7XaTLicA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IJPDNkjEKznmTM/Q1H7JlP54k7tMMCSg57xxxWYzB2l13uxa8e9jwQco5QFlwf44A kVI4hIHSlws7+//1OXE2+zJ7z7TwqP7kAi7XJYyzlttKX7oFStoB0qIFKnvLDLwHvh 12CHx7d6n07G8KmM2rzcLP/OLNstRRRYX/bRqesM= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllvem-sh03.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57DGpred527027 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL) for ; Wed, 13 Aug 2025 11:51:53 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 11:51:53 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 11:51:53 -0500 Received: from uda0867391-2.dhcp.ti.com (uda0867391-2.dhcp.ti.com [128.247.81.58]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57DGpoA02292823; Wed, 13 Aug 2025 11:51:53 -0500 From: Thorsten Lannynd To: , CC: , , Subject: [meta-arago][scarthgap/master][PATCH 2/5] meta-arago-distro: chromium: enable V4L2 stateful decoder Date: Wed, 13 Aug 2025 11:51:45 -0500 Message-ID: <20250813165148.220012-3-t-lannynd@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813165148.220012-1-t-lannynd@ti.com> References: <20250813165148.220012-1-t-lannynd@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 Aug 2025 16:52:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/16363 Add patch that enables the V4L2 stateful decoder in Chromium by making sure that Chromium is opening the right V4L2 device path for Linux. Signed-off-by: Thorsten Lannynd --- ...pu-v4l2-enable-V4L2-stateful-decoder.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0002-chromium-gpu-v4l2-enable-V4L2-stateful-decoder.patch diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0002-chromium-gpu-v4l2-enable-V4L2-stateful-decoder.patch b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0002-chromium-gpu-v4l2-enable-V4L2-stateful-decoder.patch new file mode 100644 index 00000000..ca94d2ab --- /dev/null +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0002-chromium-gpu-v4l2-enable-V4L2-stateful-decoder.patch @@ -0,0 +1,34 @@ +From c9a81537eb0bc1f11ea902cb9abe4d98b7be74a9 Mon Sep 17 00:00:00 2001 +From: Thorsten Lannynd +Date: Thu, 7 Aug 2025 14:48:31 -0500 +Subject: [PATCH] chromium: gpu: v4l2: enable V4L2 stateful decoder + +Upstream-Status: Pending + +Setting the video device path to /dev/video0 for linux allows +Chromium to find the decoder and also check that it is stateful. +This patch setups the correct V4L2 pipeline. + +Signed-off-by: Thorsten Lannynd +--- + media/gpu/v4l2/v4l2_utils.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/media/gpu/v4l2/v4l2_utils.cc b/media/gpu/v4l2/v4l2_utils.cc +index 9646e8be73..8bc88e938f 100644 +--- a/media/gpu/v4l2/v4l2_utils.cc ++++ b/media/gpu/v4l2/v4l2_utils.cc +@@ -633,7 +633,11 @@ std::optional GetSupportedV4L2DecoderConfigs() { + } + + bool IsV4L2DecoderStateful() { ++#if BUILDFLAG(IS_LINUX) ++ constexpr char kVideoDeviceDriverPath[] = "/dev/video0"; ++#else + constexpr char kVideoDeviceDriverPath[] = "/dev/video-dec0"; ++#endif + base::ScopedFD device_fd(HANDLE_EINTR( + open(kVideoDeviceDriverPath, O_RDWR | O_NONBLOCK | O_CLOEXEC))); + if (!device_fd.is_valid()) { +-- +2.34.1 From patchwork Wed Aug 13 16:51:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Lannynd X-Patchwork-Id: 68467 X-Patchwork-Delegate: reatmon@ti.com 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4D2DCA0EE6 for ; Wed, 13 Aug 2025 16:52:01 +0000 (UTC) Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) by mx.groups.io with SMTP id smtpd.web10.1531.1755103914724824392 for ; Wed, 13 Aug 2025 09:51:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dR7Jh0Hy; spf=pass (domain: ti.com, ip: 198.47.23.235, mailfrom: t-lannynd@ti.com) Received: from lelvem-sh02.itg.ti.com ([10.180.78.226]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57DGps8e2191842 for ; Wed, 13 Aug 2025 11:51:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755103914; bh=WGpxElWNy/PgnI1WvWhBJ6iq4G1F/tFceurgE92ccgs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dR7Jh0HyIHrlP2Cqd7n2kqGcQqntCtEg/4sChcD65+aB87UACp1LZRK/MhoFm0h08 PDfBizO7QfptBNYphtIFt+KLo21rDQNdwnkggmeCmL3S0gaiSbVS6Ytdyi9MS5fZdD nRqsA261ZRo+CbX+/zn+t2eRhnwiuPsWSj+VvRwE= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelvem-sh02.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57DGpsEA1106877 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL) for ; Wed, 13 Aug 2025 11:51:54 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 11:51:53 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 11:51:53 -0500 Received: from uda0867391-2.dhcp.ti.com (uda0867391-2.dhcp.ti.com [128.247.81.58]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57DGpoA12292823; Wed, 13 Aug 2025 11:51:53 -0500 From: Thorsten Lannynd To: , CC: , , Subject: [meta-arago][scarthgap/master][PATCH 3/5] meta-arago-distro: chromium: Allow GPU sandbox access to V4L2 Date: Wed, 13 Aug 2025 11:51:46 -0500 Message-ID: <20250813165148.220012-4-t-lannynd@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813165148.220012-1-t-lannynd@ti.com> References: <20250813165148.220012-1-t-lannynd@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 Aug 2025 16:52:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/16364 Add a patch to allow Chromium to open the V4L2 device patchs from Weston which is needed for enabling the V4L2 Stateful decoder in Chromium without using --no-sandbox. Signed-off-by: Thorsten Lannynd --- ...dbox-Allow-GPU-sandbox-access-to-V4L.patch | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0003-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0003-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0003-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch new file mode 100644 index 00000000..1cadaa5b --- /dev/null +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0003-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch @@ -0,0 +1,55 @@ +From 99c59368f9cdd43638dd30c2ea867a950a54b648 Mon Sep 17 00:00:00 2001 +From: Thorsten Lannynd +Date: Fri, 8 Aug 2025 23:05:18 -0500 +Subject: [PATCH] chromium: gpu: sandbox: Allow GPU sandbox access to V4L2 + devices + +Upstream-Status: Pending + +This patch modifies the Chromium GPU sandbox configuration to allow +access to V4L2 (Video4Linux2) devices. This is necessary to enable +hardware-accelerated video decoding and encoding on systems that rely on +Chromium with V4L2 for video processing. + +Signed-off-by: Thorsten Lannynd +--- + content/common/gpu_pre_sandbox_hook_linux.cc | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/content/common/gpu_pre_sandbox_hook_linux.cc b/content/common/gpu_pre_sandbox_hook_linux.cc +index 2a3abc9775..1865246fa8 100644 +--- a/content/common/gpu_pre_sandbox_hook_linux.cc ++++ b/content/common/gpu_pre_sandbox_hook_linux.cc +@@ -140,8 +140,13 @@ void AddV4L2GpuPermissions( + static constexpr size_t MAX_V4L2_DECODERS = 5; + static const base::FilePath::CharType kDevicePath[] = + FILE_PATH_LITERAL("/dev/"); ++#if BUILDFLAG(IS_LINUX) ++ static const base::FilePath::CharType kVideoDecBase[] = "video"; ++ static const base::FilePath::CharType kMediaDecBase[] = ""; ++#else + static const base::FilePath::CharType kVideoDecBase[] = "video-dec"; + static const base::FilePath::CharType kMediaDecBase[] = "media-dec"; ++#endif + for (size_t i = 0; i < MAX_V4L2_DECODERS; i++) { + std::ostringstream decoderPath; + decoderPath << kDevicePath << kVideoDecBase << i; +@@ -516,11 +521,14 @@ std::vector FilePermissionsForGpu( + AddDrmGpuPermissions(&permissions); + } + ++ if (UseV4L2Codec(options)) { ++ // Add V4L2 permissions for video decode/encode. ++ AddV4L2GpuPermissions(&permissions, options); ++ } ++ + if (IsChromeOS()) { + // Permissions are additive, there can be multiple GPUs in the system. + AddStandardChromeOsPermissions(&permissions); +- if (UseV4L2Codec(options)) +- AddV4L2GpuPermissions(&permissions, options); + if (IsArchitectureArm()) { + AddImgPvrGpuPermissions(&permissions); + AddArmGpuPermissions(&permissions); +-- +2.34.1 From patchwork Wed Aug 13 16:51:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Lannynd X-Patchwork-Id: 68469 X-Patchwork-Delegate: reatmon@ti.com 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A473CC87FCF for ; Wed, 13 Aug 2025 16:52:01 +0000 (UTC) Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) by mx.groups.io with SMTP id smtpd.web11.1579.1755103915273881374 for ; Wed, 13 Aug 2025 09:51:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FpJ4oChW; spf=pass (domain: ti.com, ip: 198.47.19.245, mailfrom: t-lannynd@ti.com) Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57DGpsBY1691394 for ; Wed, 13 Aug 2025 11:51:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755103914; bh=MBBtLhfBSGCezzdW0Nmogy9mgDtrYhCBF+eyJCGk3dY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FpJ4oChWLeMXP/hoOPSUWkQT809ZTUx1Eh6ZuJJ6sE48e8vYLjNW85Poeo08uMds9 PcfPJ1lifFYeZHkz0UjY7VSkFnGq7HZAieCrvBa/P4MCSdesczhy2to3mgFTmOjKlI 6BOoCbslKpJ337kIpYcsFyJ19rsurpxdc4D1hmpM= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57DGpskx1211815 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL) for ; Wed, 13 Aug 2025 11:51:54 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 11:51:54 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 11:51:54 -0500 Received: from uda0867391-2.dhcp.ti.com (uda0867391-2.dhcp.ti.com [128.247.81.58]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57DGpoA22292823; Wed, 13 Aug 2025 11:51:54 -0500 From: Thorsten Lannynd To: , CC: , , Subject: [meta-arago][scarthgap/master][PATCH 4/5] meta-arago-distro: chromium: Fix V4L2 Stateful decoder Date: Wed, 13 Aug 2025 11:51:47 -0500 Message-ID: <20250813165148.220012-5-t-lannynd@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813165148.220012-1-t-lannynd@ti.com> References: <20250813165148.220012-1-t-lannynd@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 Aug 2025 16:52:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/16365 Add patch to fix the V4L2 Stateful decoder in Chromium to work with Wave5: Correct the device paths that are opened. Reorder EnqueueBuffers() and Streamon() since Wave5 needs buffers enqueued before StreamOn() is called. Set the pixel format on the raw video frames to send to display. Signed-off-by: Thorsten Lannynd --- ...2-Fix-OUTPUT-queue-streaming-in-V4L2.patch | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0004-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-V4L2.patch diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0004-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-V4L2.patch b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0004-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-V4L2.patch new file mode 100644 index 00000000..f502eac5 --- /dev/null +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-132.0.6834.83/0004-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-V4L2.patch @@ -0,0 +1,123 @@ +From 3f5cdbc3b1871b6b8cdfa96eccd96f59d66a8afc Mon Sep 17 00:00:00 2001 +From: Thorsten Lannynd +Date: Sat, 9 Aug 2025 01:46:14 -0500 +Subject: [PATCH] chromium: gpu: v4l2: Fix OUTPUT queue streaming in + V4L2StatefulVideoDecoder + +Upstream-Status: Inappropriate [this change is needed to satisfy +Wave5 conditions, which isn't applicable upstream] + +This patch ensures that the OUTPUT queue in `V4L2StatefulVideoDecoder` +is properly checked and started before attempting to enqueue buffers. +Wave5 requires buffers to be enqueued before streaming. + +It adds a check for `IsStreaming()` and attempts to start streaming +with `Streamon()` if necessary. This prevents potential failures +during video decoding initialization. + +`SetFormat()` needs to be called on the CAPTURE queue to ensure +the raw output frames are in the correct pixel format and picture +size. + +Signed-off-by: Thorsten Lannynd +--- + media/gpu/v4l2/v4l2_stateful_video_decoder.cc | 40 ++++++++++++++----- + media/gpu/v4l2/v4l2_utils.cc | 2 +- + 2 files changed, 32 insertions(+), 10 deletions(-) + +diff --git a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc +index e5069a3acf..6d11ea7e0f 100644 +--- a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc ++++ b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc +@@ -308,7 +308,11 @@ void V4L2StatefulVideoDecoder::Initialize(const VideoDecoderConfig& config, + } + + if (!device_fd_.is_valid()) { ++#if BUILDFLAG(IS_LINUX) ++ constexpr char kVideoDeviceDriverPath[] = "/dev/video0"; ++#else + constexpr char kVideoDeviceDriverPath[] = "/dev/video-dec0"; ++#endif + device_fd_.reset(HANDLE_EINTR( + open(kVideoDeviceDriverPath, O_RDWR | O_NONBLOCK | O_CLOEXEC))); + if (!device_fd_.is_valid()) { +@@ -410,10 +414,6 @@ void V4L2StatefulVideoDecoder::Initialize(const VideoDecoderConfig& config, + std::move(init_cb).Run(DecoderStatus::Codes::kFailedToCreateDecoder); + return; + } +- if (!OUTPUT_queue_->Streamon()) { +- std::move(init_cb).Run(DecoderStatus::Codes::kFailedToCreateDecoder); +- return; +- } + client_->NotifyEstimatedMaxDecodeRequests(base::checked_cast( + std::min(static_cast(4), num_input_buffers))); + +@@ -518,10 +518,22 @@ void V4L2StatefulVideoDecoder::Decode(scoped_refptr buffer, + std::move(decode_cb)); + } + +- if (!TryAndEnqueueOUTPUTQueueBuffers()) { +- // All accepted entries in |decoder_buffer_and_callbacks_| must have had +- // their |decode_cb|s Run() from inside TryAndEnqueueOUTPUTQueueBuffers(). +- return; ++ if(!OUTPUT_queue_->IsStreaming()) { ++ TryAndEnqueueOUTPUTQueueBuffers(); ++ if(!OUTPUT_queue_->Streamon()) { ++ VLOG(1) << "Failed to start OUTPUT queue streaming"; ++ while (!decoder_buffer_and_callbacks_.empty()) { ++ auto cb = std::move(decoder_buffer_and_callbacks_.front().second); ++ decoder_buffer_and_callbacks_.pop(); ++ std::move(cb).Run(DecoderStatus::Codes::kFailed); ++ } ++ return; ++ } ++ client_->NotifyEstimatedMaxDecodeRequests(base::checked_cast( ++ std::min(static_cast(4), OUTPUT_queue_->AllocatedBuffersCount()))); ++ } ++ else { ++ TryAndEnqueueOUTPUTQueueBuffers(); + } + + if (!event_task_runner_) { +@@ -729,7 +741,13 @@ bool V4L2StatefulVideoDecoder::InitializeCAPTUREQueue() { + auto chosen_fourcc = output_format.fourcc; + const auto chosen_size = output_format.size; + const auto chosen_modifier = output_format.modifier; +- ++ VLOG(1) << "Chosen |CAPTURE_queue_| format: " << chosen_fourcc.ToString() << " " << chosen_size.ToString() << " (modifier: 0x" << std::hex << chosen_modifier; ++ constexpr size_t kMiB = 1024 * 1024; ++ constexpr int kFullHDNumPixels = 1920 * 1080; ++ const size_t kInputBufferInMBs = ++ (chosen_size.GetArea() <= kFullHDNumPixels) ? 2 : 4; ++ const auto capture_format = CAPTURE_queue_->SetFormat( ++ V4L2_PIX_FMT_NV12, chosen_size, kInputBufferInMBs * kMiB); + // If our |client_| has a VideoFramePool to allocate buffers for us, we'll + // use it, otherwise we have to ask the driver. + const bool use_v4l2_allocated_buffers = !client_->GetVideoFramePool(); +@@ -1185,7 +1203,11 @@ int V4L2StatefulVideoDecoder::GetMaxNumDecoderInstances() { + if (!base::FeatureList::IsEnabled(media::kLimitConcurrentDecoderInstances)) { + return std::numeric_limits::max(); + } ++#if BUILDFLAG(IS_LINUX) ++ constexpr char kVideoDeviceDriverPath[] = "/dev/video0"; ++#else + constexpr char kVideoDeviceDriverPath[] = "/dev/video-dec0"; ++#endif + base::ScopedFD device_fd(HANDLE_EINTR( + open(kVideoDeviceDriverPath, O_RDWR | O_NONBLOCK | O_CLOEXEC))); + if (!device_fd.is_valid()) { +diff --git a/media/gpu/v4l2/v4l2_utils.cc b/media/gpu/v4l2/v4l2_utils.cc +index 8bc88e938f..b79ff3e832 100644 +--- a/media/gpu/v4l2/v4l2_utils.cc ++++ b/media/gpu/v4l2/v4l2_utils.cc +@@ -577,7 +577,7 @@ std::optional GetSupportedV4L2DecoderConfigs() { + candidate_paths.push_back(kVideoDevicePattern); + #else + constexpr char kVideoDevicePattern[] = "/dev/video"; +- constexpr int kMaxDevices = 256; ++ constexpr int kMaxDevices = 2; + candidate_paths.reserve(kMaxDevices); + for (int i = 0; i < kMaxDevices; ++i) { + candidate_paths.push_back( +-- +2.34.1 From patchwork Wed Aug 13 16:51:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Lannynd X-Patchwork-Id: 68468 X-Patchwork-Delegate: reatmon@ti.com 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE311CA0EE8 for ; Wed, 13 Aug 2025 16:52:01 +0000 (UTC) Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) by mx.groups.io with SMTP id smtpd.web11.1580.1755103916355009798 for ; Wed, 13 Aug 2025 09:51:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=iCvOPNS8; spf=pass (domain: ti.com, ip: 198.47.19.245, mailfrom: t-lannynd@ti.com) Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57DGpt971691398 for ; Wed, 13 Aug 2025 11:51:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755103915; bh=KJFQU94D0PtNsn4TUbbCEO5t6lXB1mtILnOC1MtkCtA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iCvOPNS8oYRp/jYsPgPDyAJ+JQCpC0tm0PPXCC9W+yHpEj9QZd0exIZnvm+JTRUGo E+rroOvR3tZ9D5G+CtPyVO7hVZ+ZoR0okBiH4t5IeQTsAdWjJSFCftGiuDPjOJmcg+ Vn9w5Re78IE7xnZnRtRMxX8H2i8QnlM4IQXyXEcE= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57DGptbE1211818 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL) for ; Wed, 13 Aug 2025 11:51:55 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 11:51:55 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 11:51:55 -0500 Received: from uda0867391-2.dhcp.ti.com (uda0867391-2.dhcp.ti.com [128.247.81.58]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57DGpoA32292823; Wed, 13 Aug 2025 11:51:55 -0500 From: Thorsten Lannynd To: , CC: , , Subject: [meta-arago][scarthgap/master][PATCH 5/5] meta-arago-distro: chromium: add patches to chromium recipe Date: Wed, 13 Aug 2025 11:51:48 -0500 Message-ID: <20250813165148.220012-6-t-lannynd@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813165148.220012-1-t-lannynd@ti.com> References: <20250813165148.220012-1-t-lannynd@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 Aug 2025 16:52:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/16366 Add the file paths of the patches to bbappend to allow chromium to apply the patches needed for enabling V4L2 stateful decoding. Signed-off-by: Thorsten Lannynd --- .../recipes-browser/chromium/chromium-ozone-wayland-arago.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc index d28acc9e..699813ed 100644 --- a/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc +++ b/meta-arago-distro/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland-arago.inc @@ -9,4 +9,7 @@ CHROMIUM_EXTRA_ARGS:append = " ${@bb.utils.contains('PACKAGECONFIG', 'use-v4l2', SRC_URI:append = " \ file://0001-chromium-gpu-sandbox-allow-access-to-PowerVR-GPU-fro.patch \ + file://0002-chromium-gpu-v4l2-enable-V4L2-stateful-decoder.patch \ + file://0003-chromium-gpu-sandbox-Allow-GPU-sandbox-access-to-V4L.patch \ + file://0004-chromium-gpu-v4l2-Fix-OUTPUT-queue-streaming-in-V4L2.patch \ "