lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfqQPTgqzOw7tATK@kekkonen.localdomain>
Date: Wed, 20 Mar 2024 07:29:01 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Zhi Mao <zhi.mao@...iatek.com>
Cc: mchehab@...nel.org, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org,
	laurent.pinchart@...asonboard.com, shengnan.wang@...iatek.com,
	yaya.chang@...iatek.com,
	Project_Global_Chrome_Upstream_Group@...iatek.com,
	yunkec@...omium.org, conor+dt@...nel.org, matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com,
	jacopo.mondi@...asonboard.com, 10572168@...com,
	hverkuil-cisco@...all.nl, heiko@...ech.de, jernej.skrabec@...il.com,
	macromorgan@...mail.com, linus.walleij@...aro.org,
	hdegoede@...hat.com, tomi.valkeinen@...asonboard.com,
	gerald.loacker@...fvision.net, andy.shevchenko@...il.com,
	bingbu.cao@...el.com, dan.scally@...asonboard.com,
	linux-media@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver

Hi Zhi,

Thanks for the set.

On Sat, Mar 16, 2024 at 10:52:53AM +0800, Zhi Mao wrote:
> +static int gc05a2_set_ctrl(struct v4l2_ctrl *ctrl)
> +{
> +	struct gc05a2 *gc05a2 =
> +		container_of(ctrl->handler, struct gc05a2, ctrls);
> +	int ret = 0;
> +	s64 exposure_max;
> +	struct v4l2_subdev_state *state;
> +	const struct v4l2_mbus_framefmt *format;
> +
> +	state = v4l2_subdev_get_locked_active_state(&gc05a2->sd);
> +	format = v4l2_subdev_state_get_format(state, 0);
> +
> +	if (ctrl->id == V4L2_CID_VBLANK) {
> +		/* Update max exposure while meeting expected vblanking */
> +		exposure_max = format->height + ctrl->val - GC05A2_EXP_MARGIN;
> +		__v4l2_ctrl_modify_range(gc05a2->exposure,
> +					 gc05a2->exposure->minimum,
> +					 exposure_max, gc05a2->exposure->step,
> +					 exposure_max);
> +	}
> +
> +	/*
> +	 * Applying V4L2 control value only happens
> +	 * when power is on for streaming.
> +	 */
> +	if (!pm_runtime_get_if_in_use(gc05a2->dev))

This should be pm_runtime_get_if_active(). Please assume it takes a single
argument (the device)---see commit
c0ef3df8dbaef51ee4cfd58a471adf2eaee6f6b3.

The same comment applies to the GC08A3 if it uses autosuspend, please post
a new patch for that.

-- 
Kind regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