Commit graph

2025 commits

Author SHA1 Message Date
Laurent Pinchart
c58bec935c libcamera: utils: Add map_keys() function
Add a map_keys() function to the utils namespace to extract keys from a
map.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Niklas: change return type to std::vector instead of std::set]
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-09 16:15:12 +02:00
Laurent Pinchart
b5f6a2ce2f libcamera: Use Size::isNull()
Use the new Size::isNull() function through the code base to replace
manual checks. While the new code isn't equivalent, as isNull() checks
that both width and height are zero, it catches the same conditions in
practice.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-07-08 20:55:13 +03:00
Kieran Bingham
61f4296ac7 android: camera_device: Remove single buffer restriction.
A capture request is no longer limited to a single output buffer.
Remove the limitation, but (for now) keep the check to ensure that
at least one buffer is always provided.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-07 11:50:51 +01:00
Kieran Bingham
0cfdf737dc android: camera_device: Add buffers for each stream to Requests
Construct a FrameBuffer for every buffer given in the camera3Request
and add it to the libcamera Request on the appropriate stream.

The correct stream is obtained from the private data of the camera3_stream
associated with the camera3_buffer.

Comments regarding supporting only one buffer are now removed, and
FrameBuffers have their lifetime tracked in the Camera3RequestDescriptor
to ensure they are released when the Request is completed.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-07 11:50:51 +01:00
Kieran Bingham
2f34f5ef06 android: camera_device: Maintain a vector of CameraStream
Introduce a vector storing a CameraStream to track and maintain
state between an Android stream (camera3_stream_t) and a libcamera
Stream.

Only the index of the libcamera stream is stored, to facilitate identifying
the correct index for both the StreamConfiguration and Stream vectors.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Kieran Bingham
eac0542c5e android: camera_device: Create the Request and Camera3RequestDescriptor together
Move the construction of the Request higher in the code flow so that
multiple buffers and streams can be added where required.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Kieran Bingham
74ab442dcf android: camera_device: Simplify FrameBuffer construction from a buffer_handle_t
Move the code which constructs a FrameBuffer from the Android buffer handle
to it's own function to simplify the code flow and readability.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Kieran Bingham
0a9244ed37 android: camera_device: Support multiple stream configurations
Create an initial Camera Configuration using an empty role set, and
populate the StreamConfigurations manually from each of the streams
given by the Android camera3_stream_configuration_t stream_list.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Kieran Bingham
43e3b8002b android: camera_device: Provide a toPixelFormat helper
Rather than converting pixelformats through the map, and then
dereferencing the iterator later, create a helper to explicitly return a
PixelFormat type.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Kieran Bingham
d35cf6e4e4 libcamera: camera: Allow unspecified roles for generateConfiguration
Providing an empty set of roles is permitted to generate an empty
configuration from the pipeline handlers.

Overload the generateConfiguration() function such that not specifying a
roles parameter will use an empty set, and return an empty
configuration.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-06 23:58:42 +01:00
Naushir Patuck
e0c583871d libcamera: ipa: raspberrypi: Populate focus FoM from the ISP statistics
Switch FocusStatus::num to unsigned int for convenience.

Fill in libcamera::controls::FocusFoM with the average of the middle two
regions (across a 4x3 grid) FoM statistics from the ISP.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-06 17:14:34 +03:00
Naushir Patuck
64652e26d7 ipa: raspberrypi: Populate libcamera metadata after controller process
For control algorithms like focus, this is needed to return out the
the current frame focus statistics. For other algorithms, there is no
functional change.

Signed-off-By: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-06 17:14:34 +03:00
Naushir Patuck
c905870cd0 libcamera: controls: Add focus Figure of Merit (FoM) control
Provide a control to allow the IPA to return a FoM to indicate how
in-focus a scene is. Note, this is not to be used as a means to
implement a focus algorithm by the application, rather an indication of
how in-focus a scene is.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-06 17:02:32 +03: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
Laurent Pinchart
bfad33c3ef utils: raspberrypi: ctt: json_pretty_print: Collapse newlines
Simplify the newline skipping logic by simply collapsing newlines. If a
newline has been output, all subsequent newlines will be skipped until
the next non-newline character is output.

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:50 +03:00
Laurent Pinchart
d9617a499a utils: raspberrypi: ctt: json_pretty_print: Fix indentation handling
Indentation is handled by outputting spaces right after outputting a
newline character. That works in most cases, but would result in the
input '{}' being printed as

{
    }

instead of

{
}

