From patchwork Tue Mar 9 06:38:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 11528 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 30418BD1F1 for ; Tue, 9 Mar 2021 06:38:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD4AA68A92; Tue, 9 Mar 2021 07:38:39 +0100 (CET) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CCA26602E4 for ; Tue, 9 Mar 2021 07:38:37 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dafna) with ESMTPSA id 2B8D81F45215 From: Dafna Hirschfeld To: libcamera-devel@lists.libcamera.org Date: Tue, 9 Mar 2021 07:38:26 +0100 Message-Id: <20210309063829.8710-1-dafna.hirschfeld@collabora.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH v3 0/3] rkisp1: add an initial support to different hw revision X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com MIME-Version: 1.0 Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In kernel v5.11 the rkisp1 uapi had changed to support different hardware versions. See [1]. Currently only version 10 is supported, therefore the IPA should fail on 'init' if the revision is not 10. In the future we want to add support for version V12. See revisions documentation at [2]. Changes from v1: - compilation fix in patch 3 that I forgot to update in first version - typo fixes - in patch 2, if 'configure' of the rkisp1 IPA fails return -EINVAL - in patch 3, if hw revision is not supported, return -ENODEV Changes from v2: - in patch 1: add doxygen documentation for the new function hwRevision - in patch 2: small typo fix - in patch 3: * the revision check is moved from the function 'configure' to the function 'init'. * remove uapi header update and support for v10 since it is already done in a different patchset Dafna Hirschfeld (3): libcamera: media_device: add hwRevision method src: rkisp1: return error from ipa's configure method if it fails ipa: rkisp1: fail on init if hw revision is not RKISP1_V10 include/libcamera/internal/media_device.h | 2 ++ include/libcamera/ipa/rkisp1.mojom | 4 ++-- src/ipa/rkisp1/rkisp1.cpp | 28 +++++++++++++++-------- src/libcamera/media_device.cpp | 10 ++++++++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 17 +++++++------- 5 files changed, 42 insertions(+), 19 deletions(-)