Commit graph

123 commits

Author SHA1 Message Date
Paul Elder
bd06b648fb utils: ipc: Add script to extract doxygen docs from mojom files
Add a script to extract doxygen documentation comments from mojom files.
It matches based on ^\/\*\*$ for start of block and ^ \*\/$ for end of
block, and simply copies the comments to the output file along with a
header and the libcamera namespace.

Also add it to the meson file so it is usable by other meson files.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-05-27 17:07:04 +09:00
Paul Elder
139d885574 utils: ipc: Update mojo
Update mojo from the Chromium repository. The commit from which this was
taken is:

9c138d992bfc1fb8f4f7bcf58d00bf19c219e4e2 "Updating trunk VERSION from
4523.0 to 4524.0"

The update-mojo.sh script was used for this update.

Bug: https://bugs.libcamera.org/show_bug.cgi?id=34
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-05-26 13:03:27 +09:00
Paul Elder
a7ded8e8f5 utils: update-mojo.sh: Add script for updating mojo
Add a script to ease updating mojo from a chromium source tree.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-05-26 13:03:12 +09:00
Umang Jain
ff9276cc62 ipa: Move core IPA interface documentation to a .cpp file
Moving the core.mojom documentation to its corresponding .cpp file
(core_ipa_interface.cpp). This will allow Doxygen to generate the
documentation for IPABuffer, IPASettings and IPAStream structures.
Since the .mojom files are placed in include/ directory, the .cpp file
will live in $sourcedir/src/libcamera/ipa/ - which can also contain
documentation for other mojom generated IPA interfaces in subsequent
commit.

Also hide the constructors in generated IPA interface from doxygen,
via  #ifndef __DOXYGEN__. These constructors provide no major value in
documenting them, instead will spew out doxygen warnings during the
build.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-05-24 14:13:01 +03:00
Paul Elder
078fbff8f4 utils: ipc: Use the proper namespace for mojom structs
Structs defined in mojom previously used the namespace of the mojom file
that was being used as the source. This is obviously not the correct
namespace for structs that are defined in core.mojom. Fix the jinja
function for getting the element type including namespace, and use it.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-04-27 17:34:58 +09:00
Kieran Bingham
70238ceca5 utils: ipc: proxy: Track IPA with a state machine
Asynchronous tasks can only be submitted while the IPA is running.

Further more, the shutdown sequence can not be tracked with a simple
running flag. We can also be in the state 'Stopping' where we have not
yet completed all events, but we must not commence anything new.

Refactor the running_ boolean into a stateful enum to track this.

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-29 12:18:02 +01:00
Laurent Pinchart
b50c12bf18 utils: ipc: proxy: Process pending messages
Events may be queued to the pipeline handler between the pipeline
handler entering the ::stop() function, and before the call to stop the
IPA has completed.

Handle these events by dispatching all pending messages at the proxy
after the IPA has fully stopped.

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-24 09:24:06 +00:00
Laurent Pinchart
f041482add utils: ipc: proxy: Assert asynchronous calls execute in the running state
Signals and calls from the IPA should not occur after the IPA has been
put into the stopped state.

Add assertions to catch and prevent any messages being processed after
this.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-24 09:24:06 +00:00
Naushir Patuck
e363eb0b6b utils: raspberrypi: Add a DelayedControls log parser
This script will parse log output from the DelayedControls helper, when
enabled with:

LIBCAMERA_LOG_LEVELS=DelayedControls:0

It tabulates all control queuing/writing/getting per frame and warns
about potential issues related to frame delays not being account for, or
writes that are lagging behind or missed.

Run with the following command:

python3 ./delayedctrls_parse.py <logfile>

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Kieran: Fix python raw strings]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-12 14:12:55 +00:00
Paul Elder
0612bef601 utils: ipc: Make first output parameter direct return if int32
To make it more convenient for synchronous IPA calls to return a status,
convert the first output into a direct return if it is an int32.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Naushir Patuck <naush@raspberrypi.com>
2021-03-09 11:49:13 +09:00
Paul Elder
51e5d67f8e utils: ipc: Support custom parameters to init()
Add support to the mojom-based code generator for custom parameters to
init(). Remove the parameter type and count validation as well.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-03-09 11:49:02 +09:00
Laurent Pinchart
237e23bb19 utils: Add kernel headers update script
Add a script to update the local copy of kernel headers (in
include/linux/) from a Linux kernel git tree. The script handles header
installation, manual processing of the IPU3 header that is still in
staging, and update of the README file.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-08 16:54:29 +02:00
Laurent Pinchart
5745a10911 utils: ipc: templates: Drop unused variable
The has_input variable is unused, drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-03-04 10:24:33 +02:00
Laurent Pinchart
0e2ca7256b utils: checkstyle.py: Handle renamed files in header add checker
The header add checker only handles added header, which makes it miss
issues when a header is renamed. Fix it.

