1. 01 2月, 2016 3 次提交
    • M
      [media] em28xx: avoid divide by zero error · 0962a763
      Mauro Carvalho Chehab 提交于
      [ 1841.243670] divide error: 0000 [#1] SMP KASAN
      [ 1841.243994] Modules linked in: em28xx_rc rc_core tda18271 drxk em28xx_dvb dvb_core em28xx_alsa mt9v011 em28xx_v4l videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core em28xx tveeprom v4l2_common videodev media cpufreq_powersave cpufreq_conservative cpufreq_userspace cpufreq_stats parport_pc ppdev lp parport snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTCO_vendor_support irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel sha256_ssse3 sha256_generic hmac drbg i915 snd_hda_codec_realtek snd_hda_codec_generic aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd btusb i2c_algo_bit snd_hda_intel btrtl drm_kms_helper btbcm evdev snd_hda_codec btintel psmouse bluetooth pcspkr snd_hwdep sg drm serio_raw
      [ 1841.244845]  snd_hda_core snd_pcm mei_me rfkill snd_timer mei snd lpc_ich soundcore shpchp i2c_i801 mfd_core battery dw_dmac i2c_designware_platform i2c_designware_core dw_dmac_core video acpi_pad button tpm_tis tpm ext4 crc16 mbcache jbd2 dm_mod hid_generic usbhid sd_mod ahci libahci libata ehci_pci e1000e xhci_pci ptp scsi_mod ehci_hcd xhci_hcd pps_core fan thermal sdhci_acpi sdhci mmc_core i2c_hid hid [last unloaded: tveeprom]
      [ 1841.245342] CPU: 2 PID: 38 Comm: kworker/2:1 Tainted: G        W       4.5.0-rc1+ #43
      [ 1841.245413] Hardware name:                  /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
      [ 1841.245503] Workqueue: events request_module_async [em28xx]
      [ 1841.245557] task: ffff88009df10000 ti: ffff88009df18000 task.ti: ffff88009df18000
      [ 1841.245626] RIP: 0010:[<ffffffffa135a0ad>]  [<ffffffffa135a0ad>] size_to_scale+0xed/0x2c0 [em28xx_v4l]
      [ 1841.245714] RSP: 0018:ffff88009df1faa8  EFLAGS: 00010246
      [ 1841.245756] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8803bb933b38
      [ 1841.245815] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8803bb933b00
      [ 1841.245879] RBP: ffff88009df1fad8 R08: ffff8803bb933b3c R09: 1ffff10077726760
      [ 1841.245944] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      [ 1841.246006] R13: 0000000000000000 R14: dffffc0000000000 R15: ffff8803b391a130
      [ 1841.246071] FS:  0000000000000000(0000) GS:ffff8803c6900000(0000) knlGS:0000000000000000
      [ 1841.246141] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1841.246194] CR2: 0000000001d97008 CR3: 00000003bdd85000 CR4: 00000000003406e0
      [ 1841.246256] Stack:
      [ 1841.246278]  0000000000000246 ffff8803bb9321f0 ffff8803bb932270 ffffffffa136f7a0
      [ 1841.246359]  0000000000000000 ffff8803bb932130 ffff88009df1fb20 ffffffffa13646a0
      [ 1841.246439]  ffffffffa127f206 ffff8803bb932130 ffff8803bb932130 ffff8803b391a130
      [ 1841.246517] Call Trace:
      [ 1841.246548]  [<ffffffffa13646a0>] em28xx_set_video_format+0x140/0x1e0 [em28xx_v4l]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      0962a763
    • M
      [media] em28xx: unregister devices in case of failure · 56a7f515
      Mauro Carvalho Chehab 提交于
      If something bad happens during device registration, unregister
      the already registered devices.
      
      Without that, it will have lots of KASAN errors when udev
      would try to open the devices.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      56a7f515
    • M
      [media] em28xx: remove unused input types · d83a96a5
      Mauro Carvalho Chehab 提交于
      The em28xx driver have lots of different input types but
      only 4 of such types are actually used. The others are bogus.
      
      Remove them, in order to cleanup the driver.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      d83a96a5
  2. 26 1月, 2016 1 次提交
    • M
      [media] em28xx: fix implementation of s_stream · 13d52fe4
      Mauro Carvalho Chehab 提交于
      On em28xx driver, s_stream subdev ops was not implemented
      properly. It was used only to disable stream, never enabling it.
      That was the root cause of the regression when we added support
      for s_stream on tvp5150 driver.
      
      With that, we can get rid of the changes on tvp5150 side,
      e. g. changeset 47de9bf8 ('[media] tvp5150: Fix breakage for serial usage').
      
      Tested video output on em2820+tvp5150 on WinTV USB2 and
      video and/or vbi output on em288x+tvp5150 on HVR 950.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      13d52fe4
  3. 18 12月, 2015 2 次提交
  4. 17 11月, 2015 1 次提交
    • M
      [media] include/media: move driver interface headers to a separate dir · d647f0b7
      Mauro Carvalho Chehab 提交于
      Let's not mix headers used by the core with those headers that
      are needed by some driver-specific interface header.
      
      The headers used on drivers were manually moved using:
          mkdir include/media/drv-intf/
          git mv include/media/cx2341x.h include/media/cx25840.h \
      	include/media/exynos-fimc.h include/media/msp3400.h \
      	include/media/s3c_camif.h include/media/saa7146.h \
      	include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
      	include/media/sh_mobile_csi2.h include/media/sh_vou.h \
      	include/media/si476x.h include/media/soc_mediabus.h \
      	include/media/tea575x.h include/media/drv-intf/
      
      And the references for those headers were corrected using:
      
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="drv-intf/"
      
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
      	done
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done";
      	);
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done"
      	);
          ) >script && . ./script
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      d647f0b7
  5. 21 10月, 2015 1 次提交
  6. 01 10月, 2015 1 次提交
  7. 05 6月, 2015 1 次提交
  8. 08 4月, 2015 1 次提交
  9. 24 12月, 2014 2 次提交
  10. 23 12月, 2014 1 次提交
  11. 05 12月, 2014 1 次提交
  12. 26 9月, 2014 1 次提交
  13. 24 9月, 2014 1 次提交
    • F
      [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode · 920f1e4a
      Frank Schaefer 提交于
      Field has_audio in struct em28xx_audio_mode is used together with value
      EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
      (none/i2s/ac97). This makes the code difficult to understand:
      
        !audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
        !audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
        audio_mode.has_audio  && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
        audio_mode.has_audio  && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio
      
      Simplify the whole thing by introducing an enum em28xx_int_audio_type
      which describes the internal audio type (none, ac97, i2s) and is hooked
      directly to the device struct. Then get rid of field has_audio in struct
      em28xx_audio_mode.
      
      A follow-up patch will then remove struct em28xx_ac97_mode and finally
      the whole struct em28xx_audio_mode.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      920f1e4a
  14. 22 9月, 2014 2 次提交
  15. 04 9月, 2014 1 次提交
  16. 22 8月, 2014 2 次提交
    • F
      [media] em28xx-v4l: fix video buffer field order reporting in progressive mode · 662c97cf
      Frank Schaefer 提交于
      The correct field order in progressive mode is V4L2_FIELD_NONE, not V4L2_FIELD_INTERLACED.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      662c97cf
    • F
      [media] em28xx-v4l: give back all active video buffers to the vb2 core properly on streaming stop · 627530c3
      Frank Schaefer 提交于
      When a new video frame is started, the driver takes the next video buffer from
      the list of active buffers and moves it to dev->usb_ctl.vid_buf / dev->usb_ctl.vbi_buf
      for further processing.
      
      On streaming stop we currently only give back the pending buffers from the list
      but not the ones which are currently processed.
      
      This causes the following warning from the vb2 core since kernel 3.15:
      
      ...
       ------------[ cut here ]------------
       WARNING: CPU: 1 PID: 2284 at drivers/media/v4l2-core/videobuf2-core.c:2115 __vb2_queue_cancel+0xed/0x150 [videobuf2_core]()
       [...]
       Call Trace:
        [<c0769c46>] dump_stack+0x48/0x69
        [<c0245b69>] warn_slowpath_common+0x79/0x90
        [<f925e4ad>] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
        [<f925e4ad>] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
        [<c0245bfd>] warn_slowpath_null+0x1d/0x20
        [<f925e4ad>] __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
        [<f925fa35>] vb2_internal_streamoff+0x35/0x90 [videobuf2_core]
        [<f925fac5>] vb2_streamoff+0x35/0x60 [videobuf2_core]
        [<f925fb27>] vb2_ioctl_streamoff+0x37/0x40 [videobuf2_core]
        [<f8e45895>] v4l_streamoff+0x15/0x20 [videodev]
        [<f8e4925d>] __video_do_ioctl+0x23d/0x2d0 [videodev]
        [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
        [<f8e48c63>] video_usercopy+0x203/0x5a0 [videodev]
        [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
        [<c039d0e7>] ? fsnotify+0x1e7/0x2b0
        [<f8e49012>] video_ioctl2+0x12/0x20 [videodev]
        [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
        [<f8e4461e>] v4l2_ioctl+0xee/0x130 [videodev]
        [<f8e44530>] ? v4l2_open+0xf0/0xf0 [videodev]
        [<c0378de2>] do_vfs_ioctl+0x2e2/0x4d0
        [<c0368eec>] ? vfs_write+0x13c/0x1c0
        [<c0369a8f>] ? vfs_writev+0x2f/0x50
        [<c0379028>] SyS_ioctl+0x58/0x80
        [<c076fff3>] sysenter_do_call+0x12/0x12
       ---[ end trace 5545f934409f13f4 ]---
      ...
      
      Many thanks to Hans Verkuil, whose recently added check in the vb2 core unveiled
      this long standing issue and who has investigated it further.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      627530c3
  17. 27 7月, 2014 4 次提交
  18. 05 7月, 2014 1 次提交
  19. 25 5月, 2014 1 次提交
  20. 24 5月, 2014 12 次提交