From: Sakari Ailus <sakari.ailus@iki.fi>
To: shravan kumar <shravan.chippa@microchip.com>
Cc: paul.j.murphy@intel.com, daniele.alessandrelli@intel.com,
mchehab@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, linux-imx@nxp.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v12 5/5] media: i2c: imx334: update pixel and link frequency
Date: Tue, 14 Mar 2023 21:05:21 +0200 [thread overview]
Message-ID: <ZBDFcXYeK0eB9i1v@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <20230301073412.1204574-6-shravan.chippa@microchip.com>
Hi Shravan,
On Wed, Mar 01, 2023 at 01:04:12PM +0530, shravan kumar wrote:
> @@ -885,7 +895,13 @@ static int imx334_init_pad_cfg(struct v4l2_subdev *sd,
> struct v4l2_subdev_format fmt = { 0 };
>
> fmt.which = sd_state ? V4L2_SUBDEV_FORMAT_TRY : V4L2_SUBDEV_FORMAT_ACTIVE;
> - imx334_fill_pad_format(imx334, &supported_modes[0], &fmt);
> + fmt->format.code = imx334->cur_code;
This does not compile.
> + imx334_fill_pad_format(imx334, imx334->cur_mode, &fmt);
> +
> + __v4l2_ctrl_modify_range(imx334->link_freq_ctrl, 0,
> + __fls(imx334->menu_skip_mask),
> + ~(imx334->menu_skip_mask),
> + __ffs(imx334->menu_skip_mask));
You're not holding imx334->mutex here, as you should. Also accessing
imx334->cur_code should only be done while that mutex is acquired.
What's the purpose of calling __v4l2_ctrl_modify_range() here, all these
values are static once probe() function has been called, aren't they?
I'm dropping this patch for now, taking the first four.
>
> return imx334_set_pad_format(sd, sd_state, &fmt);
> }
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2023-03-14 19:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 7:34 [PATCH v12 0/5] media: i2c: imx334: support lower bandwidth mode shravan kumar
2023-03-01 7:34 ` [PATCH v12 1/5] media: i2c: imx334: replace __v4l2_ctrl_s_ctrl to __v4l2_ctrl_modify_range shravan kumar
2023-03-01 7:34 ` [PATCH v12 2/5] media: i2c: imx334: add missing reset values for mode 3840x2160_regs[] shravan kumar
2023-03-01 7:34 ` [PATCH v12 3/5] media: i2c: imx334: support lower bandwidth mode shravan kumar
2023-03-01 7:34 ` [PATCH v12 4/5] dt-bindings: media: i2c: imx334 add new link_freq shravan kumar
2023-03-01 7:34 ` [PATCH v12 5/5] media: i2c: imx334: update pixel and link frequency shravan kumar
2023-03-14 19:05 ` Sakari Ailus [this message]
2023-03-21 15:41 ` Shravan.Chippa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBDFcXYeK0eB9i1v@valkosipuli.retiisi.eu \
--to=sakari.ailus@iki.fi \
--cc=daniele.alessandrelli@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=paul.j.murphy@intel.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shravan.chippa@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).