[{"id":12028,"web_url":"https://patchwork.libcamera.org/comment/12028/","msgid":"<20200818073332.GM24582@paasikivi.fi.intel.com>","date":"2020-08-18T07:33:33","subject":"Re: [libcamera-devel] [PATCH 11/25] media: ov5647: Implement\n\tenum_frame_size()","submitter":{"id":37,"url":"https://patchwork.libcamera.org/api/people/37/","name":"Sakari Ailus","email":"sakari.ailus@linux.intel.com"},"content":"Hi Jacopo,\n\nOn Tue, Jun 23, 2020 at 06:42:20PM +0200, Jacopo Mondi wrote:\n> Implement the .enum_frame_size subdev pad operation.\n> \n> As the driver only supports one format and one resolution at the moment\n> the implementation is trivial.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  drivers/media/i2c/ov5647.c | 25 ++++++++++++++++++++++---\n>  1 file changed, 22 insertions(+), 3 deletions(-)\n> \n> diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c\n> index bb9ff77f49fe0..859cc5b0d14a3 100644\n> --- a/drivers/media/i2c/ov5647.c\n> +++ b/drivers/media/i2c/ov5647.c\n> @@ -482,6 +482,24 @@ static int ov5647_enum_mbus_code(struct v4l2_subdev *sd,\n>  \treturn 0;\n>  }\n>  \n> +static int ov5647_enum_frame_size(struct v4l2_subdev *sd,\n> +\t\t\t\t  struct v4l2_subdev_pad_config *cfg,\n> +\t\t\t\t  struct v4l2_subdev_frame_size_enum *fse)\n> +{\n> +\tif (fse->index)\n> +\t\treturn -EINVAL;\n> +\n> +\tif (fse->code != MEDIA_BUS_FMT_SBGGR8_1X8)\n> +\t\treturn -EINVAL;\n> +\n> +\tfse->min_width = 640;\n> +\tfse->max_width = 640;\n> +\tfse->min_height = 480;\n> +\tfse->max_height = 480;\n\nCould this be somehow connected to the mode used? Or at least use a macro\ndefined close to the mode? This seems to be a 1,3 MP sensor and the driver\nonly supports VGA...\n\n> +\n> +\treturn 0;\n> +}\n> +\n>  static int ov5647_set_get_fmt(struct v4l2_subdev *sd,\n>  \t\t\t      struct v4l2_subdev_pad_config *cfg,\n>  \t\t\t      struct v4l2_subdev_format *format)\n> @@ -500,9 +518,10 @@ static int ov5647_set_get_fmt(struct v4l2_subdev *sd,\n>  }\n>  \n>  static const struct v4l2_subdev_pad_ops ov5647_subdev_pad_ops = {\n> -\t.enum_mbus_code = ov5647_enum_mbus_code,\n> -\t.set_fmt =\t  ov5647_set_get_fmt,\n> -\t.get_fmt =\t  ov5647_set_get_fmt,\n> +\t.enum_mbus_code\t\t= ov5647_enum_mbus_code,\n> +\t.enum_frame_size\t= ov5647_enum_frame_size,\n> +\t.set_fmt\t\t= ov5647_set_get_fmt,\n> +\t.get_fmt\t\t= ov5647_set_get_fmt,\n>  };\n>  \n>  static const struct v4l2_subdev_ops ov5647_subdev_ops = {\n> -- \n> 2.27.0\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 A56ACBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Aug 2020 07:33:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 319A661983;\n\tTue, 18 Aug 2020 09:33:46 +0200 (CEST)","from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF34F60382\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Aug 2020 09:33:43 +0200 (CEST)","from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t18 Aug 2020 00:33:41 -0700","from paasikivi.fi.intel.com ([10.237.72.42])\n\tby orsmga001-auth.jf.intel.com with\n\tESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 00:33:35 -0700","by paasikivi.fi.intel.com (Postfix, from userid 1000)\n\tid 240B12064F; Tue, 18 Aug 2020 10:33:33 +0300 (EEST)"],"IronPort-SDR":["0bybxk9J9u2xOIQ9dW7cEJdzMImeXuxcdWJly3pNOLxHqItIAy/uRZOwukwhceAf2aT4PxV/7+\n\tPJhqIswQh96w==","aJjcCgea7onE7UrERdJbEXaYnBnIhEV60KW61TLRSyq/1PIcF9PPmH+St335cdr7ziFGsgQlZD\n\tb/I/ZAsuga+w=="],"X-IronPort-AV":["E=McAfee;i=\"6000,8403,9716\"; a=\"154115237\"","E=Sophos;i=\"5.76,326,1592895600\"; d=\"scan'208\";a=\"154115237\"","E=Sophos;i=\"5.76,326,1592895600\"; d=\"scan'208\";a=\"370817579\""],"X-Amp-Result":"SKIPPED(no attachment in message)","X-Amp-File-Uploaded":"False","Date":"Tue, 18 Aug 2020 10:33:33 +0300","From":"Sakari Ailus <sakari.ailus@linux.intel.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200818073332.GM24582@paasikivi.fi.intel.com>","References":"<20200623100815.10674-1-jacopo@jmondi.org>\n\t<20200623164224.44476-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200623164224.44476-1-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 11/25] media: ov5647: Implement\n\tenum_frame_size()","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":"andrew_gabbasov@mentor.com, linux-media@vger.kernel.org,\n\tmrodin@de.adit-jv.com, erosca@de.adit-jv.com, mripard@kernel.org,\n\troman.kovalivskyi@globallogic.com, libcamera-devel@lists.libcamera.org,\n\tdave.stevenson@raspberrypi.org, hugues.fruchet@st.com,\n\tmchehab@kernel.org, aford173@gmail.com, sudipi@jp.adit-jv.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>"}},{"id":12029,"web_url":"https://patchwork.libcamera.org/comment/12029/","msgid":"<20200818073833.GN24582@paasikivi.fi.intel.com>","date":"2020-08-18T07:38:33","subject":"Re: [libcamera-devel] [PATCH 11/25] media: ov5647: Implement\n\tenum_frame_size()","submitter":{"id":37,"url":"https://patchwork.libcamera.org/api/people/37/","name":"Sakari Ailus","email":"sakari.ailus@linux.intel.com"},"content":"> Could this be somehow connected to the mode used? Or at least use a macro\n> defined close to the mode? This seems to be a 1,3 MP sensor and the driver\n> only supports VGA...\n\nPlease ignore the comment. I see it's actually addressed by the next patch.","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 3CF4CBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Aug 2020 07:38:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D81A761930;\n\tTue, 18 Aug 2020 09:38:42 +0200 (CEST)","from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 12F3960382\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Aug 2020 09:38:40 +0200 (CEST)","from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t18 Aug 2020 00:38:39 -0700","from paasikivi.fi.intel.com ([10.237.72.42])\n\tby orsmga008-auth.jf.intel.com with\n\tESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 00:38:35 -0700","by paasikivi.fi.intel.com (Postfix, from userid 1000)\n\tid 2A0DD2064F; Tue, 18 Aug 2020 10:38:33 +0300 (EEST)"],"IronPort-SDR":["8695m8VZ5jYBk4zDiSOQn0iayiVUUTLOJEM6J5QzISJopP2yZ3UUU66bO+29oYpmBT/vutkoYs\n\tmHT091V5MEpA==","cdTvY5VcxnkpImfhNhkOUaXMyUVwsB73/nuW1YgkjSv0sJJHaRcbWm8Y9UyKLkgLEX3mKwS0XV\n\tlN9VUEGmVphQ=="],"X-IronPort-AV":["E=McAfee;i=\"6000,8403,9716\"; a=\"134916886\"","E=Sophos;i=\"5.76,326,1592895600\"; d=\"scan'208\";a=\"134916886\"","E=Sophos;i=\"5.76,326,1592895600\"; d=\"scan'208\";a=\"326654400\""],"X-Amp-Result":"SKIPPED(no attachment in message)","X-Amp-File-Uploaded":"False","Date":"Tue, 18 Aug 2020 10:38:33 +0300","From":"Sakari Ailus <sakari.ailus@linux.intel.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200818073833.GN24582@paasikivi.fi.intel.com>","References":"<20200623100815.10674-1-jacopo@jmondi.org>\n\t<20200623164224.44476-1-jacopo@jmondi.org>\n\t<20200818073332.GM24582@paasikivi.fi.intel.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200818073332.GM24582@paasikivi.fi.intel.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 11/25] media: ov5647: Implement\n\tenum_frame_size()","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":"andrew_gabbasov@mentor.com, linux-media@vger.kernel.org,\n\tmrodin@de.adit-jv.com, erosca@de.adit-jv.com, mripard@kernel.org,\n\troman.kovalivskyi@globallogic.com, libcamera-devel@lists.libcamera.org,\n\tdave.stevenson@raspberrypi.org, hugues.fruchet@st.com,\n\tmchehab@kernel.org, aford173@gmail.com, sudipi@jp.adit-jv.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>"}}]