Message ID | 20221014131846.27169-11-naush@raspberrypi.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
HI Naush Thanks for this patch! Finally, the only config file that anyone will ever want to use! On Fri, 14 Oct 2022 at 14:19, Naushir Patuck via libcamera-devel <libcamera-devel@lists.libcamera.org> wrote: > > Add a platform configuration file optimised for use with the Raspberry Pi > suite of libcamera-apps and the picamera2 framework. > > This configuration minimises the number of internal buffers allocated, with > the expectation that applications will always provide buffers in request for > any configured stream. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > --- > .../pipeline/raspberrypi/data/meson.build | 1 + > .../pipeline/raspberrypi/data/rpi_apps.json | 28 +++++++++++++++++++ > 2 files changed, 29 insertions(+) > create mode 100644 src/libcamera/pipeline/raspberrypi/data/rpi_apps.json > > diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build > index 0592fc53877d..aabde57f25c6 100644 > --- a/src/libcamera/pipeline/raspberrypi/data/meson.build > +++ b/src/libcamera/pipeline/raspberrypi/data/meson.build > @@ -3,6 +3,7 @@ > conf_files = files([ > 'default.json', > 'minimal_mem.json', > + 'rpi_apps.json', > ]) > > install_data(conf_files, > diff --git a/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json > new file mode 100644 > index 000000000000..6a3eebf4fac7 > --- /dev/null > +++ b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json > @@ -0,0 +1,28 @@ > +{ > + "version": 1.0, > + "target": "bcm2835", > + > + "pipeline_handler": > + { > + # The minimum number of internal buffers to be allocated for Unicam. > + # This value must less than or equal to min_total_unicam_buffers. > + "min_unicam_buffers": 0, > + > + # The minimum total (internal + external) buffer count used for Unicam. > + # The number of internal buffers allocated for Unicam is given by: > + # internal buffer count = max(min_unicam_buffers, > + # min_total_unicam_buffers - external buffer count) > + "min_total_unicam_buffers": 4, > + > + # The number of internal buffers used for ISP Output0. > + "num_output0_buffers": 0, > + > + # Override any request from the IPA to drop a number of startup frames. > + "disable_startup_frame_drops": false, > + > + # Always process a pending request with the last captured sensor frame. > + # Note that this might lead to avoidable frame drops during periods > + # of transient heavey CPU loading. s/heavey/heavy/ Obviously we'll have to figure out how we arrange for our apps to pick up this file, but we can sleep on that. Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Thanks! David > + "return_newest_frames": false > + } > +} > \ No newline at end of file > -- > 2.25.1 >
diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build index 0592fc53877d..aabde57f25c6 100644 --- a/src/libcamera/pipeline/raspberrypi/data/meson.build +++ b/src/libcamera/pipeline/raspberrypi/data/meson.build @@ -3,6 +3,7 @@ conf_files = files([ 'default.json', 'minimal_mem.json', + 'rpi_apps.json', ]) install_data(conf_files, diff --git a/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json new file mode 100644 index 000000000000..6a3eebf4fac7 --- /dev/null +++ b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json @@ -0,0 +1,28 @@ +{ + "version": 1.0, + "target": "bcm2835", + + "pipeline_handler": + { + # The minimum number of internal buffers to be allocated for Unicam. + # This value must less than or equal to min_total_unicam_buffers. + "min_unicam_buffers": 0, + + # The minimum total (internal + external) buffer count used for Unicam. + # The number of internal buffers allocated for Unicam is given by: + # internal buffer count = max(min_unicam_buffers, + # min_total_unicam_buffers - external buffer count) + "min_total_unicam_buffers": 4, + + # The number of internal buffers used for ISP Output0. + "num_output0_buffers": 0, + + # Override any request from the IPA to drop a number of startup frames. + "disable_startup_frame_drops": false, + + # Always process a pending request with the last captured sensor frame. + # Note that this might lead to avoidable frame drops during periods + # of transient heavey CPU loading. + "return_newest_frames": false + } +} \ No newline at end of file
Add a platform configuration file optimised for use with the Raspberry Pi suite of libcamera-apps and the picamera2 framework. This configuration minimises the number of internal buffers allocated, with the expectation that applications will always provide buffers in request for any configured stream. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> --- .../pipeline/raspberrypi/data/meson.build | 1 + .../pipeline/raspberrypi/data/rpi_apps.json | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/libcamera/pipeline/raspberrypi/data/rpi_apps.json