1. 22 7月, 2014 2 次提交
  2. 25 5月, 2014 1 次提交
  3. 24 5月, 2014 1 次提交
  4. 11 3月, 2014 2 次提交
  5. 07 1月, 2014 1 次提交
  6. 05 1月, 2014 1 次提交
  7. 17 6月, 2013 2 次提交
  8. 27 5月, 2013 1 次提交
  9. 21 5月, 2013 1 次提交
  10. 24 3月, 2013 1 次提交
  11. 05 1月, 2013 1 次提交
  12. 02 10月, 2012 1 次提交
  13. 26 9月, 2012 1 次提交
  14. 16 8月, 2012 1 次提交
  15. 31 7月, 2012 1 次提交
  16. 06 7月, 2012 1 次提交
    • D
      [media] tvp5150: fix kernel crash if chip is unavailable · 8cd0d4ca
      Dmitry Lifshitz 提交于
      tvp5150 driver probe function doesn't check if the chip is present.
      Thus the driver can be loaded without having a device.
      This is dangerous and can cause kernel crash like this:
      
      Kernel BUG at c03c0964 [verbose debug info unavailable]
      Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
      Modules linked in:
      CPU: 0    Tainted: G        W     (3.4.0-cm-t3730+ #2)
      PC is at media_entity_create_link+0xe4/0xf4
      LR is at isp_register_entities+0x228/0x2f4
      pc : [<c03c0964>]    lr : [<c03f3b30>]    psr: 60000013
      sp : cf02de50  ip : 00000000  fp : c079405c
      r10: 00000000  r9 : 00000000  r8 : cf33c800
      r7 : c0794834  r6 : 00000000  r5 : 00000000  r4 : cf365b48
      r3 : 00000000  r2 : cf365b48  r1 : 00000000  r0 : cf33c800
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5387d  Table: 80004019  DAC: 00000015
      Process swapper (pid: 1, stack limit = 0xcf02c2f0)
      Stack: (0xcf02de50 to 0xcf02e000)
      de40:                                     cf360000 cf366f28 cf366218 c0794834
      de60: cf365b48 00000000 cf33c800 c03f3b30 00000000 00000000 cf360890 cf3668a0
      de80: 00000003 cf360000 c0785a58 00000000 cf360528 00000000 00000000 00003fff
      dea0: cf360500 c03f4cdc c06cc1f4 cf360000 c0785a58 c0d27808 c07d55ec c0785a58
      dec0: c031f0e0 c07d55ec c0776900 000000bb 00000000 c032040c c03203f4 c031ef0c
      dee0: c0785a58 c07d55ec c0785a8c c031f0e0 c075e670 c031f0c8 cf02deb8 c0785a58
      df00: c07d55ec c031f174 c07d55ec 00000000 cf02df18 c031d7a0 cf01d4a8 cf068b10
      df20: 00000000 c07d55ec c07c74d0 cf34bcc0 00000000 c031ded8 c0672340 c054cd38
      df40: 00000000 c07e68c0 c07d55ec 00000000 00000000 c075e670 c0776900 000000bb
      df60: 00000000 c031f770 c07e68c0 00000007 c07e68c0 00000000 c075e670 c0008790
      df80: 000000bb 00000006 00000006 c066e650 cf02dfa4 c07689b8 c07689b8 00000007
      dfa0: c07e68c0 c073f2e8 c07689c0 000000bb 00000000 c073f2bc 00000006 00000006
      dfc0: c073f2e8 00000000 c077649c c077649c c00150cc 00000013 00000000 00000000
      dfe0: 00000000 c073f3cc cf02dfe8 00000000 c073f368 c00150cc 00000000 00000000
      [<c03c0964>] (media_entity_create_link+0xe4/0xf4) from [<c03f3b30>] (isp_register_entities+0x228/0x2f4)
      [<c03f3b30>] (isp_register_entities+0x228/0x2f4) from [<c03f4cdc>] (isp_probe+0x7ac/0x9b8)
      [<c03f4cdc>] (isp_probe+0x7ac/0x9b8) from [<c032040c>] (platform_drv_probe+0x18/0x1c)
      [<c032040c>] (platform_drv_probe+0x18/0x1c) from [<c031ef0c>] (really_probe+0x64/0x1d8)
      [<c031ef0c>] (really_probe+0x64/0x1d8) from [<c031f0c8>] (driver_probe_device+0x48/0x60)
      [<c031f0c8>] (driver_probe_device+0x48/0x60) from [<c031f174>] (__driver_attach+0x94/0x98)
      [<c031f174>] (__driver_attach+0x94/0x98) from [<c031d7a0>] (bus_for_each_dev+0x54/0x80)
      [<c031d7a0>] (bus_for_each_dev+0x54/0x80) from [<c031ded8>] (bus_add_driver+0xac/0x2a8)
      [<c031ded8>] (bus_add_driver+0xac/0x2a8) from [<c031f770>] (driver_register+0x78/0x180)
      [<c031f770>] (driver_register+0x78/0x180) from [<c0008790>] (do_one_initcall+0x34/0x184)
      [<c0008790>] (do_one_initcall+0x34/0x184) from [<c073f2bc>] (do_basic_setup+0x9c/0xc8)
      [<c073f2bc>] (do_basic_setup+0x9c/0xc8) from [<c073f3cc>] (kernel_init+0x64/0xec)
      [<c073f3cc>] (kernel_init+0x64/0xec) from [<c00150cc>] (kernel_thread_exit+0x0/0x8)
      Code: e1c812b6 e8bd87f0 e7f001f2 eafffffe (e7f001f2)
      
      ---[ end trace 3ed3c618b26ff3e8 ]---
      Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      
      This patch fixes the tvp5150_read() function to return an error in case
      the I2C transaction fails.
      tvp5150_probe() and other relevant driver callbacks changed to check the
      status of the I2C read operations.
      In case of a read error throw an error message with v4l2_err()
      instead of v4l2_dbg().
      
      [mchehab@redhat.com: Fix a small typo breaking compilation]
      Signed-off-by: NDmitry Lifshitz <lifshitz@compulab.co.il>
      Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8cd0d4ca
  17. 15 5月, 2012 2 次提交
    • J
      [media] media: tvp5150: Fix mbus format · 002eaf90
      Javier Martin 提交于
      According to p.14 fig 3-3 of the datasheet (SLES098A)
      this decoder transmits data in UYVY format.
      Signed-off-by: NJavier Martin <javier.martin@vista-silicon.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      002eaf90
    • H
      [media] v4l: fix compiler warnings · 8173090a
      Hans Verkuil 提交于
      media_build/v4l/adv7343.c: In function 'adv7343_setstd':
      media_build/v4l/adv7343.c:133:6: warning: variable 'output_idx' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tvp5150.c: In function 'tvp5150_mbus_fmt':
      media_build/v4l/tvp5150.c:833:14: warning: variable 'std' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tvp7002.c: In function 'tvp7002_query_dv_preset':
      media_build/v4l/tvp7002.c:673:18: warning: variable 'device' set but not used [-Wunused-but-set-variable]
      media_build/v4l/c-qcam.c: In function 'qc_capture':
      media_build/v4l/c-qcam.c:381:33: warning: variable 'bitsperxfer' set but not used [-Wunused-but-set-variable]
      media_build/v4l/pms.c: In function 'pms_s_std':
      media_build/v4l/pms.c:738:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      media_build/v4l/pms.c: In function 'init_mediavision':
      media_build/v4l/pms.c:959:6: warning: variable 'id' set but not used [-Wunused-but-set-variable]
      media_build/v4l/cx25821-alsa.c: In function 'cx25821_irq':
      media_build/v4l/cx25821-alsa.c:294:6: warning: variable 'audint_count' set but not used [-Wunused-but-set-variable]
      media_build/v4l/zr364xx.c: In function 'zr364xx_fillbuff':
      media_build/v4l/zr364xx.c:510:25: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/s2255drv.c: In function 's2255_fillbuff':
      media_build/v4l/s2255drv.c:637:23: warning: variable 'frm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/s2255drv.c: In function 'vidioc_s_fmt_vid_cap':
      media_build/v4l/s2255drv.c:990:6: warning: variable 'norm' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-stds.c: In function 'tm6000_set_audio_std':
      media_build/v4l/tm6000-stds.c:341:10: warning: variable 'nicam_flag' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-video.c: In function 'get_next_buf':
      media_build/v4l/tm6000-video.c:172:8: warning: variable 'outp' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-video.c: In function 'copy_streams':
      media_build/v4l/tm6000-video.c:214:36: warning: variable 'c' set but not used [-Wunused-but-set-variable]
      media_build/v4l/tm6000-input.c: In function 'tm6000_ir_urb_received':
      media_build/v4l/tm6000-input.c:171:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c: In function 'usbvision_decompress':
      media_build/v4l/usbvision-core.c:604:23: warning: variable 'max_pos' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c: In function 'usbvision_parse_compress':
      media_build/v4l/usbvision-core.c:705:39: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
      media_build/v4l/usbvision-core.c:705:22: warning: variable 'bytes_per_pixel' set but not used [-Wunused-but-set-variable]
      media_build/v4l/zoran_device.c: In function 'write_overlay_mask':
      media_build/v4l/zoran_device.c:545:6: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
      media_build/v4l/go7007-v4l2.c: In function 'go7007_streamoff':
      media_build/v4l/go7007-v4l2.c:79:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8173090a
  18. 08 3月, 2012 3 次提交
  19. 07 1月, 2012 1 次提交
  20. 08 11月, 2011 1 次提交
  21. 01 11月, 2011 1 次提交
  22. 22 3月, 2011 2 次提交
  23. 21 10月, 2010 2 次提交
    • P
      [media] tvp5150: COMPOSITE0 input should not force-enable TV mode · 2962fc01
      Paul Walmsley 提交于
      When digitizing composite video from a analog videotape source using the
      TVP5150's first composite input channel, the captured stream exhibits
      tearing and synchronization problems[1].
      
      It turns out that commit c0477ad9 caused
      "TV mode" (as opposed to "VCR mode" or "auto-detect") to be forcibly
      enabled for both composite inputs.  According to the chip
      documentation[2], "TV mode" disables a "chrominance trap" input filter,
      which appears to be necessary for high-quality video capture from an
      analog videotape source.  [ Commit
      c7c0b34c subsequently restricted the
      problem to the first composite input, apparently inadvertently. ]
      
      Since any type of composite signal source can be connected to the
      TVP5150's first composite input, unconditionally forcing "TV mode" isn't
      correct.  There doesn't appear to be a good way for applications to tell
      the driver what is connected.  Fortunately, the TVP5150 has an operating
      mode auto-detection feature, which, when enabled, should cause the TVP5150
      to auto-detect whether it should use "VCR mode" or "TV mode".  Enabling
      operating mode auto-detection improved video capture quality
      significantly[3].
      
      Therefore, fix this bug by using operating mode auto-detection. (Also,
      while here, fix a CodingStyle issue.)
      
      For those users who may find this patch via a mailing list archive but who
      are not able to upgrade to a kernel with a fixed driver: the TVP5150's
      S-Video and second composite input sources have auto-detection enabled, so
      you may wish to try using those -- if available on your device -- until
      this fix makes it a downstream distribution near you.
      
      1. Pre-patch tvtime snapshot using a Pinnacle PCTV HD Pro as the
         capture device and a Sony EV-S2000 as a video source:
         http://www.booyaka.com/~paul/tvp5150/1a.png
      
      2. Section 3.21.3, "Operation Mode Control Register", _TVP5150AM1
         Ultralow-Power NTSC/PAL/SECAM Video Decoder (Rev. D)_ [SLES209D],
         downloaded 8 October 2010, available via
         http://focus.ti.com/lit/ds/symlink/tvp5150am1.pdf
      
      3. Post-patch tvtime snapshot (same signal chain as #1, above):
         http://www.booyaka.com/~paul/tvp5150/1b.pngSigned-off-by: NPaul Walmsley <paul@booyaka.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2962fc01
    • H
  24. 01 6月, 2010 1 次提交
  25. 19 5月, 2010 3 次提交
  26. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  27. 07 4月, 2009 3 次提交
  28. 30 3月, 2009 1 次提交