Fixes: 8fffab46b8 ("utils: checkstyle.py: Add header add checker")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-02-16 12:30:39 +02:00
Laurent Pinchart
d86d9592a1 utils: checkstyle.py: Restore checks of renamed files
Commit fc91951250 ("utils: checkstyle.py: Add ability to filter files
by status in a commit") caused all renamed files to be ignored by the
checker. Fix it.

Fixes: fc91951250 ("utils: checkstyle.py: Add ability to filter files by status in a commit")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-02-16 12:30:39 +02:00
Paul Elder
e6722b86ee meson: ipa, proxy: Generate headers and proxy with mojo
Run mojo from meson to generate the header, serializer, and proxy files
for every pipeline's mojom data definition file.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2021-02-16 19:21:39 +09:00
Paul Elder
6072ca395a utils: ipc: add parser script
On some systems, python2 might still be the default python. Enforce
python3 by wrapping the mojo parser script in a python3 script. This
also has the benefit of not modifying mojo.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2021-02-16 19:21:11 +09:00
Paul Elder
2ad8768fd6 utils: ipc: add generator script
We want to avoid changing our copy of mojo to make updates easier. Some
parameters in the mojo generator script needs to be changed though; add
a wrapper script that sets these parameters.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2021-02-16 19:21:07 +09:00
Paul Elder
7832e19a59 utils: ipc: add templates for code generation for IPC mechanism
Add templates to mojo to generate code for the IPC mechanism. These
templates generate:
- module header
- module serializer
- IPA proxy cpp, header, and worker

Given an input data definition mojom file for a pipeline.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-02-16 19:21:00 +09:00
Laurent Pinchart
7c496f1c54 utils: gen-formats: Support big-endian DRM formats
DRM 4CCs are defined in little-endian, and can be declined in a
big-endian version by setting bit 31 (DRM_FORMAT_BIG_ENDIAN) in the 4CC
value.

Add support for such formats in the gen-formats.py script.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2021-02-01 22:33:55 +02:00
Laurent Pinchart
afbf0ec626 utils: checkstyle.py: Fix "protected" members in Commit class
The Commit class and subclasses were reworked in commit 4f5d17f3a4
("utils: checkstyle.py: Make title and files properties of commit
class") with the introduction of members of the base class that were
meant to be protected (not used externally, but accessible by
subclasses). They have been named with a '__' prefix for this purpose,
which was a bad choice as Python effectively replaces a leading '__'
with a literal '__classname__' prefix to make them private
(https://docs.python.org/3/tutorial/classes.html#private-variables). The
members accessed in the derived classes are thus different from the ones
in the base class.

Fix this by replacing the double underscore prefix with a single
underscore, which is a "weak internal use indicator" (as specified in
https://www.python.org/dev/peps/pep-0008/), closer to the protected
access specifier of C++.

Reported-by: Umang Jain <email@uajain.com>
Reported-by: Naushir Patuck <naush@raspberrypi.com>
Fixes: 4f5d17f3a4 ("utils: checkstyle.py: Make title and files properties of commit class")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2021-01-21 20:47:24 +02:00
Laurent Pinchart
b7704820f4 utils: checkstyle.py: Drop astyle support
Formatting code using astyle doesn't lead to results as good as with
clang-format, and doesn't receive much test coverage as most developers
use clang-format. The code is thus bitrotting. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-12-29 16:45:36 +02:00
Laurent Pinchart
8fffab46b8 utils: checkstyle.py: Add header add checker
Add a commit checker that ensures that all header files added to the
libcamera includes (public or internal) are accompanied by a
corresponding update of the meson.build file in the same directory.

Here's the output of the new checker when run against a commit that
forgot to update meson.build.

    $ ./utils/checkstyle.py b3383da79f
    ---------------------------------------------------------------------------------
    b3383da79f libcamera: buffer: Create a MappedBuffer
    ---------------------------------------------------------------------------------
    Header include/libcamera/internal/buffer.h added without corresponding update to include/libcamera/internal/meson.build
    ---
    1 potential issue detected, please review

In theory we could extend the checker to cover .cpp files too, but the
issue will be quite noticeable as meson won't build the file if
meson.build isn't updated. Header files are more tricky as problems
would only occur at when installing the headers (for public headers), or
would result in race conditions in the build. Both of those issues are
harder to catch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-29 16:45:35 +02:00
Laurent Pinchart
bf7981f2bc utils: checkstyle.py: Add commit checkers
Add a new category of checkers that operate on a whole commit.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-29 16:45:35 +02:00
Laurent Pinchart
ba3278a749 utils: checkstyle.py: Move diff parsing to Commit class
To avoid duplicating diff parsing in commit checkers, move it to the
Commit class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-29 16:45:33 +02:00
Laurent Pinchart
fc91951250 utils: checkstyle.py: Add ability to filter files by status in a commit
A commit can perform different operations on a file. Record the file
status (added, modified, renamed, deleted, ...) and add the ability to
filter files by status when listing the files touched by a commit.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-29 16:45:32 +02:00
Laurent Pinchart
4f5d17f3a4 utils: checkstyle.py: Make title and files properties of commit class
Make the API of the Commit class more explicit by exposing the title and
files as properties instead of through a get_info() method.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-12-29 16:45:31 +02:00
Laurent Pinchart
097720840a utils: checkstyle.py: Move commit handling to a separate section
To prepare for checkers that operate directly on commits, move the
related classes to a separate section. No functional change is included.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-12-29 16:45:30 +02:00
Laurent Pinchart
86efa9c7e9 utils: checkstyle.py: Factor out automatic class registry
The style checkers and formatters duplicate automatic class registry
code. Factor it out to a common ClassRegistry helper class. The list of
subclasses is moved to a class member variable of the auto-registered
base class type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-29 16:45:28 +02:00
Laurent Pinchart
b402734e5a utils: checkstyle.py: Drop arguments to super() when possible
The super() call is a shortcut syntax for super(__class__, <first arg>).
Drop the arguments when they match the default.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-12-29 16:45:28 +02:00
Laurent Pinchart
9c89de6617 utils: gen-controls: Fix enumerators documentation
The Doxygen documentation for enumerators prefixes the enumerator name
with the enumeration name. For unscoped enumerations, this is incorrect.
Drop the scope. This fixes warnings produced by Doxygen when multiple
enumerators with identical names are defined in different scopes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-12-27 12:28:00 +02:00
David Plowman
6669051825 src: ipa: raspberrypi: Change 'sport' exposure mode name to 'short'
The names have to match for the setting to work. Use the libcamera
terminology for consistency (even though it touches more files).

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-20 11:31:56 +00:00
Paul Elder
f4420ef8bf README, meson: Add dependency on ply and jinja2 for IPA interface generation
Specify in the readme and meson file that we depend on python3-ply and
python3-jinja2 for generating the IPA interface.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-11 19:23:16 +09:00
Paul Elder
82ba73535c utils: ipc: import mojo
Import mojo from the Chromium repository, so that we can use it for
generating code for the IPC mechanism. The commit from which this was
taken is:
a079161ec8c6907b883f9cb84fc8c4e7896cb1d0 "Add PPAPI constructs for
sending focus object to PdfAccessibilityTree"

This tree has been pruned to remove directories that didn't have any
necessary code:
- mojo/* except for mojo/public
  - mojo core, docs, and misc files
- mojo/public/* except for mojo/public/{tools,LICENSE}
  - language bindings for IPC, tests, and some mojo internals
- mojo/public/tools/{fuzzers,chrome_ipc}
- mojo/public/tools/bindings/generators
  - code generation for other languages

No files were modified.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-11 19:22:37 +09:00
Laurent Pinchart
6cd1baa28d utils: checkstyle.py: Add d-pointer formatter
Add a formatter to ensure consistent naming of 'd' and 'o' variables
related to the d-pointer design pattern, as implemented by the
Extensible class. The formatter also ensures that the pointer is always
const. const-correctness issues related to the data pointed to will be
caught by the compiler, and thus don't need to be checked here.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-11-08 00:11:09 +02:00
Paul Elder
6e77b59055 utils: tracepoints: Add simple statistics script
Add a script that scans a trace for IPA call tracepoints, and returns
statistics on the time taken for IPA calls.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-11-03 11:33:41 +09:00
Paul Elder
fcc6d4bd76 libcamera: tracing: Implement tracing infrastructure
Implement tracing infrastructure in libcamera. It takes .tp files, as
required by lttng, and generates a tracepoint header and C file, as lttng
requires. meson is updated accordingly to get it to compile with the
rest of libcamera. Update the documentation accordingly.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-03 11:07:21 +09:00
Laurent Pinchart
4757ff4ab7 utils: hooks: pre-push: Reject commits with a Change-Id
We're not using gerrit, so let's prevent Change-Id tags creeping in
unadvertently.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-02 01:03:31 +02:00
Jacopo Mondi
634fd30b39 libcamera: controls: Fix rogue whitespace
Remove an extra whitespace in the declaration of a dictionary entry in
gen-controls.py script.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
ef7a07dd8a libcamera: controls: Generate an array of valid values
For each Control that supports enumerated values generate an array
of ControlValue which contains the full list of valid values.

At the expense of a slight increase in memory occupation this change
allows the construction of the ControlInfo associated with a Control
from the values list, defaulting the minimum and maximum values
reported by the ControlInfo.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
7a307fa647 libcamera: controls: Rename enumerate values
Rename the enumeration of supported values with the suffix "Enum"
in place of "Values" to prepare to re-use the suffix "Values"
for the vector of Control's value introduced by the next patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Kieran Bingham
89916a486c libcamera: Support draft controls and properties
Extend the control and property framework to support exposing draft
controls and properties in a scoped namespace.

The controls/properties themselves will retain the same ordering in the
relevant enum/id maps - but the access to any draft control will require
explicitly referencing through its' draft:: namespace prefix.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Added missing hunk in control_ids.cpp.in and changed subject]
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:54 +01:00
Laurent Pinchart
ef4bc8d101 utils: hooks: pre-push: Accept Acked-by in addition to Reviewed-by
Allow pushing commits that have no Reviewed-by tag but have at least one
Acked-by tag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-02 15:30:14 +03:00
Ezequiel Garcia
aac96e34ba meson: Define python3 and python3-yaml required dependencies
With this change, meson will complain specifically about missing
python3 and missing python3-yaml. As specified by meson
documentation: https://mesonbuild.com/Python-module.html,
this change requires meson v0.51.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:40 +03:00
Kieran Bingham
4af45819d0 libcamera: ipa: Move key generation to utils
Move the GPLv2 utilities used for generating public and private keys to
the utilities subtree.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-09-24 10:56:22 +01:00
Kieran Bingham
c09626cd63 libcamera: Move Header generation utilities to utils
Move the GPL2 utilities which handle generation of controls, formats and
the top level libcamera header to the utils subtree.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-09-24 10:55:49 +01:00
Laurent Pinchart
e390f9f618 Documentation: Adjust guidelines regarding math.h header
While libcamera prefers usage of the C standard library headers (xxx.h)
over the C++ version (cxxx), we make an exception for cmath as the
overloaded versions of the math functions are convenient. Document this,
and adjust checkstyle.py accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-09-21 13:55:02 +03:00
Niklas Söderlund
f32261f257 libcamera: Add build time to version string for dirty builds
Having the build time in the version string is useful when building from
a dirty worktree and deploying to targets as a quick way to identify the
binary has been deployed successfully.

Before this change the version string is reported as

    libcamera v0.0.0+1692-aaff196a-dirty

While with this change the version string is reported as

    libcamera v0.0.0+1692-aaff196a-dirty (2020-08-05T22:42:18+02:00)

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-06 16:20:15 +02:00
Laurent Pinchart
a83d6ac901 utils: raspberrypi: ctt: json_pretty_print: Add newline at end of output
Make sure the output ends with a newline.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
2020-07-03 18:15:56 +03:00
Laurent Pinchart
f128acc325 utils: raspberrypi: ctt: json_pretty_print: Avoid spaces at end of lines
Avoid outputting spaces at end of lines by recording the need for a
space and outputting it before the next character only if not a newline.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
2020-07-03 18:15:54 +03:00