1. 03 9月, 2013 6 次提交
    • S
      [media] exynos4-is: Fix entity unregistration on error path · d2b903b4
      Sylwester Nawrocki 提交于
      This patch corrects media entities unregistration order to make sure
      the fimc.N.capture and fimc-lite video nodes are unregistered with
      fimc->lock mutex held. This prevents races between video device open()
      and defered probing and NULL pointer dereference in open() callback
      as follows:
      [   77.645000] Unable to handle kernel NULL pointer dereference at virtual address 00000290t
      [   77.655000] pgd = ee7a8000
      [   77.660000] [00000290] *pgd=6e13c831, *pte=00000000, *ppte=00000000
      [   77.665000] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      [   77.670000] Modules linked in: s5p_fimc ipv6 exynos_fimc_is exynos_fimc_lite
       s5p_csis v4l2_mem2mem videobuf2_dma_contig videobuf2_memops exynos4_is_common videobuf2_core [last unloaded: s5p_fimc]
      [   77.685000] CPU: 0 PID : 2998 Comm: v4l_id Tainted: G        W   3.10.0-next-20130709-00039-g39f491b-dirty #1548
      [   77.695000] task: ee084000 ti: ee46e000 task.ti: ee46e000
      [   77.700000] PC is at __mutex_lock_slowpath+0x54/0x368
      [   77.705000] LR is at __mutex_lock_slowpath+0x24/0x368
      [   77.710000] pc : [<c038dc10>]    lr : [<c038dbe0>]    psr: 60000093
      [   77.710000] sp : ee46fd70  ip : 000008c8  fp : c054e34c
      [   77.725000] r10: ee084000  r9 : 00000000  r8 : ee439480
      [   77.730000] r7 : ee46e000  r6 : 60000013  r5 : 00000290  r4 : 0000028c
      [   77.735000] r3 : 00000000  r2 : 00000000  r1 : 20000093  r0 : 00000001
      [   77.740000] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM Segment user
      [   77.750000] Control: 10c5387d  Table: 6e7a804a  DAC: 00000015
      [   77.755000] Process v4l_id (pid: 2998, stack limit = 0xee46e238)
      [   77.760000] Stack: (0xee46fd70 to 0xee470000)
          	       ...
      [   77.935000] [<c038dc10>] (__mutex_lock_slowpath+0x54/0x368) from [<c038df30>] (mutex_lock+0xc/0x24)
      [   77.945000] [<c038df30>] (mutex_lock+0xc/0x24) from [<bf03fa90>] (fimc_lite_open+0x12c/0x2bc [exynos_fimc_lite])
      [   77.955000] [<bf03fa90>] (fimc_lite_open+0x12c/0x2bc [exynos_fimc_lite]) from [<c02ab11c>] (v4l2_open+0xa0/0xe0)
      [   77.965000] [<c02ab11c>] (v4l2_open+0xa0/0xe0) from [<c00b1de4>] (chrdev_open+0x88/0x170)
      [   77.975000] [<c00b1de4>] (chrdev_open+0x88/0x170) from [<c00ac710>] (do_dentry_open.isra.14+0x1d8/0x258)
      [   77.985000] [<c00ac710>] (do_dentry_open.isra.14+0x1d8/0x258) from [<c00ac860>] (finish_open+0x20/0x38)
      [   77.995000] [<c00ac860>] (finish_open+0x20/0x38) from [<c00ba658>] (do_last.isra.43+0x538/0xb1c)
      [   78.000000] [<c00ba658>] (do_last.isra.43+0x538/0xb1c) from [<c00bacf0>] (path_openat+0xb4/0x5c4)
      [   78.010000] [<c00bacf0>] (path_openat+0xb4/0x5c4) from [<c00bb4b4>] (do_filp_open+0x2c/0x80)
      [   78.020000] [<c00bb4b4>] (do_filp_open+0x2c/0x80) from [<c00ad744>] (do_sys_open+0xf4/0x1a8)
      [   78.025000] [<c00ad744>] (do_sys_open+0xf4/0x1a8) from [<c000e320>] (ret_fast_syscall+0x0/0x30)
      [   78.035000] Code: 1a000093 e10f6000 f10c0080 e2845004 (e1953f9f)
      Reported-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      d2b903b4
    • A
      [media] exynos-gsc: Register v4l2 device · d0b1c313
      Arun Kumar K 提交于
      Gscaler video device registration was happening without reference to
      a parent v4l2_dev causing probe to fail. The patch creates a parent
      v4l2 device and uses it for the gsc m2m video device registration.
      This fixes regression introduced with comit commit 1c1d86a1
      [media] v4l2: always require v4l2_dev, rename parent to dev_parent
      Signed-off-by: NArun Kumar K <arun.kk@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      d0b1c313
    • A
      [media] exynos4-is: Fix fimc-lite bayer formats · 3396b096
      Arun Kumar K 提交于
      The 10-bit and 12-bit Bayer output formats supported by FIMC-LITE
      actually use 16 bits where the extra bits are padded with zeros.
      The patch corrects buffer allocation for these two formats by
      modifying the depth field. This prevents memory corruption by the
      output DMA due to insufficient buffer size.
      Signed-off-by: NArun Kumar K <arun.kk@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      3396b096
    • S
      [media] s5p-g2d: Fix registration failure · 8a09a4cc
      Sachin Kamat 提交于
      Commit 1c1d86a1 ("[media] v4l2: always require v4l2_dev,
      rename parent to dev_parent") expects v4l2_dev to be always set.
      It converted most of the drivers using the parent field of video_device
      to v4l2_dev field. G2D driver did not set the parent field. Hence it got
      left out. Without this patch we get the following boot warning and G2D
      driver fails to register the video device.
      WARNING: CPU: 0 PID: 1 at drivers/media/v4l2-core/v4l2-dev.c:775 __video_register_device+0xfc0/0x1028()
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.11.0-rc1-00001-g1c3e372-dirty #9
      [<c0014b7c>] (unwind_backtrace+0x0/0xf4) from [<c0011524>] (show_stack+0x10/0x14)
      [<c0011524>] (show_stack+0x10/0x14) from [<c041d7a8>] (dump_stack+0x7c/0xb0)
      [<c041d7a8>] (dump_stack+0x7c/0xb0) from [<c001dc94>] (warn_slowpath_common+0x6c/0x88)
      [<c001dc94>] (warn_slowpath_common+0x6c/0x88) from [<c001dd4c>] (warn_slowpath_null+0x1c/0x24)
      [<c001dd4c>] (warn_slowpath_null+0x1c/0x24) from [<c02cf8d4>] (__video_register_device+0xfc0/0x1028)
      [<c02cf8d4>] (__video_register_device+0xfc0/0x1028) from [<c0311a94>] (g2d_probe+0x1f8/0x398)
      [<c0311a94>] (g2d_probe+0x1f8/0x398) from [<c0247d54>] (platform_drv_probe+0x14/0x18)
      [<c0247d54>] (platform_drv_probe+0x14/0x18) from [<c0246b10>] (driver_probe_device+0x108/0x220)
      [<c0246b10>] (driver_probe_device+0x108/0x220) from [<c0246cf8>] (__driver_attach+0x8c/0x90)
      [<c0246cf8>] (__driver_attach+0x8c/0x90) from [<c0245050>] (bus_for_each_dev+0x60/0x94)
      [<c0245050>] (bus_for_each_dev+0x60/0x94) from [<c02462c8>] (bus_add_driver+0x1c0/0x24c)
      [<c02462c8>] (bus_add_driver+0x1c0/0x24c) from [<c02472d0>] (driver_register+0x78/0x140)
      [<c02472d0>] (driver_register+0x78/0x140) from [<c00087c8>] (do_one_initcall+0xf8/0x144)
      [<c00087c8>] (do_one_initcall+0xf8/0x144) from [<c05b29e8>] (kernel_init_freeable+0x13c/0x1d8)
      [<c05b29e8>] (kernel_init_freeable+0x13c/0x1d8) from [<c041a108>] (kernel_init+0xc/0x160)
      [<c041a108>] (kernel_init+0xc/0x160) from [<c000e2f8>] (ret_from_fork+0x14/0x3c)
      ---[ end trace 4e0ec028b0028e02 ]---
      s5p-g2d 12800000.g2d: Failed to register video device
      s5p-g2d: probe of 12800000.g2d failed with error -22
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Cc: Hans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NKamil Debski <k.debski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      8a09a4cc
    • A
      [media] media: coda: Fix DT driver data pointer for i.MX27 · 7b0dd9e6
      Alexander Shiyan 提交于
      The data pointer should point to DT data, and not to the ID
      array.
      Signed-off-by: NAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: NKamil Debski <k.debski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      7b0dd9e6
    • J
      [media] s5p-mfc: Fix input/output format reporting · 19c2813c
      John Sheu 提交于
      The video encode/decode paths have duplicated logic between
      VIDIOC_TRY_FMT and VIDIOC_S_FMT that should be de-duped.  Also, video
      decode reports V4L2_PIX_FMT_NV12MT_16X16 output format, regardless of
      what the actual output has been set at.  Fix this.
      Signed-off-by: NJohn Sheu <sheu@google.com>
      Signed-off-by: NKamil Debski <k.debski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: stable@vger.kernel.org
      19c2813c
  2. 28 8月, 2013 3 次提交
  3. 26 8月, 2013 2 次提交
  4. 24 8月, 2013 15 次提交
  5. 23 8月, 2013 2 次提交
    • G
      [media] media/v4l2: VIDEO_SH_VEU should depend on HAS_DMA · 976f375d
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
      drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’
      drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
      drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
      Commit da508f57 ("[media] media/v4l2:
      VIDEOBUF2_DMA_CONTIG should depend on HAS_DMA") added a dependency on
      HAS_DMA to VIDEO_SH_VEU, as it selects VIDEOBUF2_DMA_CONTIG.
      However, this got lost in the merge conflict resolution in commit
      df90e225 ("Merge branch 'devel-for-v3.10'
      into v4l_for_linus").
      Re-add the dependency to fix this.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      976f375d
    • W
      i2c: move OF helpers into the core · 687b81d0
      Wolfram Sang 提交于
      I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
      that it is much cleaner to have this in the core. This also removes a
      circular dependency between the helpers and the core, and so we can
      finally register child nodes in the core instead of doing this manually
      in each driver. So, fix the drivers and documentation, too.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      687b81d0
  6. 22 8月, 2013 1 次提交
  7. 18 8月, 2013 11 次提交