libcamera: software_isp: Emit ispStatsReady only if IPA is running
Software ISP runs debayering in a separate thread and debayering may emit statsReady when software ISP (including the IPA) is being stopped. The signal waits in a queue and gets invoked later, resulting in an assertion error when attempting to invoke a method on the stopped IPA: FATAL default soft_ipa_proxy.cpp:456 assertion "state_ == ProxyRunning" failed in processStatsThread() Let's prevent this problem by forwarding the ISP stats signal from software ISP only when the IPA is running. To track this, SoftwareISP::running_ variable is introduced. Making processing of the other signals in SoftwareISP more robust is addressed in the followup patches. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reported-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
1ea124c7a3
commit
b72d789475
2 changed files with 5 additions and 1 deletions
|
@ -100,6 +100,7 @@ private:
|
||||||
DmaBufAllocator dmaHeap_;
|
DmaBufAllocator dmaHeap_;
|
||||||
|
|
||||||
std::unique_ptr<ipa::soft::IPAProxySoft> ipa_;
|
std::unique_ptr<ipa::soft::IPAProxySoft> ipa_;
|
||||||
|
bool running_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -315,6 +315,7 @@ int SoftwareIsp::start()
|
||||||
int ret = ipa_->start();
|
int ret = ipa_->start();
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
running_ = true;
|
||||||
|
|
||||||
ispWorkerThread_.start();
|
ispWorkerThread_.start();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -328,6 +329,7 @@ void SoftwareIsp::stop()
|
||||||
ispWorkerThread_.exit();
|
ispWorkerThread_.exit();
|
||||||
ispWorkerThread_.wait();
|
ispWorkerThread_.wait();
|
||||||
|
|
||||||
|
running_ = false;
|
||||||
ipa_->stop();
|
ipa_->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,6 +358,7 @@ void SoftwareIsp::setSensorCtrls(const ControlList &sensorControls)
|
||||||
|
|
||||||
void SoftwareIsp::statsReady(uint32_t frame, uint32_t bufferId)
|
void SoftwareIsp::statsReady(uint32_t frame, uint32_t bufferId)
|
||||||
{
|
{
|
||||||
|
if (running_)
|
||||||
ispStatsReady.emit(frame, bufferId);
|
ispStatsReady.emit(frame, bufferId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue