Re: [PATCH 2/2] media: i2c: Add OV1063x sensor driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

On 04/01/2021 07:39, Laurent Pinchart wrote:
> Add a new V4L2 subdev driver for the OmniVision OV10633 and OV10635
> camera sensors. The work is based on the driver from the TI BSP, itself
> based on original work by Phil Edworthy posted to the linux-media
> mailing list ([1]). This version of the code is a large rewrite of many
> parts.

<snip>

> +static int ov1063x_tpg_setup(struct ov1063x_priv *priv, struct v4l2_ctrl *ctrl)
> +{
> +	const struct ov1063x_tpg_config *cfg;
> +	int ret = 0;
> +
> +	if (!ctrl->val)
> +		return ov1063x_write_array(priv, ov1063x_regs_colorbar_disable,
> +					   ARRAY_SIZE(ov1063x_regs_colorbar_disable));
> +
> +	if (!ctrl->cur.val) {
> +		/*
> +		 * Only write the full settings when the test pattern was
> +		 * disabled, not when we're just changing the test pattern type.
> +		 */
> +		ret = ov1063x_write_array(priv, ov1063x_regs_colorbar_enable,
> +					  ARRAY_SIZE(ov1063x_regs_colorbar_enable));
> +		if (ret < 0)
> +			return ret;
> +	}
> +
> +	cfg = &ov1063x_tpg_configs[ctrl->val - 1];
> +
> +	/* TODO: Add support for the moving bar overlay. */
> +	ov1063x_write(priv, OV1063X_ISP_CTRL3D, cfg->ctrl3d, &ret);
> +	ov1063x_write(priv, OV1063X_ISP_CTRL3E, cfg->ctrl3e, &ret);
> +
> +	return ret;
> +}

I didn't go through the code in detail, but looks like the color bar
settings from ov1063x_regs_colorbar_enable are lost if capture is
stopped and started again. The color bar itself stays, but it's
distorted due to all the ISP processing being done.

 Tomi




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux