Commit 42dc8149 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull media fixes from Mauro Carvalho Chehab:

 - driver fixes due to incorrect fwnode_handle_put() call

 - bt8xx: bttv_risc_packed(): remove field checks

 - vb2: frame_vector.c: replace WARN_ONCE with a comment

 - imx219: a couple typo fixes and perform a full mode set
   unconditionally

 - uvcvideo: Fix OOB read

 - some dependency fixes

* tag 'media/v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call
  media: vb2: frame_vector.c: replace WARN_ONCE with a comment
  media: uvcvideo: Fix OOB read
  media: bt8xx: bttv_risc_packed(): remove field checks
  media: i2c: rdacm21: Remove an incorrect fwnode_handle_put() call
  media: i2c: imx219: Perform a full mode set unconditionally
  media: i2c: imx219: Fix crop rectangle setting when changing format
  media: i2c: imx219: Fix a typo referring to a wrong variable
  media: i2c: max9286: Remove an incorrect fwnode_handle_put() call
  media: ivsc: Depend on VIDEO_DEV
  media: via: Use correct dependency for camera sensor drivers
  media: v4l: Use correct dependency for camera sensor drivers
  media: pci: ivsc: Select build dependencies
parents a229cf67 263cb0cc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@
 * different type underlying the specified range of virtual addresses.
 * When the function isn't able to map a single page, it returns error.
 *
 * Note that get_vaddr_frames() cannot follow VM_IO mappings. It used
 * to be able to do that, but that could (racily) return non-refcounted
 * pfns.
 *
 * This function takes care of grabbing mmap_lock as necessary.
 */
int get_vaddr_frames(unsigned long start, unsigned int nr_frames, bool write,
@@ -59,8 +63,6 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, bool write,
	if (likely(ret > 0))
		return ret;

	/* This used to (racily) return non-refcounted pfns. Let people know */
	WARN_ONCE(1, "get_vaddr_frames() cannot follow VM_IO mapping");
	vec->nr_frames = 0;
	return ret ? ret : -EFAULT;
}
+7 −6
Original line number Diff line number Diff line
@@ -691,12 +691,12 @@ static int imx219_init_cfg(struct v4l2_subdev *sd,
	struct v4l2_mbus_framefmt *format;
	struct v4l2_rect *crop;

	/* Initialize try_fmt */
	/* Initialize the format. */
	format = v4l2_subdev_get_pad_format(sd, state, 0);
	imx219_update_pad_format(imx219, &supported_modes[0], format,
				 MEDIA_BUS_FMT_SRGGB10_1X10);

	/* Initialize crop rectangle. */
	/* Initialize the crop rectangle. */
	crop = v4l2_subdev_get_pad_crop(sd, state, 0);
	crop->top = IMX219_PIXEL_ARRAY_TOP;
	crop->left = IMX219_PIXEL_ARRAY_LEFT;
@@ -750,6 +750,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
	const struct imx219_mode *mode;
	int exposure_max, exposure_def, hblank;
	struct v4l2_mbus_framefmt *format;
	struct v4l2_rect *crop;

	mode = v4l2_find_nearest_size(supported_modes,
				      ARRAY_SIZE(supported_modes),
@@ -757,10 +758,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
				      fmt->format.width, fmt->format.height);

	imx219_update_pad_format(imx219, mode, &fmt->format, fmt->format.code);

	format = v4l2_subdev_get_pad_format(sd, sd_state, 0);
	crop = v4l2_subdev_get_pad_crop(sd, sd_state, 0);

	if (imx219->mode == mode && format->code == fmt->format.code)
		return 0;
	*format = fmt->format;
	*crop = mode->crop;

	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
		imx219->mode = mode;
@@ -788,8 +791,6 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
					 hblank);
	}

	*format = fmt->format;

	return 0;
}

+0 −1
Original line number Diff line number Diff line
@@ -1110,7 +1110,6 @@ static int max9286_v4l2_register(struct max9286_priv *priv)

static void max9286_v4l2_unregister(struct max9286_priv *priv)
{
	fwnode_handle_put(priv->sd.fwnode);
	v4l2_ctrl_handler_free(&priv->ctrls);
	v4l2_async_unregister_subdev(&priv->sd);
	max9286_v4l2_notifier_unregister(priv);
+0 −1
Original line number Diff line number Diff line
@@ -608,7 +608,6 @@ static void rdacm21_remove(struct i2c_client *client)
	v4l2_async_unregister_subdev(&dev->sd);
	v4l2_ctrl_handler_free(&dev->ctrls);
	i2c_unregister_device(dev->isp);
	fwnode_handle_put(dev->sd.fwnode);
}

static const struct of_device_id rdacm21_of_ids[] = {
+1 −3
Original line number Diff line number Diff line
@@ -68,9 +68,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
	sg = sglist;
	for (line = 0; line < store_lines; line++) {
		if ((line >= (store_lines - VCR_HACK_LINES)) &&
		    (btv->opt_vcr_hack ||
		    (V4L2_FIELD_HAS_BOTH(btv->field) ||
		     btv->field == V4L2_FIELD_ALTERNATE)))
		    btv->opt_vcr_hack)
			continue;
		while (offset && offset >= sg_dma_len(sg)) {
			offset -= sg_dma_len(sg);
Loading