[{"id":971,"web_url":"https://patchwork.libcamera.org/comment/971/","msgid":"<20190228220500.GN7811@pendragon.ideasonboard.com>","date":"2019-02-28T22:05:00","subject":"Re: [libcamera-devel] [PATCH v5 5/9] libcamera: v4l2_subdevice:\n\tUpdate crop/compose rectangle","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, Feb 28, 2019 at 09:01:47PM +0100, Jacopo Mondi wrote:\n> Update the crop/compose rectangle provided to setCrop()/setCompose()\n> methods with the rectangle sizes set by the device driver after a\n> S_SELECTION ioctl operation.\n> \n> While at there, fix the use of 'top' and 'left' field of the selection\n> rectangle, which where wrongly used.\n\nI would have split this in two patches, as it's not really a \"while at\nit\". For both patches you would have received my\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Fixes: 468176fa07d9 (\"libcamera: Add V4L2Subdevice\")\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 9 +++++++--\n>  1 file changed, 7 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 7f191e072c61..d2f9365a9537 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -342,8 +342,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n>  \tsel.target = target;\n>  \tsel.flags = 0;\n>  \n> -\tsel.r.left = rect->y;\n> -\tsel.r.top = rect->x;\n> +\tsel.r.left = rect->x;\n> +\tsel.r.top = rect->y;\n>  \tsel.r.width = rect->w;\n>  \tsel.r.height = rect->h;\n>  \n> @@ -356,6 +356,11 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n>  \t\treturn ret;\n>  \t}\n>  \n> +\trect->x = sel.r.left;\n> +\trect->y = sel.r.top;\n> +\trect->w = sel.r.width;\n> +\trect->h = sel.r.height;\n> +\n>  \treturn 0;\n>  }\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73CC9610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 23:05:06 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0CD0849;\n\tThu, 28 Feb 2019 23:05:06 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551391506;\n\tbh=tXvbrfyf2Sr9hoQgIXLI0oLPh69XCnLni/WzZaim52w=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ubz2IPjJtCw9vEUT1nrMOR4GTTuI5NcqPcoGNUKojhdHFKqBtWKDiU0E8D2us1yI9\n\tbRNzsNrKfoKLhvFT0y62BI5qxj3rfSdrP8EmqlPk/E/904VyF2SgmKOkRINXGl2TYB\n\thoavOZm7xbzG1NsJJZwz2xgg17zG80GPcjTY3298=","Date":"Fri, 1 Mar 2019 00:05:00 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228220500.GN7811@pendragon.ideasonboard.com>","References":"<20190228200151.2948-1-jacopo@jmondi.org>\n\t<20190228200151.2948-6-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190228200151.2948-6-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v5 5/9] libcamera: v4l2_subdevice:\n\tUpdate crop/compose rectangle","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Thu, 28 Feb 2019 22:05:06 -0000"}}]