Fix it by outputting the indentation before outputting the next
character after a newline. The indentation value will be updated by
then.

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:47 +03:00
Laurent Pinchart
606741deb9 utils: raspberrypi: ctt: json_pretty_print: Add character write method
Add a write method to the JSONPrettyPrinter class to output a character.
This will be used to handle state updates when outputting individual
characters.

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:45 +03:00
Laurent Pinchart
e101c78e03 utils: raspberrypi: ctt: json_pretty_print: Skip all spaces
Skip all white space characters, not just ' '. This makes a difference
if the input JSON data is already formatted.

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:42 +03:00
Laurent Pinchart
5224f471ca utils: raspberrypi: ctt: json_pretty_print: Make test output to stdout
The standalone test mode output to a file name "pretty.json". To make
the test mode more versatile, output to stdout instead. The user can
then decide how to use the output.

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:40 +03:00
Laurent Pinchart
4321f6e96e utils: raspberrypi: ctt: json_pretty_print: Make output file a class member
Instead of passing the output file to every method of the printer class,
make it a class member.

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:38 +03:00
Laurent Pinchart
926fe94e4c utils: raspberrypi: ctt: json_pretty_print: Turn printer into a class
Instead of passing a state dictionary to every method, turn the printer
into a class and store the state internally.

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:32 +03:00
Laurent Pinchart
1a5b168592 utils: raspberrypi: ctt: json_pretty_print: Fix printer test
The ctt_pretty_print_json.py file supports being run standalone to test
the code. It however suffers from multiple issues:

- The same input file name is hardcoded, and doesn't exist in the
  repository
- The input file name is used instead of JSON data

Fix both issues and make the input file selectable on the command line.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
2020-07-03 18:15:19 +03:00
David Plowman
fd2b55cb3f ipa: raspberrypi: Enable focus measure without recompile
Previously, output of the focus measure could not be enabled without
recompiling (because of the RPI_LOGGING_ENABLE macro). This uses the
libcamera logging mechanism instead, so can be enabled/disabled at
runtime.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-03 04:24:00 +03:00
Niklas Söderlund
73b18967b6 libcamera: ipu3: cio2: Do not proxy signal
Do not proxy the signal in the CI2Device when there is no need for it,
remove it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-03 00:10:07 +02:00
Niklas Söderlund
c3648da6e9 libcamera: ipu3: Make it easier to read when a request may be completed
It's confusing to read the code and understand that a request is only
completed before being processed by the ImgU if it only contains a
single RAW buffer. Add a boolean variable with a explanatory name to
make this clearer, no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-03 00:10:04 +02:00
Niklas Söderlund
8e137b0819 libcamera: raspberrypi: Document vc_sm_cma pointer sharing with IPA
Sharing a pointer with the IPA is fragile as it will not work with all
IPC mechanisms. Document that it's a temporary workaround that should be
reworked.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-03 00:08:31 +02:00
Andrej Shadura
8dbd0049e0 ipa/pipeline: rkisp1: Fix spelling
Fix a typo in the word "unknown".

Suggested-by: IOhannes m zmölnig <umlaeute@debian.org>
Signed-off-by: Andrej Shadura <andrewsh@debian.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-07-01 17:11:29 +01:00
Laurent Pinchart
e7aa92a883 utils: raspberrypi: ctt: Fix pycodestyle W605
W605 invalid escape sequence '\.'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-06-29 17:38:18 +03:00
Niklas Söderlund
6bc4af7d0b libcamera: ipu3: cio2: Use Size::isNull()
Use the Size::isNull() helper instead of using local code.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 16:17:38 +02:00
Laurent Pinchart
7fc65e9680 libcamera: geometry: Add isNull() function to Size class
It's common for code to check if a size is null. Add a helper function
to do so.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-06-29 16:17:34 +02:00
Jacopo Mondi
d8848693bf libcamera: raspberrypi: Fail on unsupported stream role
When an unsupported stream roles is requested to
generateConfiguration(), the function shall fail instead of simply
ignoring the request.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 09:39:56 +02:00
Jacopo Mondi
b7dfefb882 libcamera: raspberrypi: Refuse invalid roles configuration
The generateConfiguration() implementation does not check if the
requested list of roles can actually be satisfied. The camera API
documentation prescribes the function shall fail in that case, instead
of silently adjust the returned configuration.

