Merge tag 'v3.7-rc8' into staging/for_v3.8
authorMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 4 Dec 2012 12:46:21 +0000 (10:46 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 4 Dec 2012 12:46:21 +0000 (10:46 -0200)
Linux 3.7-rc8

* tag 'v3.7-rc8': (112 commits)
  Linux 3.7-rc8
  [parisc] open(2) compat bug
  Revert "sched, autogroup: Stop going ahead if autogroup is disabled"
  open*(2) compat fixes (s390, arm64)
  8139cp: fix coherent mapping leak in error path.
  tcp: fix crashes in do_tcp_sendpages()
  workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay
  workqueue: exit rescuer_thread() as TASK_RUNNING
  x86, fpu: Avoid FPU lazy restore after suspend
  drivers/rtc/rtc-tps65910.c: fix invalid pointer access on _remove()
  mm: soft offline: split thp at the beginning of soft_offline_page()
  mm: avoid waking kswapd for THP allocations when compaction is deferred or contended
  revert "Revert "mm: remove __GFP_NO_KSWAPD""
  mm: vmscan: fix endless loop in kswapd balancing
  mm/vmemmap: fix wrong use of virt_to_page
  mm: compaction: fix return value of capture_free_page()
  fix off-by-one in argument passed by iterate_fd() to callbacks
  lookup_one_len: don't accept . and ..
  cifs: get rid of blind d_drop() in readdir
  nfs_lookup_revalidate(): fix a leak
  ...

1  2 
drivers/media/platform/exynos-gsc/gsc-m2m.c
drivers/media/platform/s5p-fimc/fimc-capture.c
drivers/media/platform/s5p-fimc/fimc-m2m.c
drivers/media/platform/s5p-fimc/fimc-mdevice.c

index 047f0f0434ecbdebeeb88e00801659193b49c11d,c065d040ed944630b9d3a4b569fcfc0c5db5f4f4..c267c57c76fdeec23c6fb51c0609929f630c0e91
@@@ -122,7 -122,7 +122,7 @@@ static void gsc_m2m_device_run(void *pr
        struct gsc_ctx *ctx = priv;
        struct gsc_dev *gsc;
        unsigned long flags;
 -      u32 ret;
 +      int ret;
        bool is_set = false;
  
        if (WARN(!ctx, "null hardware context\n"))
@@@ -657,8 -657,7 +657,7 @@@ static int gsc_m2m_release(struct file 
        pr_debug("pid: %d, state: 0x%lx, refcnt= %d",
                task_pid_nr(current), gsc->state, gsc->m2m.refcnt);
  
-       if (mutex_lock_interruptible(&gsc->lock))
-               return -ERESTARTSYS;
+       mutex_lock(&gsc->lock);
  
        v4l2_m2m_ctx_release(ctx->m2m_ctx);
        gsc_ctrls_delete(ctx);
@@@ -732,6 -731,7 +731,7 @@@ int gsc_register_m2m_device(struct gsc_
        gsc->vdev.ioctl_ops     = &gsc_m2m_ioctl_ops;
        gsc->vdev.release       = video_device_release_empty;
        gsc->vdev.lock          = &gsc->lock;
+       gsc->vdev.vfl_dir       = VFL_DIR_M2M;
        snprintf(gsc->vdev.name, sizeof(gsc->vdev.name), "%s.%d:m2m",
                                        GSC_MODULE_NAME, gsc->id);
  
index 0d0aca5008764048d262bd86bc584894289dbb1c,891ee873c62b8c281cf83f74cf1b29b1925a0f55..fdb6740248a73f58bd2c7ab42c72f03991d907f0
@@@ -556,8 -556,7 +556,7 @@@ static int fimc_capture_close(struct fi
  
        dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
  
-       if (mutex_lock_interruptible(&fimc->lock))
-               return -ERESTARTSYS;
+       mutex_lock(&fimc->lock);
  
        if (--fimc->vid_cap.refcnt == 0) {
                clear_bit(ST_CAPT_BUSY, &fimc->state);
@@@ -1231,14 -1230,6 +1230,14 @@@ static int fimc_cap_qbuf(struct file *f
        return vb2_qbuf(&fimc->vid_cap.vbq, buf);
  }
  
 +static int fimc_cap_expbuf(struct file *file, void *priv,
 +                        struct v4l2_exportbuffer *eb)
 +{
 +      struct fimc_dev *fimc = video_drvdata(file);
 +
 +      return vb2_expbuf(&fimc->vid_cap.vbq, eb);
 +}
 +
  static int fimc_cap_dqbuf(struct file *file, void *priv,
                           struct v4l2_buffer *buf)
  {
@@@ -1363,7 -1354,6 +1362,7 @@@ static const struct v4l2_ioctl_ops fimc
  
        .vidioc_qbuf                    = fimc_cap_qbuf,
        .vidioc_dqbuf                   = fimc_cap_dqbuf,
 +      .vidioc_expbuf                  = fimc_cap_expbuf,
  
        .vidioc_prepare_buf             = fimc_cap_prepare_buf,
        .vidioc_create_bufs             = fimc_cap_create_bufs,
@@@ -1739,7 -1729,7 +1738,7 @@@ static int fimc_register_capture_device
        q = &fimc->vid_cap.vbq;
        memset(q, 0, sizeof(*q));
        q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 -      q->io_modes = VB2_MMAP | VB2_USERPTR;
 +      q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
        q->drv_priv = fimc->vid_cap.ctx;
        q->ops = &fimc_capture_qops;
        q->mem_ops = &vb2_dma_contig_memops;
@@@ -1783,9 -1773,13 +1782,13 @@@ static int fimc_capture_subdev_register
        if (ret)
                return ret;
  
+       fimc->pipeline_ops = v4l2_get_subdev_hostdata(sd);
        ret = fimc_register_capture_device(fimc, sd->v4l2_dev);
-       if (ret)
+       if (ret) {
                fimc_unregister_m2m_device(fimc);
+               fimc->pipeline_ops = NULL;
+       }
  
        return ret;
  }
@@@ -1802,6 -1796,7 +1805,7 @@@ static void fimc_capture_subdev_unregis
        if (video_is_registered(&fimc->vid_cap.vfd)) {
                video_unregister_device(&fimc->vid_cap.vfd);
                media_entity_cleanup(&fimc->vid_cap.vfd.entity);
+               fimc->pipeline_ops = NULL;
        }
        kfree(fimc->vid_cap.ctx);
        fimc->vid_cap.ctx = NULL;
index 26bcf4bc4209b3fe2349e5fdfebb4ebb72512f6f,62afed3162eaec518d74cd0a72b5c26a8725987a..1d21da4bd24be130dbcdd2b15032ff198390804a
@@@ -105,7 -105,7 +105,7 @@@ static void fimc_device_run(void *priv
        struct fimc_frame *sf, *df;
        struct fimc_dev *fimc;
        unsigned long flags;
 -      u32 ret;
 +      int ret;
  
        if (WARN(!ctx, "Null context\n"))
                return;
@@@ -439,15 -439,6 +439,15 @@@ static int fimc_m2m_dqbuf(struct file *
        return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
  }
  
 +static int fimc_m2m_expbuf(struct file *file, void *fh,
 +                          struct v4l2_exportbuffer *eb)
 +{
 +      struct fimc_ctx *ctx = fh_to_ctx(fh);
 +
 +      return v4l2_m2m_expbuf(file, ctx->m2m_ctx, eb);
 +}
 +
 +
  static int fimc_m2m_streamon(struct file *file, void *fh,
                             enum v4l2_buf_type type)
  {
@@@ -616,7 -607,6 +616,7 @@@ static const struct v4l2_ioctl_ops fimc
        .vidioc_querybuf                = fimc_m2m_querybuf,
        .vidioc_qbuf                    = fimc_m2m_qbuf,
        .vidioc_dqbuf                   = fimc_m2m_dqbuf,
 +      .vidioc_expbuf                  = fimc_m2m_expbuf,
        .vidioc_streamon                = fimc_m2m_streamon,
        .vidioc_streamoff               = fimc_m2m_streamoff,
        .vidioc_g_crop                  = fimc_m2m_g_crop,
@@@ -632,7 -622,7 +632,7 @@@ static int queue_init(void *priv, struc
        int ret;
  
        src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
 -      src_vq->io_modes = VB2_MMAP | VB2_USERPTR;
 +      src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
        src_vq->drv_priv = ctx;
        src_vq->ops = &fimc_qops;
        src_vq->mem_ops = &vb2_dma_contig_memops;
                return ret;
  
        dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 -      dst_vq->io_modes = VB2_MMAP | VB2_USERPTR;
 +      dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
        dst_vq->drv_priv = ctx;
        dst_vq->ops = &fimc_qops;
        dst_vq->mem_ops = &vb2_dma_contig_memops;
@@@ -728,8 -718,7 +728,7 @@@ static int fimc_m2m_release(struct fil
        dbg("pid: %d, state: 0x%lx, refcnt= %d",
                task_pid_nr(current), fimc->state, fimc->m2m.refcnt);
  
-       if (mutex_lock_interruptible(&fimc->lock))
-               return -ERESTARTSYS;
+       mutex_lock(&fimc->lock);
  
        v4l2_m2m_ctx_release(ctx->m2m_ctx);
        fimc_ctrls_delete(ctx);
index 9bd5dd4162206b261b94660d2e498404ef3c7072,0531ab70a94c42e512165d4bd3cfb5f117973d19..1bd5678cfeb9d13f4bfd4b1dc0f7ffccac5ce33b
@@@ -213,7 -213,7 +213,7 @@@ static int fimc_pipeline_close(struct f
   * @pipeline: video pipeline structure
   * @on: passed as the s_stream call argument
   */
 -int fimc_pipeline_s_stream(struct fimc_pipeline *p, bool on)
 +static int fimc_pipeline_s_stream(struct fimc_pipeline *p, bool on)
  {
        int i, ret;
  
@@@ -352,6 -352,7 +352,7 @@@ static int fimc_register_callback(struc
  
        sd = &fimc->vid_cap.subdev;
        sd->grp_id = FIMC_GROUP_ID;
+       v4l2_set_subdev_hostdata(sd, (void *)&fimc_pipeline_ops);
  
        ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
        if (ret) {
                return ret;
        }
  
-       fimc->pipeline_ops = &fimc_pipeline_ops;
        fmd->fimc[fimc->id] = fimc;
        return 0;
  }
@@@ -375,6 -375,7 +375,7 @@@ static int fimc_lite_register_callback(
                return 0;
  
        fimc->subdev.grp_id = FLITE_GROUP_ID;
+       v4l2_set_subdev_hostdata(&fimc->subdev, (void *)&fimc_pipeline_ops);
  
        ret = v4l2_device_register_subdev(&fmd->v4l2_dev, &fimc->subdev);
        if (ret) {
                return ret;
        }
  
-       fimc->pipeline_ops = &fimc_pipeline_ops;
        fmd->fimc_lite[fimc->index] = fimc;
        return 0;
  }
@@@ -547,7 -547,7 +547,7 @@@ static int __fimc_md_create_fimc_sink_l
                if (ret)
                        break;
  
 -              v4l2_info(&fmd->v4l2_dev, "created link [%s] %c> [%s]",
 +              v4l2_info(&fmd->v4l2_dev, "created link [%s] %c> [%s]\n",
                          source->name, flags ? '=' : '-', sink->name);
  
                if (flags == 0 || sensor == NULL)
This page took 0.147863 seconds and 5 git commands to generate.