summaryrefslogtreecommitdiff
path: root/ipu3.cpp
AgeCommit message (Collapse)Author
2022-10-19ipu3: ipa: Update to latest IPACameraSensorInfoHEADmasterKieran Bingham
In libcamera commit e5fc0132f80d ("camera_sensor: Add minimum and maximum line length to IPACameraSensorInfo"), the IPU3 IPA interface is updated to provide both minimum and maximum line lengths, replacing the existing lineLength field. Update the ipu3-ipa to use IPACameraSensorInfo::minLineLength instead of IPACameraSensorInfo::lineLength, as logically we will always want to use the fastest sensor readout by default. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-04-08ipa: ipu3: Inline parseStatistics() into processStatsBuffer()Umang Jain
Since we have moved away from switch/case on the operation ID, there's little reason to split the operation in two functions. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-04-08ipu3: Inline fillParams() in fillParamsBuffer()Umang Jain
Since we have moved away from switch/case on the operation ID, there's little reason to split the operation in two functions. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-04-08ipu3: Use the new IPAIPU3 interfaceUmang Jain
Use the new IPAIPU3 interface that migrates the event-based ops to dedication functions. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-12-03ipu3: Apply auto focus and send lens controls to pipeline handlerHan-Lin Chen
Apply auto focus and send lens controls to pipeline handler. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-11-19ipu3: Run AIQ for the first frame to avoid blankingHan-Lin Chen
The start() function set the first exposure time and analog gain to maximum. In result, the first frame might be over bright and the user may see a bright blank when changing the camera in application. Run AIQ to get an initial exposure time and analog gain in start() to smooth the AE process. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> [Kieran: Rebased without lens controls] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-11-19ipu3: Set statistics with the effective AE AiqResultsHan-Lin Chen
Set the statistics with the latest AE AiqResults which has the same exposure time and analog gain. The patch reduces the AE hunting during the converging process. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-10-18ipu3: Update camera controls in configure()Kieran Bingham
When a new CameraConfiguration is applied to the Camera the IPA is configured as well, using the newly applied sensor configuration and its updated V4L2 controls. Also update the Camera controls at IPA::configure() time by re-computing the controls::ExposureTime and controls::FrameDurationLimits limits and update the controls on the pipeline handler side after having configured the IPA. This commit corresponds to the libcamera commit 4ed22985a846 ("ipa: ipu3: Update camera controls in configure()") and applies the same changes to this IPA. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-10-18libcamera-helpers: Integrate latest MappedFrameBufferKieran Bingham
The MappedFrameBuffer helper class has been updated in the libcamera source code. This makes use of the new enum MapFlags type, and corrects the mapping changes that were made during 8708904fad6f ("libcamera: mapped_framebuffer: Return plane begin address by MappedBuffer::maps()") This update also brings back isolated IPA functionality to this external IPA, which is otherwise broken due to the offset/plane changes. The files are renamed to mapped_framebuffer to match the naming in libcamera, but are kept within the 'libcamera-helper' hierarchy of the IPA. Also, a minor todo is added to IPAIPU3::mapBuffers, to highlight that we could potentially map Statistics buffers as read only rather than read/write if we could correctly identify them. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-09-28ipu3: Use new sensor controlsKieran Bingham
The IPU3 interface was updated in 4c1fc33d8ab9 ("libcamera: ipu3: Drop entityControls map") where the sensor controls are given their own dedicated control list and is named accordingly. Update the IPU3 IPA to match the new interface update. Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-08-17ipu3: Initialise controls in the IPAKieran Bingham
In commit 11fe4333c54d ("libcamera: ipu3: Initialize controls in the IPA") the interface for the IPA was updated and the creation of exposure and frame duration controls are now the responsibility of the IPA. In libcamera, the code that creates these controls was moved to the integrated IPA for the IPU3. Duplicate the implementation here. Acked-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-08-06ipu3: Use ChromeOS tuning file pathsKieran Bingham
During development, the IPA relied upon tuning database files copied from Chrome OS, duplicated in this repository, and installed in a second location on the target, in /usr/share/libcamera/ipa/ipu3/. Having two copies of the same files on the target devices is not only pointless, it also causes an issue with some Soraka models that use a different sensor module, with a different tuning file. Use the tuning files from Chrome OS directly and drop our copies. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-07-15ipu3: Use updated buffer.h headerKieran Bingham
In libcamera commit 6a31a8d8e274 ("libcamera: buffer: Rename buffer.h to framebuffer.h"), the public header buffer.h was renamed. Update the usage accordingly. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-28ipu3: Integrate AIQ/AICKieran Bingham
Utilise the AIQ and AIC libraries to handle image control within the IPU3. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
2021-06-28ipu3: Import the Intel IPA skeleton from libcameraUmang Jain
Import the raw Intel IPU3 IPA from libcamera master at revision b2cc8a2f57333f. Also, copy the build enviroment and adapt the meson.build to build the shared library. The ipu3.cpp is now ready for integration with the Intel IPA library. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>