From patchwork Mon Mar 23 08:19:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26304 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E52BCC32DE for ; Mon, 23 Mar 2026 08:20:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B03DD6275C; Mon, 23 Mar 2026 09:20:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="lQUX9GfG"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A57FC62737 for ; Mon, 23 Mar 2026 09:20:03 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5D52F189C; Mon, 23 Mar 2026 09:18:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253927; bh=yRtGsdOtpT23QnhIEiQ/8ulKcxs9vet0aMnOKsMvEEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lQUX9GfG5Ki/ZK/Vf8FbWT5D0yJCMfvyBIopdnTtoUcmNQCwc9/o6/hNVokTfItrS uipiohAEyzcXw4C279rgvCxSNHMTQ666H2FaCr6CgW1qOzUAjHoMneccgf4ymUeK4p sXpDvGdPvwb/g9v7wdLit02TOfugI/U95kPGvi7w= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 1/7] meson: Drop unnecessary egl, gles feature defines Date: Mon, 23 Mar 2026 09:19:54 +0100 Message-ID: <20260323082000.1324115-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" `HAVE_LIBEGL` and `HAVE_GLESV2` are not used, so drop them. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index d15943586..c6c109a30 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -74,14 +74,6 @@ mesa_works = cc.check_header('EGL/egl.h', required: false) libegl = dependency('egl', required : false) libglesv2 = dependency('glesv2', required : false) -if libegl.found() - config_h.set('HAVE_LIBEGL', 1) -endif - -if libglesv2.found() - config_h.set('HAVE_GLESV2', 1) -endif - if mesa_works libcamera_internal_sources += files([ 'egl.cpp', From patchwork Mon Mar 23 08:19:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26305 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 488FBBE086 for ; Mon, 23 Mar 2026 08:20:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D062862743; Mon, 23 Mar 2026 09:20:09 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RvY5epPf"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E029A62738 for ; Mon, 23 Mar 2026 09:20:03 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 979A1874 for ; Mon, 23 Mar 2026 09:18:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253927; bh=mqWQLksu8V5Mv2Jj6II9zydGu4UxOBmsVrhMh9PzK5s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RvY5epPfwSNmWWimB/ZVbDnvZMe7zFT58o5VkXRvE+IJT8cBOpsyjiKGYAEG/uNS6 49dqYnQrz49P/GATH5aNhQ6wIVJgqYDX7XqN6xQiExnlTz5BEZIKr+8kSOrBXnAPWy W05s3Smn1nNOaKC0tWtmppiQKzFxvighEsJ27MNU= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 2/7] meson: Add `egl.cpp` to sources alongside `debayer_egl.cpp` Date: Mon, 23 Mar 2026 09:19:55 +0100 Message-ID: <20260323082000.1324115-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" There are no other users of `egl.cpp`, so simplify by adding it to the sources array at the same time. Signed-off-by: Barnabás Pőcze Acked-by: Kieran Bingham --- src/libcamera/meson.build | 3 --- src/libcamera/software_isp/meson.build | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index c6c109a30..28ce93de6 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -75,9 +75,6 @@ libegl = dependency('egl', required : false) libglesv2 = dependency('glesv2', required : false) if mesa_works - libcamera_internal_sources += files([ - 'egl.cpp', - ]) gles_headless_enabled = true else gles_headless_enabled = false diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index c61ac7d59..a55b76b58 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -19,6 +19,7 @@ libcamera_internal_sources += files([ if softisp_enabled and gles_headless_enabled config_h.set('HAVE_DEBAYER_EGL', 1) libcamera_internal_sources += files([ + '../egl.cpp', 'debayer_egl.cpp', ]) endif From patchwork Mon Mar 23 08:19:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26306 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 1391EC32F5 for ; Mon, 23 Mar 2026 08:20:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BEC0A62751; Mon, 23 Mar 2026 09:20:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="h7ZvHcQL"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 25A2462739 for ; Mon, 23 Mar 2026 09:20:04 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C49AA1911; Mon, 23 Mar 2026 09:18:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253927; bh=HQY1LXHezzIGvnibQtwcp+A+us+fOwgZ5cpJsOnHVEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7ZvHcQL0EZWzc08yhKhS00aMtkhlBlJMefTUOKxbeE5akdXARtjE8t+EBjCYNoLo WQUI0o+xI2E7mskwk7tXfi3HhLlHu9TnWBwcgH/xA9pSzRNgYjM1p8qH4sbZRcfChu UPFxDdqX97D/8AEFbH/HFu/t3n406oUt593f2rK8= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 3/7] meson: Simplify condition Date: Mon, 23 Mar 2026 09:19:56 +0100 Message-ID: <20260323082000.1324115-4-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If `softisp_enabled` is false, then `subdir_done()` is called above. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/libcamera/software_isp/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index a55b76b58..4c61909fd 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -16,7 +16,7 @@ libcamera_internal_sources += files([ 'swstats_cpu.cpp', ]) -if softisp_enabled and gles_headless_enabled +if gles_headless_enabled config_h.set('HAVE_DEBAYER_EGL', 1) libcamera_internal_sources += files([ '../egl.cpp', From patchwork Mon Mar 23 08:19:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26307 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 454C7C32F6 for ; Mon, 23 Mar 2026 08:20:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6FD366275B; Mon, 23 Mar 2026 09:20:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NfBIKBMa"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A20A62741 for ; Mon, 23 Mar 2026 09:20:04 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 16299874; Mon, 23 Mar 2026 09:18:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253928; bh=Om2U5SHeIMp7/720zsuw32xnnMaNQssq/1V6y3dEFzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfBIKBMakfNlYJueZaTRN521a9MFlGJ1VwrGfXeFYAvyFsLihGJOvQkubr0OHHQaG IfS4hf9YGXMw+aplGa9mYEWFow5eYzA5qcMyLKHqI5m7+T/xodqIiW0gbEU0d5jk2z mH8YI/mF6zIrl6WYAFZFua5Cl/wLOH9nH65NtQBI= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 4/7] meson: Remove `gles_headless_enabled` Date: Mon, 23 Mar 2026 09:19:57 +0100 Message-ID: <20260323082000.1324115-5-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Use the `mesa_works` variable instead to simplify, the two variables have the same value. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 6 ------ src/libcamera/software_isp/meson.build | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 28ce93de6..06ed34101 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -74,12 +74,6 @@ mesa_works = cc.check_header('EGL/egl.h', required: false) libegl = dependency('egl', required : false) libglesv2 = dependency('glesv2', required : false) -if mesa_works - gles_headless_enabled = true -else - gles_headless_enabled = false -endif - subdir('base') subdir('converter') subdir('ipa') diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index 4c61909fd..118d3f92f 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -2,7 +2,7 @@ softisp_enabled = pipelines.contains('simple') summary({'SoftISP support' : softisp_enabled}, section : 'Configuration') -summary({'SoftISP GPU acceleration' : gles_headless_enabled}, section : 'Configuration') +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') if not softisp_enabled subdir_done() @@ -16,7 +16,7 @@ libcamera_internal_sources += files([ 'swstats_cpu.cpp', ]) -if gles_headless_enabled +if mesa_works config_h.set('HAVE_DEBAYER_EGL', 1) libcamera_internal_sources += files([ '../egl.cpp', From patchwork Mon Mar 23 08:19:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26308 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7FFF4C32F7 for ; Mon, 23 Mar 2026 08:20:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4AF1562757; Mon, 23 Mar 2026 09:20:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mM5EC+Nk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 966ED62745 for ; Mon, 23 Mar 2026 09:20:04 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4FE2219C0; Mon, 23 Mar 2026 09:18:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253928; bh=OYpLNjgOlPh7NUG9SfDeCAQAOqSBTOOp5/B5iP00KeA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mM5EC+Nk3duJMPXMH6465/KNI0fCjEHTirRMjl9RKL6wEHQ1t8FJ9bPXLbMZLYFg2 y1n7vAgjoBIQ0xjJpCWb4fiQfZuZLUC0r3u2prstZZbPeS+WfG7OUOzWmgEkcn2Sbo /PQRJTGoG7fuvtP8xLANSlbDF4XyH0qyx9uaZvt4= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 5/7] meson: Use dependency object when checking for headers Date: Mon, 23 Mar 2026 09:19:58 +0100 Message-ID: <20260323082000.1324115-6-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A dependency might very well have custom include directories, so use it when checking for the header file. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 06ed34101..72b7bf02d 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -70,9 +70,9 @@ libcamera_deps = [] libatomic = cc.find_library('atomic', required : false) libthreads = dependency('threads') -mesa_works = cc.check_header('EGL/egl.h', required: false) libegl = dependency('egl', required : false) libglesv2 = dependency('glesv2', required : false) +mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) subdir('base') subdir('converter') From patchwork Mon Mar 23 08:19:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26309 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0C0FEC32F8 for ; Mon, 23 Mar 2026 08:20:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E0FB562760; Mon, 23 Mar 2026 09:20:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RD6acg2k"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CD84962743 for ; Mon, 23 Mar 2026 09:20:04 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A56419DF; Mon, 23 Mar 2026 09:18:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253928; bh=oRrMHbJUfe3QXgyJbv/+omRPsmaUVw11cD8KWldNOvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RD6acg2k0SZU12c3An9LTthVmiPl9e+SiGevd7RrwewRTK2gCgo/u4+mD6/Kd7pRA EDFc088NyMwKZMPIq65ZhfEsY5/rUKPxCaTlfXJxEOkCqcb3js+wjdYVVNcnbQyuPp 6xVAVwbGjYT5vm5g9uJ9jgP1m8k2O2UQRPX9r3Zc= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 6/7] meson: Move egl related dependencies to `software_isp` subdir Date: Mon, 23 Mar 2026 09:19:59 +0100 Message-ID: <20260323082000.1324115-7-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This way the dependencies are only added if they are actually used. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 6 ------ src/libcamera/software_isp/meson.build | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-) -- 2.53.0 diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 72b7bf02d..575408b2c 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -70,10 +70,6 @@ libcamera_deps = [] libatomic = cc.find_library('atomic', required : false) libthreads = dependency('threads') -libegl = dependency('egl', required : false) -libglesv2 = dependency('glesv2', required : false) -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) - subdir('base') subdir('converter') subdir('ipa') @@ -182,8 +178,6 @@ libcamera_deps += [ libcamera_base_private, libcrypto, libdl, - libegl, - libglesv2, liblttng, libudev, libyaml, diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index 118d3f92f..cbcd3c1b3 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -2,12 +2,17 @@ softisp_enabled = pipelines.contains('simple') summary({'SoftISP support' : softisp_enabled}, section : 'Configuration') -summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') if not softisp_enabled subdir_done() endif +libegl = dependency('egl', required : false) +libglesv2 = dependency('glesv2', required : false) +mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) + +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') + libcamera_internal_sources += files([ 'benchmark.cpp', 'debayer.cpp', @@ -22,4 +27,8 @@ if mesa_works '../egl.cpp', 'debayer_egl.cpp', ]) + libcamera_deps += [ + libegl, + libglesv2, + ] endif From patchwork Mon Mar 23 08:20:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26310 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 90782C32F9 for ; Mon, 23 Mar 2026 08:20:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3560162771; Mon, 23 Mar 2026 09:20:15 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="g9Yo/4ze"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B15762753 for ; Mon, 23 Mar 2026 09:20:05 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C72C12441; Mon, 23 Mar 2026 09:18:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774253928; bh=WMTAH5iIIgsliP//GsQRG6lecJ69mye4o3hZkv3d/0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g9Yo/4zeU9EYLTjIsjeN7BlUj6+e7HgJ/8q0PaJEw0stwwIOUwn49aD0ZwFbE4XOg nrKl1yj0XoZ7BAqCdOmd3VDs2sbpsKYEFf1MYjLLuD7lhIRDEanYwm1KYQcgtkov+L su0p6iMuuaOrokZgYUKgOqmz4qtOGaDUx1mn8gcE= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH v2 7/7] meson: Guard softisp gpu acceleration with feature option: softisp-gpu Date: Mon, 23 Mar 2026 09:20:00 +0100 Message-ID: <20260323082000.1324115-8-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> References: <20260323082000.1324115-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Previously it was not possible to disable gpu acceleration if every dependency was discovered by meson. Fix that by adding a new option. Signed-off-by: Barnabás Pőcze Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- changes in v2: * rename option from `softisp-debayer-egl` to `softisp-gpu` v1: https://patchwork.libcamera.org/patch/26047/ --- meson_options.txt | 5 +++++ src/libcamera/software_isp/meson.build | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) -- 2.53.0 diff --git a/meson_options.txt b/meson_options.txt index c27e377ad..af1c60cce 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -86,6 +86,11 @@ option('rpi-awb-nn', value : 'auto', description : 'Enable the Raspberry Pi Neural Network AWB algorithm') +option('softisp-gpu', + type : 'feature', + value : 'auto', + description : 'Enable GPU accelerated processing in the software ISP') + option('test', type : 'boolean', value : false, diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index cbcd3c1b3..7a2f704bf 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -7,9 +7,11 @@ if not softisp_enabled subdir_done() endif -libegl = dependency('egl', required : false) -libglesv2 = dependency('glesv2', required : false) -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) +libegl = dependency('egl', required : get_option('softisp-gpu')) +libglesv2 = dependency('glesv2', required : get_option('softisp-gpu')) +mesa_works = cc.check_header('EGL/egl.h', + required : get_option('softisp-gpu'), + dependencies : libegl) summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')