[{"id":15190,"web_url":"https://patchwork.libcamera.org/comment/15190/","msgid":"<20210217084947.GD1786@pyrite.rasen.tech>","date":"2021-02-17T08:49:47","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: media_device: add\n\thwRevision method","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Dafna,\n\nOn Tue, Feb 16, 2021 at 01:26:22PM +0100, Dafna Hirschfeld wrote:\n> Add a method 'hwRevision' to return the\n> info.hw_version reported by the driver.\n> \n> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n\nLooks good to me.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/internal/media_device.h | 2 ++\n>  src/libcamera/media_device.cpp            | 1 +\n>  2 files changed, 3 insertions(+)\n> \n> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\n> index 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_;\n> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n> index 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> -- \n> 2.17.1\n>","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 BF1DBBD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 08:49:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D255637F9;\n\tWed, 17 Feb 2021 09:49:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9EFAB637F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 09:49:57 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 507A78C4;\n\tWed, 17 Feb 2021 09:49:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"HrDLrl4f\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613551797;\n\tbh=eaEbNzayTzMK+P9AnNBkoNBoq571ogUt4zGxUs1YpEw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HrDLrl4f4VuoBvFsRttJVAUSNPv87YfdJYNpf7DTTnK+r+GcK6G+DWAbMjkcl6UCp\n\tMI/XrcqLWjDTpNzYszWsSuUwcEWVqpgFny4ACs1jczP71sRE7YHoukXmXNCbJ+ihUx\n\t1LiigMFMJflomne/st24/mzji/ocIemfETWqlRys=","Date":"Wed, 17 Feb 2021 17:49:47 +0900","From":"paul.elder@ideasonboard.com","To":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","Message-ID":"<20210217084947.GD1786@pyrite.rasen.tech>","References":"<20210216122624.27940-1-dafna.hirschfeld@collabora.com>\n\t<20210216122624.27940-2-dafna.hirschfeld@collabora.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210216122624.27940-2-dafna.hirschfeld@collabora.com>","Subject":"Re: [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":"libcamera-devel@lists.libcamera.org, kernel@collabora.com","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>"}}]