Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fba69f04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull media fixes from Mauro Carvalho Chehab:
 "Most of the changes are drivers fixes (rtl28xuu, fc2580, ov7670,
  davinci, gspca, s5p-fimc and s5c73m3).

  There is also a compat32 fix and one infoleak fixup at the media
  controller"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode
  [media] V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space
  [media] media-device: fix infoleak in ioctl media_enum_entities()
  [media] fc2580: fix tuning failure on 32-bit arch
  [media] Prefer gspca_sonixb over sn9c102 for all devices
  [media] media: davinci: vpfe: make sure all the buffers unmapped and released
  [media] staging: media: davinci: vpfe: make sure all the buffers are released
  [media] media: davinci: vpbe_display: fix releasing of active buffers
  [media] media: davinci: vpif_display: fix releasing of active buffers
  [media] media: davinci: vpif_capture: fix releasing of active buffers
  [media] s5p-fimc: Fix YUV422P depth
  [media] s5c73m3: Add missing rename of v4l2_of_get_next_endpoint() function
  [media] rtl28xxu: silence error log about disabled rtl2832_sdr module
  [media] rtl28xxu: do not hard depend on staging SDR module
parents 84e12d99 97d9d23d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1109,7 +1109,7 @@ static int ov7670_enum_framesizes(struct v4l2_subdev *sd,
	 * windows that fall outside that.
	 */
	for (i = 0; i < n_win_sizes; i++) {
		struct ov7670_win_size *win = &info->devtype->win_sizes[index];
		struct ov7670_win_size *win = &info->devtype->win_sizes[i];
		if (info->min_width && win->width < info->min_width)
			continue;
		if (info->min_height && win->height < info->min_height)
+1 −1
Original line number Diff line number Diff line
@@ -1616,7 +1616,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
	if (ret < 0)
		return -EINVAL;

	node_ep = v4l2_of_get_next_endpoint(node, NULL);
	node_ep = of_graph_get_next_endpoint(node, NULL);
	if (!node_ep) {
		dev_warn(dev, "no endpoint defined for node: %s\n",
						node->full_name);
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ static long media_device_enum_entities(struct media_device *mdev,
	struct media_entity *ent;
	struct media_entity_desc u_ent;

	memset(&u_ent, 0, sizeof(u_ent));
	if (copy_from_user(&u_ent.id, &uent->id, sizeof(u_ent.id)))
		return -EFAULT;

+15 −1
Original line number Diff line number Diff line
@@ -372,18 +372,32 @@ static int vpbe_stop_streaming(struct vb2_queue *vq)
{
	struct vpbe_fh *fh = vb2_get_drv_priv(vq);
	struct vpbe_layer *layer = fh->layer;
	struct vpbe_display *disp = fh->disp_dev;
	unsigned long flags;

	if (!vb2_is_streaming(vq))
		return 0;

	/* release all active buffers */
	spin_lock_irqsave(&disp->dma_queue_lock, flags);
	if (layer->cur_frm == layer->next_frm) {
		vb2_buffer_done(&layer->cur_frm->vb, VB2_BUF_STATE_ERROR);
	} else {
		if (layer->cur_frm != NULL)
			vb2_buffer_done(&layer->cur_frm->vb,
					VB2_BUF_STATE_ERROR);
		if (layer->next_frm != NULL)
			vb2_buffer_done(&layer->next_frm->vb,
					VB2_BUF_STATE_ERROR);
	}

	while (!list_empty(&layer->dma_queue)) {
		layer->next_frm = list_entry(layer->dma_queue.next,
						struct vpbe_disp_buffer, list);
		list_del(&layer->next_frm->list);
		vb2_buffer_done(&layer->next_frm->vb, VB2_BUF_STATE_ERROR);
	}

	spin_unlock_irqrestore(&disp->dma_queue_lock, flags);
	return 0;
}

+2 −0
Original line number Diff line number Diff line
@@ -734,6 +734,8 @@ static int vpfe_release(struct file *file)
		}
		vpfe_dev->io_usrs = 0;
		vpfe_dev->numbuffers = config_params.numbuffers;
		videobuf_stop(&vpfe_dev->buffer_queue);
		videobuf_mmap_free(&vpfe_dev->buffer_queue);
	}

	/* Decrement device usrs counter */
Loading