| Message ID | 20260129164032.1380169-7-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > Previously it was not possible to disable egl debayering if every > dependency was discovered by meson. Fix that by adding a new option. Not sure it is needed (testing purposes?) but if it is: Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > meson_options.txt | 5 +++++ > src/libcamera/software_isp/meson.build | 8 +++++--- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/meson_options.txt b/meson_options.txt > index 078472940..d600cd1be 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -81,6 +81,11 @@ option('rpi-awb-nn', > value : 'auto', > description : 'Enable the Raspberry Pi Neural Network AWB algorithm') > > +option('softisp-debayer-egl', > + type : 'feature', > + value : 'auto', > + description : 'Enable OpenGL ES based debayering 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..754a0d2d9 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-debayer-egl')) > +libglesv2 = dependency('glesv2', required : get_option('softisp-debayer-egl')) > +mesa_works = cc.check_header('EGL/egl.h', > + required : get_option('softisp-debayer-egl'), > + dependencies : libegl) > > summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
On Fri, Jan 30, 2026 at 02:41:07PM +0100, Milan Zamazal wrote: > Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > > > Previously it was not possible to disable egl debayering if every > > dependency was discovered by meson. Fix that by adding a new option. > > Not sure it is needed (testing purposes?) but if it is: This is required for reproducible builds, otherwise a distribution that wants to package libcamera without GPU acceleration could end up still linking to the GL libraries if they happen to be installed on the system that builds the package. This being said, I think we may in the future just unconditionally enable GPU acceleration. It's a bit too early for that though. > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > --- > > meson_options.txt | 5 +++++ > > src/libcamera/software_isp/meson.build | 8 +++++--- > > 2 files changed, 10 insertions(+), 3 deletions(-) > > > > diff --git a/meson_options.txt b/meson_options.txt > > index 078472940..d600cd1be 100644 > > --- a/meson_options.txt > > +++ b/meson_options.txt > > @@ -81,6 +81,11 @@ option('rpi-awb-nn', > > value : 'auto', > > description : 'Enable the Raspberry Pi Neural Network AWB algorithm') > > > > +option('softisp-debayer-egl', > > + type : 'feature', > > + value : 'auto', > > + description : 'Enable OpenGL ES based debayering in the software ISP') It will soon be able more than debayering, so let's name this option softisp-egl, or possibly better, softisp-gles. With that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > + > > option('test', > > type : 'boolean', > > value : false, > > diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build > > index cbcd3c1b3..754a0d2d9 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-debayer-egl')) > > +libglesv2 = dependency('glesv2', required : get_option('softisp-debayer-egl')) > > +mesa_works = cc.check_header('EGL/egl.h', > > + required : get_option('softisp-debayer-egl'), > > + dependencies : libegl) > > > > summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
2026. 01. 30. 14:56 keltezéssel, Laurent Pinchart írta: > On Fri, Jan 30, 2026 at 02:41:07PM +0100, Milan Zamazal wrote: >> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: >> >>> Previously it was not possible to disable egl debayering if every >>> dependency was discovered by meson. Fix that by adding a new option. >> >> Not sure it is needed (testing purposes?) but if it is: > > This is required for reproducible builds, otherwise a distribution > that wants to package libcamera without GPU acceleration could end up > still linking to the GL libraries if they happen to be installed on the > system that builds the package. > > This being said, I think we may in the future just unconditionally > enable GPU acceleration. It's a bit too early for that though. > >> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> >> >>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >>> --- >>> meson_options.txt | 5 +++++ >>> src/libcamera/software_isp/meson.build | 8 +++++--- >>> 2 files changed, 10 insertions(+), 3 deletions(-) >>> >>> diff --git a/meson_options.txt b/meson_options.txt >>> index 078472940..d600cd1be 100644 >>> --- a/meson_options.txt >>> +++ b/meson_options.txt >>> @@ -81,6 +81,11 @@ option('rpi-awb-nn', >>> value : 'auto', >>> description : 'Enable the Raspberry Pi Neural Network AWB algorithm') >>> >>> +option('softisp-debayer-egl', >>> + type : 'feature', >>> + value : 'auto', >>> + description : 'Enable OpenGL ES based debayering in the software ISP') > > It will soon be able more than debayering, so let's name this option > softisp-egl, or possibly better, softisp-gles. With that, > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> What about just `softisp-gpu` then? "Enable GPU accelerated processing in the software ISP" Yes, llvmpipe and similar exist, but this feature has been called "GPUISP" in multiple places already. > >>> + >>> option('test', >>> type : 'boolean', >>> value : false, >>> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build >>> index cbcd3c1b3..754a0d2d9 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-debayer-egl')) >>> +libglesv2 = dependency('glesv2', required : get_option('softisp-debayer-egl')) >>> +mesa_works = cc.check_header('EGL/egl.h', >>> + required : get_option('softisp-debayer-egl'), >>> + dependencies : libegl) >>> >>> summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') >
On Fri, Jan 30, 2026 at 03:09:58PM +0100, Barnabás Pőcze wrote: > 2026. 01. 30. 14:56 keltezéssel, Laurent Pinchart írta: > > On Fri, Jan 30, 2026 at 02:41:07PM +0100, Milan Zamazal wrote: > >> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > >> > >>> Previously it was not possible to disable egl debayering if every > >>> dependency was discovered by meson. Fix that by adding a new option. > >> > >> Not sure it is needed (testing purposes?) but if it is: > > > > This is required for reproducible builds, otherwise a distribution > > that wants to package libcamera without GPU acceleration could end up > > still linking to the GL libraries if they happen to be installed on the > > system that builds the package. > > > > This being said, I think we may in the future just unconditionally > > enable GPU acceleration. It's a bit too early for that though. > > > >> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > >> > >>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > >>> --- > >>> meson_options.txt | 5 +++++ > >>> src/libcamera/software_isp/meson.build | 8 +++++--- > >>> 2 files changed, 10 insertions(+), 3 deletions(-) > >>> > >>> diff --git a/meson_options.txt b/meson_options.txt > >>> index 078472940..d600cd1be 100644 > >>> --- a/meson_options.txt > >>> +++ b/meson_options.txt > >>> @@ -81,6 +81,11 @@ option('rpi-awb-nn', > >>> value : 'auto', > >>> description : 'Enable the Raspberry Pi Neural Network AWB algorithm') > >>> > >>> +option('softisp-debayer-egl', > >>> + type : 'feature', > >>> + value : 'auto', > >>> + description : 'Enable OpenGL ES based debayering in the software ISP') > > > > It will soon be able more than debayering, so let's name this option > > softisp-egl, or possibly better, softisp-gles. With that, > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > What about just `softisp-gpu` then? > > "Enable GPU accelerated processing in the software ISP" > > Yes, llvmpipe and similar exist, but this feature has been called "GPUISP" > in multiple places already. Works for me. > >>> + > >>> option('test', > >>> type : 'boolean', > >>> value : false, > >>> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build > >>> index cbcd3c1b3..754a0d2d9 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-debayer-egl')) > >>> +libglesv2 = dependency('glesv2', required : get_option('softisp-debayer-egl')) > >>> +mesa_works = cc.check_header('EGL/egl.h', > >>> + required : get_option('softisp-debayer-egl'), > >>> + dependencies : libegl) > >>> > >>> summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
diff --git a/meson_options.txt b/meson_options.txt index 078472940..d600cd1be 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -81,6 +81,11 @@ option('rpi-awb-nn', value : 'auto', description : 'Enable the Raspberry Pi Neural Network AWB algorithm') +option('softisp-debayer-egl', + type : 'feature', + value : 'auto', + description : 'Enable OpenGL ES based debayering 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..754a0d2d9 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-debayer-egl')) +libglesv2 = dependency('glesv2', required : get_option('softisp-debayer-egl')) +mesa_works = cc.check_header('EGL/egl.h', + required : get_option('softisp-debayer-egl'), + dependencies : libegl) summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
Previously it was not possible to disable egl debayering if every dependency was discovered by meson. Fix that by adding a new option. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- meson_options.txt | 5 +++++ src/libcamera/software_isp/meson.build | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-)