{"id":11312,"url":"https://patchwork.libcamera.org/api/patches/11312/?format=json","web_url":"https://patchwork.libcamera.org/patch/11312/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210216122624.27940-2-dafna.hirschfeld@collabora.com>","date":"2021-02-16T12:26:22","name":"[libcamera-devel,1/3] libcamera: media_device: add hwRevision method","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"ab4cb34024603205c6b5ce23ce363f0d00825006","submitter":{"id":46,"url":"https://patchwork.libcamera.org/api/people/46/?format=json","name":"Dafna Hirschfeld","email":"dafna.hirschfeld@collabora.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11312/mbox/","series":[{"id":1697,"url":"https://patchwork.libcamera.org/api/series/1697/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1697","date":"2021-02-16T12:26:21","name":"rkisp1: add an initial support to different hw revision","version":1,"mbox":"https://patchwork.libcamera.org/series/1697/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11312/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11312/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9BFC2BD1EF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Feb 2021 12:26:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0FC45637E8;\n\tTue, 16 Feb 2021 13:26:38 +0100 (CET)","from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7266160D37\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Feb 2021 13:26:37 +0100 (CET)","from guri.fritz.box (unknown\n\t[IPv6:2a02:810a:880:f54:806:ee8a:d491:814b])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits))\n\t(No client certificate requested) (Authenticated sender: dafna)\n\tby bhuna.collabora.co.uk (Postfix) with ESMTPSA id DBB441F453AC;\n\tTue, 16 Feb 2021 12:26:36 +0000 (GMT)"],"From":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 16 Feb 2021 13:26:22 +0100","Message-Id":"<20210216122624.27940-2-dafna.hirschfeld@collabora.com>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20210216122624.27940-1-dafna.hirschfeld@collabora.com>","References":"<20210216122624.27940-1-dafna.hirschfeld@collabora.com>","Subject":"[libcamera-devel] [PATCH 1/3] libcamera: media_device: add\n\thwRevision method","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"heiko@sntech.de, kernel@collabora.com","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a method 'hwRevision' to return the\ninfo.hw_version reported by the driver.\n\nSigned-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n---\n include/libcamera/internal/media_device.h | 2 ++\n src/libcamera/media_device.cpp            | 1 +\n 2 files changed, 3 insertions(+)","diff":"diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\nindex d0459cde..c3292508 100644\n--- a/include/libcamera/internal/media_device.h\n+++ b/include/libcamera/internal/media_device.h\n@@ -41,6 +41,7 @@ public:\n \tconst std::string deviceNode() const { return deviceNode_; }\n \tconst std::string model() const { return model_; }\n \tunsigned int version() const { return version_; }\n+\tunsigned int hwRevision() const { return hwRevision_; }\n \n \tconst std::vector<MediaEntity *> &entities() const { return entities_; }\n \tMediaEntity *getEntityByName(const std::string &name) const;\n@@ -79,6 +80,7 @@ private:\n \tstd::string deviceNode_;\n \tstd::string model_;\n \tunsigned int version_;\n+\tunsigned int hwRevision_;\n \n \tint fd_;\n \tbool valid_;\ndiff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex de18d572..ec964948 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -231,6 +231,7 @@ int MediaDevice::populate()\n \tdriver_ = info.driver;\n \tmodel_ = info.model;\n \tversion_ = info.media_version;\n+\thwRevision_ = info.hw_revision;\n \n \t/*\n \t * Keep calling G_TOPOLOGY until the version number stays stable.\n","prefixes":["libcamera-devel","1/3"]}