Fix this by implementing the same logic as the validate() function
implements, as the pipeline handler supports one raw stream and up to
two output streams.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 09:39:36 +02:00
Jacopo Mondi
a3e6c2b3d9 libcamera: ipu3: Fix wrong indentation
Fix wrong parameter indent in generateConfiguration() function
implementation.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 09:35:45 +02:00
Jacopo Mondi
5267ca8e02 libcamera: ipu3: Accept an empty roles list
The IPU3 pipeline handler that does not support receiving an empty list
of roles at generateConfiguration() time. This contradicts the camera
API which allows application to generate empty CameraConfiguration to
be later manually filled.

Fix this by returning an empty CameraConfiguration if the list of
requested roles is empty. While at it, align the style with the other
pipeline handlers.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 09:35:17 +02:00
Jacopo Mondi
83d37d5466 libcamera: ipu3: Improve error on multiple raw streams request
Improve the error message emitted when multiple raw streams are
requested.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-29 09:33:49 +02:00
Niklas Söderlund
d130c55073 libcamera: ipu3: imgu: Use unique_ptr for video and subdevices
Instead of manually deleting the video and subdevices in the destructor
use std::unique_ptr.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
1e0cd804f0 libcamera: ipu3: imgu: Remove ImgUOutput
The struct ImgUOutput now only contains one member that is in use, the
video device. Remove the struct and use the video device directly
instead.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
003645f598 libcamera: ipu3: Remove IPU3Stream
The pipeline specific subclass of the pipeline is empty, remove it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
1f59558777 libcamera: ipu3: Remove the active flag from IPU3Stream
The active_ flag is only used inside one function, remove the global
flag and handle it inside the single function.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
5bbef188f6 libcamera: ipu3: Do not duplicate data in IPU3Stream
Do not keep the duplicated ImgUDevice::ImgUOutput information in both
the stream and camera data classes. Remove it from the stream and only
access it from the camera data class.

Which stream is which can instead be checked by comparing it to the
known streams in camera data. This match how streams are checked in
other parts of the code making the pipeline more coherent.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
b80c01843c libcamera: ipu3: imgu: Use specific functions to configure each sink
When the IPU3 pipeline only provided streams to applications that came
from the ImgU it made sense to have a generic function to configure all
the different outputs. With the addition of the RAW stream this begins
to be cumbersome to read and make sense of in the PipelineHandlerIPU3
code. Replace the generic function that takes a specific argument for
which sink to configure with a specific function for each sink.

This makes the code easier to follow as it's always clear which of the
ImgU sinks are being configured without knowing the content of a
generically named variable. It also paves the way for future
improvements.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
d275243979 libcamera: ipu3: imgu: Mark things that are internal as private
Mark all variables and functions that are only used internally as
private.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
2ea9d2c1d0 libcamera: ipu3: imgu: Do not cache index
The numerical index of the imgu is only used to create its name in
string form. There is no need to keep it around after that, remove it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
dd391df851 libcamera: ipu3: imgu: Move the ImgUDevice class to separate files
In preparation of refactoring the IPU3 pipeline handler breakout the
ImgUDevice into its own .cpp and .h file, no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
942f6c5ceb libcamera: ipu3: Remove usage of IPU3CameraData from ImgUDevice
The IPU3CameraData argument to allocateBuffers() and freeBuffers() is no
longer used and can be removed.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
72e36e8d8d libcamera: ipu3: Always import buffers for ImgU sinks
When the IPU3 pipeline was first developed sinks of the ImgU that where
not active still needed to have buffers allocated to allow streaming to
start. This is no longer true, it's enough that the sinks have imported
buffers to allow streaming to start. As we already need to import
buffers for stream that are active we can align the two cases and always
import buffers.

With this there is no longer a reason to store the allocated
FrameBuffers to keep them alive and the vector tracking them can be
removed.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
dcb3e7e2df libcamera: ipu3: Import instead of allocate statistic buffers
Statistics buffers are not yet used by the IPU3 pipeline, they are never
queued to the statistics video device or in any other way consumed. The
kernel driver will however not allow video streaming to start if buffers
are not either allocated or imported on the statistics video device.
Instead of allocating the buffers wasting memory that is never used,
import buffers.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Niklas Söderlund
76332f0f8a libcamera: ipu3: Remove unused name_ filed from IPU3Stream
The field is never used, remove it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28 14:25:46 +02:00
Laurent Pinchart
39fa976b46 libcamera: Summarize licensing terms in COPYING.rst
Storing detailed licensing information in SPDX headers and in the DEP5
file gives precise information to handle license compliance, but lacks a
high-level overview. Summmarize the licensing terms in a COPYING.rst
file to facilitate understanding of the libcamera project licenses, and
to clarify that closed-source third-party IPA modules are permitted.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
2020-06-26 15:18:25 +03:00