From c7d4599565a74cf6fbe3eba61d56666516c5d380 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Wed, 23 Mar 2022 19:56:13 +0530 Subject: ipa: rkisp1: Replace event-based ops with dedicated functions The IPARkISP1Interface 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 operations to dedicated functions: ActionV4L2Set => setSensorControls ActionParamFilled => paramsBufferReady ActionMetadata => metdataReady EventSignalStatBuffer => processStatsBuffer() EventQueueRequest => queueRequest() The lexical of IPARkISP1::metadataReady() will now conflict with the metadataReady Signal being introduced in this patch as part of the interface change. Hence, rename IPARkISP1::metadataReady() to IPARkISP1::prepareReady() to prevent the conflict. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Paul Elder --- include/libcamera/ipa/rkisp1.mojom | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom index c3a6d8e1..f50f1e11 100644 --- a/include/libcamera/ipa/rkisp1.mojom +++ b/include/libcamera/ipa/rkisp1.mojom @@ -8,28 +8,6 @@ module ipa.rkisp1; import "include/libcamera/ipa/core.mojom"; -enum RkISP1Operations { - ActionV4L2Set = 1, - ActionParamFilled = 2, - ActionMetadata = 3, - EventSignalStatBuffer = 4, - EventQueueRequest = 5, -}; - -struct RkISP1Event { - RkISP1Operations op; - uint32 frame; - uint32 bufferId; - libcamera.ControlList controls; - libcamera.ControlList sensorControls; -}; - -struct RkISP1Action { - RkISP1Operations op; - libcamera.ControlList controls; - libcamera.ControlList sensorControls; -}; - interface IPARkISP1Interface { init(libcamera.IPASettings settings, uint32 hwRevision) @@ -45,9 +23,14 @@ interface IPARkISP1Interface { mapBuffers(array buffers); unmapBuffers(array ids); - [async] processEvent(RkISP1Event ev); + [async] queueRequest(uint32 frame, uint32 bufferId, + libcamera.ControlList reqControls); + [async] processStatsBuffer(uint32 frame, uint32 bufferId, + libcamera.ControlList sensorControls); }; interface IPARkISP1EventInterface { - queueFrameAction(uint32 frame, RkISP1Action action); + paramsBufferReady(uint32 frame); + setSensorControls(uint32 frame, libcamera.ControlList sensorControls); + metadataReady(uint32 frame, libcamera.ControlList metadata); }; -- cgit v1.2.1