ipa: rkisp1: Fail on init if hw revision is not RKISP1_V10
In kernel 5.11 the rkisp1 uapi had changed to support different hardware revisions. Currently only revision 10 is supported by the rkisp1 IPA and therefore 'init' should fail if the revision is not 10. This changes depends on the kernel driver reporting the hardware revision, and thus requires the rkisp1 driver from v5.11 or newer. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
f4fe8cf588
commit
e32d33b11d
@@ -85,7 +85,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
int loadIPA();
|
||||
int loadIPA(unsigned int hwRevision);
|
||||
|
||||
Stream mainPathStream_;
|
||||
Stream selfPathStream_;
|
||||
@@ -300,7 +300,7 @@ RkISP1FrameInfo *RkISP1Frames::find(Request *request)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int RkISP1CameraData::loadIPA()
|
||||
int RkISP1CameraData::loadIPA(unsigned int hwRevision)
|
||||
{
|
||||
ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(pipe_, 1, 1);
|
||||
if (!ipa_)
|
||||
@@ -309,7 +309,11 @@ int RkISP1CameraData::loadIPA()
|
||||
ipa_->queueFrameAction.connect(this,
|
||||
&RkISP1CameraData::queueFrameAction);
|
||||
|
||||
ipa_->init(IPASettings{});
|
||||
int ret = ipa_->init(hwRevision);
|
||||
if (ret < 0) {
|
||||
LOG(RkISP1, Error) << "IPA initialization failure";
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -952,7 +956,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
|
||||
isp_->frameStart.connect(data->delayedCtrls_.get(),
|
||||
&DelayedControls::applyControls);
|
||||
|
||||
ret = data->loadIPA();
|
||||
ret = data->loadIPA(media_->hwRevision());
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -984,6 +988,12 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)
|
||||
if (!media_)
|
||||
return false;
|
||||
|
||||
if (!media_->hwRevision()) {
|
||||
LOG(RkISP1, Error)
|
||||
<< "The rkisp1 driver is too old, v5.11 or newer is required";
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Create the V4L2 subdevices we will need. */
|
||||
isp_ = V4L2Subdevice::fromEntityName(media_, "rkisp1_isp");
|
||||
if (isp_->open() < 0)
|
||||
|
||||
Reference in New Issue
Block a user