libcamera: software_isp: debayer: Introduce a start() / stop() methods to the debayer object
In order to initialise and deinitialise gpuisp we need to be able to setup EGL in the same thread as Debayer::process() happens in. This requires extending the Debayer object to provide start and stop methods which are triggered through invokeMethod in the same way as process() is. Introduce start() and stop() methods to the Debayer class. Trigger those methods as described above via invokeMethod. The debayer_egl class will take care of initialising and de-initialising as necessary. Debayer CPU sees no functional change. Per feedback from Barnabas the stop method is using blocking synchronisation and thus we drop ispWorkerThread_.removeMessages(). [bod: Made method blocking not queued per Robert's bugfixes] Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
364886fb13
commit
4cb388a1eb
@@ -347,7 +347,9 @@ int SoftwareIsp::start()
|
||||
return ret;
|
||||
|
||||
ispWorkerThread_.start();
|
||||
return 0;
|
||||
|
||||
return debayer_->invokeMethod(&DebayerCpu::start,
|
||||
ConnectionTypeBlocking);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -358,9 +360,11 @@ int SoftwareIsp::start()
|
||||
*/
|
||||
void SoftwareIsp::stop()
|
||||
{
|
||||
debayer_->invokeMethod(&DebayerCpu::stop,
|
||||
ConnectionTypeBlocking);
|
||||
|
||||
ispWorkerThread_.exit();
|
||||
ispWorkerThread_.wait();
|
||||
ispWorkerThread_.removeMessages(debayer_.get());
|
||||
|
||||
Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user