From patchwork Mon Feb 17 15:17:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 2844 Return-Path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 08EEF61932 for ; Mon, 17 Feb 2020 16:19:49 +0100 (CET) Received: by mail-wr1-x444.google.com with SMTP id z7so20167857wrl.13 for ; Mon, 17 Feb 2020 07:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id; bh=xHNEuvlAmLf8hzlm1/ONVD954FpewJUdS/fkQArK4mE=; b=s7Ub+oTjyt9ygIvhtelnC4SXOp+FeNa1bdGn2c0dvTpvKEEKfHt/Bj9wvXn28lcRHy 49ZTehVjUqFYg1h/qyboF44QYmkRLMtBJdm60mJZz2iFiaQv6FYC0kkKjSyWfBQP1aJ4 1O2ANapnRqe3t7Hz4e/nkRHoT3O4AKYFfcB4UaVn7WGxIRBKJtHEpIL7D6pQhdKO/JR+ vp3YVU7fq/a/GfOZZmqdlAr/RpM9aGxOlN0sjzvPmOwPceLHfX7PJkmDIk650GjVe1KC TVRnpDeM37U/eFeOJBLDfI6bE2ZQJIKHi9DS/DL5janJCE9eCFVB1QK433TrIbOcPsQh l+Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xHNEuvlAmLf8hzlm1/ONVD954FpewJUdS/fkQArK4mE=; b=G4UhCwwdYGSevolpnNmhouplBrEiE6b4ERECg6p9ILQarGfcbJh369PRg6LYQ7QUmQ aSbPfqAnHorI2Pifv29w+aQYfDZOJQ+9TL5fcbx8mnrGBbNVguAqYivxENObqOY79gSW ZZ3oqFKGjDrzqPe6hSejrm+zgw1RsBWn9ewClNAAVNP2NIyCfcIHnRWZW2qzzkdrpUkz c/raxmT8NvZS0T/gPMP0gUzF/DYG1KOzkpInI8mF9sEJYRazxOIdMhECfEpHdbGMihio EswTxC5DfHnTBiauqxTPyOsuNDeasGiCF8Bu7fpCN27mSGBoMsyDKps9QtjWzvi3scAO Ztvg== X-Gm-Message-State: APjAAAUNGJnmh2wfBMTFsHmh6oJpj4TmPxwz623R28aUOQ1ch6a+Umt0 NjOdZA5wrrHFNafTuqgKojTDHHiFTvogBg== X-Google-Smtp-Source: APXvYqwp3JI2MOfsgvrUyfeLVd5X9MnOjqVixAXFgJXsRYGMUXw7wqXp095/SXdR4HtdsNjHSroq1Q== X-Received: by 2002:adf:e2cf:: with SMTP id d15mr22955829wrj.225.1581952788535; Mon, 17 Feb 2020 07:19:48 -0800 (PST) Received: from naushir-VirtualBox.pitowers.org (cust51-dsl50.idnet.net. [212.69.50.51]) by smtp.gmail.com with ESMTPSA id f1sm1403513wro.85.2020.02.17.07.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 07:19:48 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , Naushir Patuck Date: Mon, 17 Feb 2020 15:17:46 +0000 Message-Id: <20200217151746.30285-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] libcamera: ipa: Pass the sensor name and selected mode to the ipa 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: , X-List-Received-Date: Mon, 17 Feb 2020 15:19:49 -0000 The ipa needs to know the sensor name to choose the per-camera tuning settings. It also needs the sensor mode which can be, and is usually different to the user configured mode. This is required to set any table based parameters which rely on the sensor programmed mode. Signed-off-by: Naushir Patuck --- include/ipa/ipa_interface.h | 3 +++ src/ipa/libipa/ipa_interface_wrapper.cpp | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h index 229d112..6e4b3ef 100644 --- a/include/ipa/ipa_interface.h +++ b/include/ipa/ipa_interface.h @@ -95,12 +95,15 @@ struct ipa_context *ipaCreate(); #include #include "v4l2_controls.h" +#include "v4l2_videodevice.h" namespace libcamera { struct IPAStream { unsigned int pixelFormat; Size size; + V4L2DeviceFormat deviceFormat; + const char *cameraName; }; struct IPABuffer { diff --git a/src/ipa/libipa/ipa_interface_wrapper.cpp b/src/ipa/libipa/ipa_interface_wrapper.cpp index b93c1c1..58da86d 100644 --- a/src/ipa/libipa/ipa_interface_wrapper.cpp +++ b/src/ipa/libipa/ipa_interface_wrapper.cpp @@ -115,6 +115,14 @@ void IPAInterfaceWrapper::configure(struct ipa_context *_ctx, ipaStreams[stream.id] = { stream.pixel_format, Size(stream.width, stream.height), + /* + * The below two fields: + * V4L2DeviceFormat deviceFormat; + * const char *cameraName; + * must be filled by the pipeline handlers. + */ + {}, + "" }; }