[{"id":31476,"web_url":"https://patchwork.libcamera.org/comment/31476/","msgid":"<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>","date":"2024-10-01T06:25:37","subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Mon, Sep 30, 2024 at 03:14:11PM GMT, Naushir Patuck wrote:\n> This will be required when we program separate crop values to each ISP\n> output in a future commit.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n>  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n>  3 files changed, 6 insertions(+), 5 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 11f1bfd4a5da..2de6111bacfd 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n>\n>  \t\tif (ispCrop != ispCrop_) {\n>  \t\t\tispCrop_ = ispCrop;\n> -\t\t\tplatformSetIspCrop();\n> +\t\t\tplatformSetIspCrop(ispCrop);\n>  \t\t}\n>  \t}\n>  }\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> index 5161c16e518f..d65b695c30b5 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> @@ -83,7 +83,7 @@ public:\n>\n>  \tRectangle scaleIspCrop(const Rectangle &ispCrop) const;\n>  \tvoid applyScalerCrop(const ControlList &controls);\n> -\tvirtual void platformSetIspCrop() = 0;\n> +\tvirtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n>\n>  \tvoid cameraTimeout();\n>  \tvoid frameStarted(uint32_t sequence);\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index e5b6ef2b37cd..0ea032293bc9 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -109,9 +109,10 @@ public:\n>  \tConfig config_;\n>\n>  private:\n> -\tvoid platformSetIspCrop() override\n> +\tvoid platformSetIspCrop(const Rectangle &ispCrop) override\n>  \t{\n> -\t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n> +\t\tRectangle crop = ispCrop;\n> +\t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n\nsetSelection() can modify the rectangle received as argument, if that\nhappens, this won't be reflected on the argument ?\n\n>  \t}\n>\n>  \tint platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n> @@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n>  \tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n>  \tispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n>\n> -\tplatformSetIspCrop();\n> +\tplatformSetIspCrop(ispCrop_);\n>\n>  \treturn 0;\n>  }\n> --\n> 2.34.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 2F5C9C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 06:25:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3196F6350E;\n\tTue,  1 Oct 2024 08:25:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B36DA62C91\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 08:25:42 +0200 (CEST)","from ideasonboard.com (unknown [5.179.150.95])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BC5E62E3;\n\tTue,  1 Oct 2024 08:24:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"D9ZeaXib\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727763851;\n\tbh=hmMt9++u6dmD2iNr1MOxY4nMVJZhMagxhy+f3zLH0Ww=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=D9ZeaXibyTNrOnoRKlK7i6IZowhD97t8JUUe10us8PIEyVpJXdo7lMZtL5rpGp8YW\n\trqtTzGclcQfFGGvJM40APaBjdlVlYBXD/UCgdtbuUv5yTEuYYMv800EimRabaFN2cl\n\tSFlMrrsLxv3dpcMcILgWOckugJTFeK9iAVbjdJo8=","Date":"Tue, 1 Oct 2024 08:25:37 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","Message-ID":"<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-4-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240930141415.8857-4-naush@raspberrypi.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31496,"web_url":"https://patchwork.libcamera.org/comment/31496/","msgid":"<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>","date":"2024-10-01T11:07:06","subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nOn Tue, 1 Oct 2024 at 07:25, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n>\n> Hi Naush\n>\n> On Mon, Sep 30, 2024 at 03:14:11PM GMT, Naushir Patuck wrote:\n> > This will be required when we program separate crop values to each ISP\n> > output in a future commit.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> >  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n> >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n> >  3 files changed, 6 insertions(+), 5 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > index 11f1bfd4a5da..2de6111bacfd 100644\n> > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > @@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n> >\n> >               if (ispCrop != ispCrop_) {\n> >                       ispCrop_ = ispCrop;\n> > -                     platformSetIspCrop();\n> > +                     platformSetIspCrop(ispCrop);\n> >               }\n> >       }\n> >  }\n> > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > index 5161c16e518f..d65b695c30b5 100644\n> > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > @@ -83,7 +83,7 @@ public:\n> >\n> >       Rectangle scaleIspCrop(const Rectangle &ispCrop) const;\n> >       void applyScalerCrop(const ControlList &controls);\n> > -     virtual void platformSetIspCrop() = 0;\n> > +     virtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n> >\n> >       void cameraTimeout();\n> >       void frameStarted(uint32_t sequence);\n> > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > index e5b6ef2b37cd..0ea032293bc9 100644\n> > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > @@ -109,9 +109,10 @@ public:\n> >       Config config_;\n> >\n> >  private:\n> > -     void platformSetIspCrop() override\n> > +     void platformSetIspCrop(const Rectangle &ispCrop) override\n> >       {\n> > -             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n> > +             Rectangle crop = ispCrop;\n> > +             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n>\n> setSelection() can modify the rectangle received as argument, if that\n> happens, this won't be reflected on the argument ?\n\nThis cannot happen on the VC4 platform - we allow arbitrary crops, and\nthe device driver will never modify the user requested value.\n\nRegards,\nNaush\n\n>\n> >       }\n> >\n> >       int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n> > @@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n> >       Size size = unicamFormat.size.boundedToAspectRatio(maxSize);\n> >       ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n> >\n> > -     platformSetIspCrop();\n> > +     platformSetIspCrop(ispCrop_);\n> >\n> >       return 0;\n> >  }\n> > --\n> > 2.34.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 118BBBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 11:07:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD4CF63524;\n\tTue,  1 Oct 2024 13:07:37 +0200 (CEST)","from mail-ed1-x536.google.com (mail-ed1-x536.google.com\n\t[IPv6:2a00:1450:4864:20::536])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BFF7618D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 13:07:36 +0200 (CEST)","by mail-ed1-x536.google.com with SMTP id\n\t4fb4d7f45d1cf-5c87f296bceso483010a12.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 01 Oct 2024 04:07:36 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"KntojRqi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727780856; x=1728385656;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=tSQgJOhusqtTQoQdo0nDMVyt7O8EqcizTHRpj3VrBVs=;\n\tb=KntojRqi57849PLEGzrDEDRu0DH978xPWCSeXtDxzVdEyJVJY2dXG+/U8/RK9fSQ7v\n\twWiYylZOEyOnhXGBeBSnu/c4Az5dtHrjM5TaoCCe+/nydUv9YXZm0Qo8/L1X3ZjyS7A9\n\tavLl4FSYgsNJeDpuspU9BSJvbq6nLFtTlPx6i5l5yHsn1yvCwvpn+Sf4Wi+lrcmdUPmN\n\t8AyXQ3UGFlt6Zp71s6tHPXFCCbklcA61fb+MbtLDW7DQ5vAqZZZEcZrEodMcrovC29C0\n\t2OuNcREApv+uCz3+QIteFWdypuJrWupUFh4cyk0qrLtMh1aH4LXXNd4sDz59h1b8ZoZ6\n\tUf7g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727780856; x=1728385656;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=tSQgJOhusqtTQoQdo0nDMVyt7O8EqcizTHRpj3VrBVs=;\n\tb=JLeRvf68GtzwFgNAjZ8KbKbmohgyBhHmSPbyoPt3HSf3ADrHB7nXquLra+Xm5faxLr\n\tRLLUlAokrxD/r3ReSEMRQM1TZSJNBQwPcH92vtqg1s1xi/ARq/kuSgHQ3BwvXZS79xIT\n\tupvTuW82p5spIRDc/8zKFpiKbsU+R3j2DXqSSJ8jZC7KXQEAezYVmd96+ZSxhx5vJLMX\n\to/4I/QBtvXHqZgs9PbBW3axxTPZlbkmiAYHh66t8YWIvXDDVRz8A4+3gDHU4QHty/yEh\n\tRKsiiTTn0q9RyAdvcP/e91509QD53d2DQfGP82VPPu3SuLX9iOlhEX4W4nMjmBHfIVOL\n\tFWiQ==","X-Gm-Message-State":"AOJu0Yx64pIvwsj/TBjshYAoTQBTttAFITxI+h9ShwvsWmaFoPHyBjQH\n\tFoGSa26J8T7bMxFkz3/j5UieJFtdguWPaPPTszhA/qjVzs/XbhxQjPmLsO+HltdLVHe8vAPKNkB\n\tNOKw7uOJsIvbDgtFAy7ePH5WVivCP5IB4UX//rbmjkoSUIysB","X-Google-Smtp-Source":"AGHT+IGasnr9Hux4EtPv/4zgccz3UTU8pj7vXHdSRouluZt+CO8lFKXhTRATSkBi2DlZvBIphe6rtIy53NvmDbqfJQo=","X-Received":"by 2002:a05:6402:13d2:b0:5c5:c5fc:1aa6 with SMTP id\n\t4fb4d7f45d1cf-5c882600859mr5537838a12.5.1727780855414;\n\tTue, 01 Oct 2024 04:07:35 -0700 (PDT)","MIME-Version":"1.0","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-4-naush@raspberrypi.com>\n\t<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>","In-Reply-To":"<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Tue, 1 Oct 2024 12:07:06 +0100","Message-ID":"<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>","Subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31502,"web_url":"https://patchwork.libcamera.org/comment/31502/","msgid":"<u5hg47nqkpun2knxznta2owmjsa7fyx2ru4hogvbeesywvrotd@yrr4ttpz5iqg>","date":"2024-10-01T11:28:28","subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Tue, Oct 01, 2024 at 12:07:06PM GMT, Naushir Patuck wrote:\n> Hi Jacopo,\n>\n> On Tue, 1 Oct 2024 at 07:25, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n> >\n> > Hi Naush\n> >\n> > On Mon, Sep 30, 2024 at 03:14:11PM GMT, Naushir Patuck wrote:\n> > > This will be required when we program separate crop values to each ISP\n> > > output in a future commit.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> > >  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n> > >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n> > >  3 files changed, 6 insertions(+), 5 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > index 11f1bfd4a5da..2de6111bacfd 100644\n> > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > @@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n> > >\n> > >               if (ispCrop != ispCrop_) {\n> > >                       ispCrop_ = ispCrop;\n> > > -                     platformSetIspCrop();\n> > > +                     platformSetIspCrop(ispCrop);\n> > >               }\n> > >       }\n> > >  }\n> > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > index 5161c16e518f..d65b695c30b5 100644\n> > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > @@ -83,7 +83,7 @@ public:\n> > >\n> > >       Rectangle scaleIspCrop(const Rectangle &ispCrop) const;\n> > >       void applyScalerCrop(const ControlList &controls);\n> > > -     virtual void platformSetIspCrop() = 0;\n> > > +     virtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n> > >\n> > >       void cameraTimeout();\n> > >       void frameStarted(uint32_t sequence);\n> > > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > index e5b6ef2b37cd..0ea032293bc9 100644\n> > > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > @@ -109,9 +109,10 @@ public:\n> > >       Config config_;\n> > >\n> > >  private:\n> > > -     void platformSetIspCrop() override\n> > > +     void platformSetIspCrop(const Rectangle &ispCrop) override\n> > >       {\n> > > -             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n> > > +             Rectangle crop = ispCrop;\n> > > +             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n> >\n> > setSelection() can modify the rectangle received as argument, if that\n> > happens, this won't be reflected on the argument ?\n>\n> This cannot happen on the VC4 platform - we allow arbitrary crops, and\n> the device driver will never modify the user requested value.\n>\n\nIs this the same for pisp ?\n\n> Regards,\n> Naush\n>\n> >\n> > >       }\n> > >\n> > >       int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n> > > @@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n> > >       Size size = unicamFormat.size.boundedToAspectRatio(maxSize);\n> > >       ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n> > >\n> > > -     platformSetIspCrop();\n> > > +     platformSetIspCrop(ispCrop_);\n> > >\n> > >       return 0;\n> > >  }\n> > > --\n> > > 2.34.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 A1FB7C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 11:28:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 245C663523;\n\tTue,  1 Oct 2024 13:28:35 +0200 (CEST)","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 4B2F960553\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 13:28:33 +0200 (CEST)","from ideasonboard.com (unknown [5.179.150.95])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66EA51083;\n\tTue,  1 Oct 2024 13:27:01 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"thSKRsjg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727782021;\n\tbh=ZQfndFVbanoICdXxKv2pe32kVagBSauW8sr3Nt6XJ78=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=thSKRsjgF4M4F6EJTQwWSjBNkliGaunNqjh/nIutQSC5Gd6wPuhJ3Ht48qQI1L22U\n\tvSBv/GjGgUMC7h97M/vkN+QqA9JHUxCYOUIZIqJPhLNDG2O0Ei/FvuhmD48hOVUP/O\n\tipOjg7YWofYDSG9SZ3faqkIJut5FiHdOhUndy2LQ=","Date":"Tue, 1 Oct 2024 13:28:28 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","Message-ID":"<u5hg47nqkpun2knxznta2owmjsa7fyx2ru4hogvbeesywvrotd@yrr4ttpz5iqg>","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-4-naush@raspberrypi.com>\n\t<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>\n\t<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31503,"web_url":"https://patchwork.libcamera.org/comment/31503/","msgid":"<CAEmqJPpRE5n4hy4i9Rx8pxs06qeNNydN5n_8+yt_6ieXg2u+2g@mail.gmail.com>","date":"2024-10-01T12:06:40","subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Tue, 1 Oct 2024 at 12:28, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n>\n> Hi Naush\n>\n> On Tue, Oct 01, 2024 at 12:07:06PM GMT, Naushir Patuck wrote:\n> > Hi Jacopo,\n> >\n> > On Tue, 1 Oct 2024 at 07:25, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n> > >\n> > > Hi Naush\n> > >\n> > > On Mon, Sep 30, 2024 at 03:14:11PM GMT, Naushir Patuck wrote:\n> > > > This will be required when we program separate crop values to each ISP\n> > > > output in a future commit.\n> > > >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > ---\n> > > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> > > >  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n> > > >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n> > > >  3 files changed, 6 insertions(+), 5 deletions(-)\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > index 11f1bfd4a5da..2de6111bacfd 100644\n> > > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > @@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n> > > >\n> > > >               if (ispCrop != ispCrop_) {\n> > > >                       ispCrop_ = ispCrop;\n> > > > -                     platformSetIspCrop();\n> > > > +                     platformSetIspCrop(ispCrop);\n> > > >               }\n> > > >       }\n> > > >  }\n> > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > index 5161c16e518f..d65b695c30b5 100644\n> > > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > @@ -83,7 +83,7 @@ public:\n> > > >\n> > > >       Rectangle scaleIspCrop(const Rectangle &ispCrop) const;\n> > > >       void applyScalerCrop(const ControlList &controls);\n> > > > -     virtual void platformSetIspCrop() = 0;\n> > > > +     virtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n> > > >\n> > > >       void cameraTimeout();\n> > > >       void frameStarted(uint32_t sequence);\n> > > > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > index e5b6ef2b37cd..0ea032293bc9 100644\n> > > > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > @@ -109,9 +109,10 @@ public:\n> > > >       Config config_;\n> > > >\n> > > >  private:\n> > > > -     void platformSetIspCrop() override\n> > > > +     void platformSetIspCrop(const Rectangle &ispCrop) override\n> > > >       {\n> > > > -             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n> > > > +             Rectangle crop = ispCrop;\n> > > > +             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n> > >\n> > > setSelection() can modify the rectangle received as argument, if that\n> > > happens, this won't be reflected on the argument ?\n> >\n> > This cannot happen on the VC4 platform - we allow arbitrary crops, and\n> > the device driver will never modify the user requested value.\n> >\n>\n> Is this the same for pisp ?\n\npisp can also support entirely arbitrary crops - but we don't use\nsetSelection there.  It's all done through the config buffer.\n\nNaush\n\n\n>\n> > Regards,\n> > Naush\n> >\n> > >\n> > > >       }\n> > > >\n> > > >       int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n> > > > @@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n> > > >       Size size = unicamFormat.size.boundedToAspectRatio(maxSize);\n> > > >       ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n> > > >\n> > > > -     platformSetIspCrop();\n> > > > +     platformSetIspCrop(ispCrop_);\n> > > >\n> > > >       return 0;\n> > > >  }\n> > > > --\n> > > > 2.34.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 74636BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 12:07:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 696B16351F;\n\tTue,  1 Oct 2024 14:07:19 +0200 (CEST)","from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com\n\t[IPv6:2607:f8b0:4864:20::112d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7EB5060553\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 14:07:17 +0200 (CEST)","by mail-yw1-x112d.google.com with SMTP id\n\t00721157ae682-6e2317cf8bcso4677257b3.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 01 Oct 2024 05:07:17 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"lcWkr8J/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727784436; x=1728389236;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=c03nnBsNd50UjaA1XvmTv+Acegx9wZxIGkvNde0DF4s=;\n\tb=lcWkr8J/RycGyEyFu4I03ulpNMgXLQo9Dl2oTYkroNZVIGFbeCHhg0mTh/o4mG1Y20\n\tzlZ0upocraXLIyzppbVeFWOgDVEn8ZOOClQurU6TPuDo7X0/2jOtFhHjP0gqHJGNTSqI\n\tL9gOCUc2W2ar4/WfyQcdIpSAoI8GB7uDRq6MKXWdHJAEueZ9fefWVLoxtVOJGwLfQ2NY\n\t2hJiwpYso/7FbTWz8W6BhsN/evSi2LE1DFu3sH97UzkdwgUFWRlxitYSj0RaaK073nEJ\n\tUGdGnFN50iHe1EnYOfBqes3OVMHeSRG4+tnTGJmuHy2tK/yNn0x6XuQ5TBXZBYWBgA0Z\n\t2JKw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727784436; x=1728389236;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=c03nnBsNd50UjaA1XvmTv+Acegx9wZxIGkvNde0DF4s=;\n\tb=R8/qG7gLaKDjsd2fNL9ET7YyHALHN87561L2GmRjCz87E1xef1yJgW+Pt/x+6wfj9f\n\txdkz8Clv0niCBupl4Qqya7P1D9TjROdsvEsUhwgsuljDunxANWaYK7tjUXpT0wn3HPBy\n\t6rkTh4DGXr1R04X4IwzboXvUkFtHo8lF6TGHSmII3++J+zErgMxR6NcXDv9A/WpkWCEM\n\tfE2h5YiTV1phrXbpt6SzOeJieYlEnWGpcFF8lOPoq0DHtzE9SDEHS+bdep+uRkgClhBf\n\t67P1LHbyzbYiPPxEHSqJ0Q5t6P31OVdiuc8geoT8Lyo7HnFLgdHPFwmHZ3sNR8tRL1Fz\n\t2/hA==","X-Gm-Message-State":"AOJu0YwLJNdIvN8LQ6Z9WW9/pjJ2yI5bGTf2xVeFMQlSSzmuVeJxPE7S\n\tgID74X8QRsOkasJkG1dFfPuPmWfj8L4OcCUmThJQNKz1sCoAjbXOiqrZtugjEqgitAInfH2lhJR\n\t1wJl48B1B61uIZY8qsXb4k9sinQL3QS0Y2zMCTSSitPrsw63t","X-Google-Smtp-Source":"AGHT+IFGgBUl3/tPqMgwX5qBCH5xTQtH673ZoPOJdDh52dS2vN2ociZorWLpA9wdsU+3ysQT7zoaoxPlliz5Doo+aEk=","X-Received":"by 2002:a05:690c:6612:b0:6dd:ca99:6abc with SMTP id\n\t00721157ae682-6e2474e56demr50799787b3.1.1727784436196;\n\tTue, 01 Oct 2024 05:07:16 -0700 (PDT)","MIME-Version":"1.0","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-4-naush@raspberrypi.com>\n\t<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>\n\t<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>\n\t<u5hg47nqkpun2knxznta2owmjsa7fyx2ru4hogvbeesywvrotd@yrr4ttpz5iqg>","In-Reply-To":"<u5hg47nqkpun2knxznta2owmjsa7fyx2ru4hogvbeesywvrotd@yrr4ttpz5iqg>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Tue, 1 Oct 2024 13:06:40 +0100","Message-ID":"<CAEmqJPpRE5n4hy4i9Rx8pxs06qeNNydN5n_8+yt_6ieXg2u+2g@mail.gmail.com>","Subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31509,"web_url":"https://patchwork.libcamera.org/comment/31509/","msgid":"<ohymomfbims3262unpvx2azcpi62sw2i36f5a6oecandd4l5uz@pdsmuazwgf6z>","date":"2024-10-01T18:15:42","subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Tue, Oct 01, 2024 at 01:06:40PM GMT, Naushir Patuck wrote:\n> On Tue, 1 Oct 2024 at 12:28, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n> >\n> > Hi Naush\n> >\n> > On Tue, Oct 01, 2024 at 12:07:06PM GMT, Naushir Patuck wrote:\n> > > Hi Jacopo,\n> > >\n> > > On Tue, 1 Oct 2024 at 07:25, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n> > > >\n> > > > Hi Naush\n> > > >\n> > > > On Mon, Sep 30, 2024 at 03:14:11PM GMT, Naushir Patuck wrote:\n> > > > > This will be required when we program separate crop values to each ISP\n> > > > > output in a future commit.\n> > > > >\n> > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > ---\n> > > > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> > > > >  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n> > > > >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n> > > > >  3 files changed, 6 insertions(+), 5 deletions(-)\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > > index 11f1bfd4a5da..2de6111bacfd 100644\n> > > > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > > @@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n> > > > >\n> > > > >               if (ispCrop != ispCrop_) {\n> > > > >                       ispCrop_ = ispCrop;\n> > > > > -                     platformSetIspCrop();\n> > > > > +                     platformSetIspCrop(ispCrop);\n> > > > >               }\n> > > > >       }\n> > > > >  }\n> > > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > > index 5161c16e518f..d65b695c30b5 100644\n> > > > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> > > > > @@ -83,7 +83,7 @@ public:\n> > > > >\n> > > > >       Rectangle scaleIspCrop(const Rectangle &ispCrop) const;\n> > > > >       void applyScalerCrop(const ControlList &controls);\n> > > > > -     virtual void platformSetIspCrop() = 0;\n> > > > > +     virtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n> > > > >\n> > > > >       void cameraTimeout();\n> > > > >       void frameStarted(uint32_t sequence);\n> > > > > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > > index e5b6ef2b37cd..0ea032293bc9 100644\n> > > > > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > > > @@ -109,9 +109,10 @@ public:\n> > > > >       Config config_;\n> > > > >\n> > > > >  private:\n> > > > > -     void platformSetIspCrop() override\n> > > > > +     void platformSetIspCrop(const Rectangle &ispCrop) override\n> > > > >       {\n> > > > > -             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n> > > > > +             Rectangle crop = ispCrop;\n> > > > > +             isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n> > > >\n> > > > setSelection() can modify the rectangle received as argument, if that\n> > > > happens, this won't be reflected on the argument ?\n> > >\n> > > This cannot happen on the VC4 platform - we allow arbitrary crops, and\n> > > the device driver will never modify the user requested value.\n> > >\n> >\n> > Is this the same for pisp ?\n>\n> pisp can also support entirely arbitrary crops - but we don't use\n> setSelection there.  It's all done through the config buffer.\n\nFine then\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n>\n> Naush\n>\n>\n> >\n> > > Regards,\n> > > Naush\n> > >\n> > > >\n> > > > >       }\n> > > > >\n> > > > >       int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n> > > > > @@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n> > > > >       Size size = unicamFormat.size.boundedToAspectRatio(maxSize);\n> > > > >       ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n> > > > >\n> > > > > -     platformSetIspCrop();\n> > > > > +     platformSetIspCrop(ispCrop_);\n> > > > >\n> > > > >       return 0;\n> > > > >  }\n> > > > > --\n> > > > > 2.34.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 A04D8BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 18:15:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78C906351F;\n\tTue,  1 Oct 2024 20:15:47 +0200 (CEST)","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 2AF1860553\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 20:15:46 +0200 (CEST)","from ideasonboard.com (unknown [5.77.89.72])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D9C832E3;\n\tTue,  1 Oct 2024 20:14:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RgMzg75v\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727806454;\n\tbh=RDfH3UAWYdqFdM/WQDBFGsbjFPAfwk0rGrce/LKR3v0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RgMzg75v98sZV5yWwo9bHuEYXKKviHN2ITOSG+MmWvuvZ6/lHfeQE5CXRxMf23iEW\n\tbbtY0yOXfiEX3E2+iyiH1E3tg732JIpXNLpuddsDBs+/8PAcdcac2N3L/rbvEcOrlM\n\tpdK8vbltj5K0q75B9WCGlrO9fSMPkQQWuXCpctFc=","Date":"Tue, 1 Oct 2024 20:15:42 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter\n\tto platformSetIspCrop()","Message-ID":"<ohymomfbims3262unpvx2azcpi62sw2i36f5a6oecandd4l5uz@pdsmuazwgf6z>","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-4-naush@raspberrypi.com>\n\t<pjlrjnoq2n3qeruoyidv55hsyre4yjv6yzsdugdznb54x4h2dk@btqggc6kt5sj>\n\t<CAEmqJPqW0BBB_2FbzKQom7ZDrXhm6zP2-xxaVArbw5=Y4T5ejw@mail.gmail.com>\n\t<u5hg47nqkpun2knxznta2owmjsa7fyx2ru4hogvbeesywvrotd@yrr4ttpz5iqg>\n\t<CAEmqJPpRE5n4hy4i9Rx8pxs06qeNNydN5n_8+yt_6ieXg2u+2g@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPpRE5n4hy4i9Rx8pxs06qeNNydN5n_8+yt_6ieXg2u+2g@mail.gmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]