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:
parent
f4fe8cf588
commit
e32d33b11d
3 changed files with 30 additions and 9 deletions
|
@ -31,10 +31,7 @@ LOG_DEFINE_CATEGORY(IPARkISP1)
|
|||
class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface
|
||||
{
|
||||
public:
|
||||
int init([[maybe_unused]] const IPASettings &settings) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int init(unsigned int hwRevision) override;
|
||||
int start() override { return 0; }
|
||||
void stop() override {}
|
||||
|
||||
|
@ -69,6 +66,20 @@ private:
|
|||
uint32_t maxGain_;
|
||||
};
|
||||
|
||||
int IPARkISP1::init(unsigned int hwRevision)
|
||||
{
|
||||
/* \todo Add support for other revisions */
|
||||
if (hwRevision != RKISP1_V10) {
|
||||
LOG(IPARkISP1, Error)
|
||||
<< "Hardware revision " << hwRevision
|
||||
<< " is currently not supported";
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \todo The RkISP1 pipeline currently provides an empty CameraSensorInfo
|
||||
* if the connected sensor does not provide enough information to properly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue