From cbfa81cb4e9129622eb700cbc36e2856f77abb39 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Sun, 6 Mar 2022 00:35:49 +0530 Subject: ipa: ipu3: Replace event-based ops with dedicated functions The IPAIPU3 interface currently uses event-type based structures in order to communicate with the pipeline-handler (and vice-versa). Replace the event based structures with dedicated functions associated to each operation. The translated naming scheme of actions to signals are: ActionSetSensorControls => setSensorControls ActionParamFilled => paramsBufferReady ActionMetadataReady => metadataReady The translated naming scheme of events to dedicated functions are: EventProcessControls => queueRequest() EventStatReady => processStatsBuffer() EventFillParams => fillParamsBuffer() The dedicated functions are called from pipeline-handler to the IPA using IPC. These functions run asynchronously and when completed, the IPA emits the respective signals as stated above in the translated naming scheme. The EventProcessControls is translated to queueRequest() to bring symmetry to the IPU3 interface with other IPA interfaces. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- include/libcamera/ipa/ipu3.mojom | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) (limited to 'include') diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom index 18cdc744..d1b1c6b8 100644 --- a/include/libcamera/ipa/ipu3.mojom +++ b/include/libcamera/ipa/ipu3.mojom @@ -8,32 +8,6 @@ module ipa.ipu3; import "include/libcamera/ipa/core.mojom"; -enum IPU3Operations { - ActionSetSensorControls = 1, - ActionParamFilled = 2, - ActionMetadataReady = 3, - EventProcessControls = 4, - EventStatReady = 5, - EventFillParams = 6, -}; - -struct IPU3Event { - IPU3Operations op; - uint32 frame; - int64 frameTimestamp; - uint32 bufferId; - libcamera.ControlList controls; - libcamera.ControlList sensorControls; - libcamera.ControlList lensControls; -}; - -struct IPU3Action { - IPU3Operations op; - libcamera.ControlList controls; - libcamera.ControlList sensorControls; - libcamera.ControlList lensControls; -}; - struct IPAConfigInfo { libcamera.IPACameraSensorInfo sensorInfo; libcamera.ControlInfoMap sensorControls; @@ -56,9 +30,15 @@ interface IPAIPU3Interface { mapBuffers(array buffers); unmapBuffers(array ids); - [async] processEvent(IPU3Event ev); + [async] queueRequest(uint32 frame, libcamera.ControlList controls); + [async] fillParamsBuffer(uint32 frame, uint32 bufferId); + [async] processStatsBuffer(uint32 frame, int64 frameTimestamp, + uint32 bufferId, libcamera.ControlList sensorControls); }; interface IPAIPU3EventInterface { - queueFrameAction(uint32 frame, IPU3Action action); + setSensorControls(uint32 frame, libcamera.ControlList sensorControls, + libcamera.ControlList lensControls); + paramsBufferReady(uint32 frame); + metadataReady(uint32 frame, libcamera.ControlList metadata); }; -- cgit v1.2.1