Re: [REGRESSION] media: cx23885 broken by commit 453afdd "[media] cx23885: convert to vb2"
Hi Raimonds, On 01/11/2015 10:33 AM, Raimonds Cicans wrote: > Hello. > > I contacted you because I am hit by regression caused by your commit: > 453afdd "[media] cx23885: convert to vb2" > > > My system: > AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard > TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) > > After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 > (have commit) I started receiving following IOMMU related messages: > > 1) > AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d > address=0x0637c000 flags=0x] > > where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Regards, Hans > > sometimes this message was followed by storm of following messages: > cx23885[0]: mpeg risc op code error > ... -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: TBS6981/vb2-cx23885 kernel oops
On 01/28/2015 01:01 PM, Nick Burrett wrote: > The following are 3 samples of kernel messages that I am getting on a > fairly regular basis, which seem to have started occurring since the > cx23885 vb2 conversion. I am using the > https://github.com/ljalves/linux_media tree from 16 Jan 2015 That's too old. You need to upgrade as you need the version that has this important fix: https://github.com/ljalves/linux_media/commit/6cf11ee6300f38b7cfc43af9b7be2afaa5e05869 After upgrading, please try again and let me know the results. My understanding is that this fixes the crashes, but that there are still 'UNBALANCED' reports and 'mpeg_risc op error' messages. Unfortunately, I seem unable to reproduce this, so the more information I get about this, the better it is. Regards, Hans > > I have a TBS6985 and a TBS6981 card present in the machine. The > TBS6985 is working fine. The kernel messages are triggered by VDR's > idle scanning which it done using the TBS6981. > > [16795.690383] BUG: Bad page state in process vb2-cx23885[0] pfn:36bd1 > [16795.690387] page:eadaf440 count:-1 mapcount:0 mapping: > (null) index:0x0 > [16795.690389] flags: 0x100() > [16795.690390] page dumped because: nonzero _count > [16795.690391] Modules linked in: rfcomm bluetooth iptable_mangle > xt_DSCP ip_tables x_tables ir_jvc_decoder(OE) ir_lirc_codec(OE) > lirc_dev(OE) ir_xmp_decoder(OE) ir_sony_decoder(OE) > ir_sanyo_decoder(OE) ir_sharp_decoder(OE) ir_rc6_decoder(OE) > ir_rc5_decoder(OE) ir_nec_decoder(OE) ir_mce_kbd_decoder(OE) > rc_tbs_nec(OE) cx25840(OE) binfmt_misc rc_dib0700_rc5(OE) dib7000p(OE) > cx23885(OE) altera_ci(OE) tda18271(OE) altera_stapl(OE) > snd_hda_codec_hdmi videobuf2_dvb(OE) tveeprom(OE) > snd_hda_codec_realtek av201x(OE) intel_rapl cx2341x(OE) > x86_pkg_temp_thermal intel_powerclamp videobuf2_dma_sg(OE) > videobuf2_memops(OE) coretemp videobuf2_core(OE) kvm > snd_hda_codec_generic v4l2_common(OE) snd_hda_intel snd_hda_controller > snd_hda_codec videodev(OE) crct10dif_pclmul crc32_pclmul > saa716x_budget(OE) ghash_clmulni_intel snd_hwdep media(OE) snd_pcm > i915 aesni_intel dvb_usb_dib0700(OE) tas2101(OE) aes_x86_64 > dib9000(OE) dib7000m(OE) dib0090(OE) dib0070(OE) > [16795.690421] vb2: counters for queue 880227c55828: UNBALANCED! > [16795.690422] cxd2820r(OE) dib3000mc(OE) lrw video > [16795.690425] vb2: setup: 1 start_streaming: 1 stop_streaming: 1 > [16795.690426] vb2: wait_prepare: 10464 wait_finish: 10465 > [16795.690427] vb2: counters for queue 880227c55828, buffer 31: > UNBALANCED! > [16795.690429] vb2: buf_init: 1 buf_cleanup: 1 buf_prepare: 109 buf_finish: > 110 > [16795.690429] vb2: buf_queue: 109 buf_done: 109 > [16795.690430] vb2: alloc: 1 put: 1 prepare: 109 finish: 109 mmap: 0 > [16795.690431] vb2: get_userptr: 0 put_userptr: 0 > [16795.690432] vb2: attach_dmabuf: 0 detach_dmabuf: 0 map_dmabuf: 0 > unmap_dmabuf: 0 > [16795.690433] vb2: get_dmabuf: 0 num_users: 0 vaddr: 110 cookie: 110 > [16795.690434] gpio_ich drm_kms_helper snd_seq_midi snd_seq_midi_event > snd_rawmidi gf128mul dibx000_common(OE) mb86a16(OE) snd_seq > glue_helper snd_seq_device lp cx24117(OE) mei_me snd_timer dvb_usb(OE) > drm ablk_helper rc_core(OE) parport saa716x_core(OE) lpc_ich snd mei > dvb_core(OE) soundcore i2c_algo_bit i2c_mux serio_raw cryptd mac_hid > psmouse ahci r8169 libahci mii > [16795.690452] CPU: 1 PID: 16771 Comm: vb2-cx23885[0] Tainted: G OE > 3.18.1-ickle75+ #1 > [16795.690453] Hardware name: Shuttle SH67H3/FH67, BIOS 4.6.4 03/22/2011 > [16795.690454] 81aad259 880231493a48 817781fd > > [16795.690456] eadaf440 880231493a78 81774bcc > eadaf440 > [16795.690458] 0141 0200 88023fdf4780 > 880231493b68 > [16795.690459] Call Trace: > [16795.690465] [] dump_stack+0x46/0x58 > [16795.690468] [] bad_page.part.50+0xe0/0xfe > [16795.690471] [] get_page_from_freelist+0x873/0x9e0 > [16795.690474] [] ? select_idle_sibling+0x2b/0x120 > [16795.690498] [] __alloc_pages_nodemask+0x15f/0xa50 > [16795.690501] [] ? try_to_wake_up+0x1e4/0x330 > [16795.690505] [] dma_generic_alloc_coherent+0xa4/0x160 > [16795.690508] [] x86_swiotlb_alloc_coherent+0x21/0x50 > [16795.690513] [] cx23885_risc_databuffer+0xb2/0x170 [cx23885] > [16795.690519] [] ? dvb_dmx_swfilter_section_copy_dump+0x1f1/0x250 [dvb_core] > [16795.690522] [] cx23885_buf_prepare+0x7f/0xd0 [cx23885] > [16795.690526] [] buffer_prepare+0x19/0x20 [cx23885] > [16795.690529] [] __buf_prepare+0x27e/0x390 [videobuf2_core] > [16795.690532] [] vb2_internal_qbuf+0x7b/0x240 [videobuf2_core] > [16795.690535] [] vb2_thread+0x10e/0x480 [videobuf2_core] > [16795.690538] [] ? vb2_internal_qbuf+0x240/0x240 [videobuf2_core] > [16795.690540] [] kthread+0xd2/0xf0 > [16795.690542] [] ? kthread_create_on_node+0x180/0x180 > [16795.690545] [] ret_from_fork+0x7c/0xb0 > [16795.690547] [] ? kthread_create_on_node+0x180/0x180 > [16795.690548] Disabling lock debugging du
Haupage 2250 / saa7164 kernel errors
About once a day, my tuner stops working and my logs fill up with the following messages: 2015-01-28T20:40:23.736478-08:00 mediapc kernel: [169020.845484] saa7164_cmd_send() No free sequences 2015-01-28T20:40:23.736480-08:00 mediapc kernel: [169020.845486] saa7164_api_i2c_read() error, ret(1) = 0xc 2015-01-28T20:40:23.736483-08:00 mediapc kernel: [169020.845489] s5h1411_readreg: readreg error (ret == -5) I've seen a couple other posts about it in this mailing list with no responses yet. Does anybody have an idea of why this could be happening, or any suggestions on what I could try to debug this issue? Thanks, David -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PULL patches for 3.20]: New gspca touptek driver, gspca fixes and sunxi-cir driver improvments
Hi Mauro, Note this pull-req superseeds my previous pull-req for 3.20, and now includes one more gspca bugfix. Please pull from my tree for a new gspca touptek driver, various gspca fixes and some sunxi-cir driver improvments. The following changes since commit 8d44aeefcd79e9be3b6db4f37efc7544995b619e: [media] rtl28xxu: change module unregister order (2015-01-27 10:57:58 -0200) are available in the git repository at: git://linuxtv.org/hgoede/gspca.git media-for_v3.20 for you to fetch changes up to 161afd98bd7bff0456cef6fc79b9f0909d244f5e: gspca_vc032x: Fix wrong bytesperline (2015-01-28 09:06:50 +0100) Antonio Ospite (1): gspca_stv06xx: enable button found on some Quickcam Express variant Hans Verkuil (1): pwc: fix WARN_ON Hans de Goede (3): rc: sunxi-cir: Add support for an optional reset controller rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i gspca: Fix underflow in vidioc_s_parm() Joe Howse (1): gspca: Add high-speed modes for PS3 Eye camera John McMaster (1): gspca_touptek: Add support for ToupTek UCMOS series USB cameras Luca Bonissi (1): gspca_vc032x: Fix wrong bytesperline .../devicetree/bindings/media/sunxi-ir.txt | 4 +- drivers/media/rc/sunxi-cir.c | 46 +- drivers/media/usb/gspca/Kconfig| 10 + drivers/media/usb/gspca/Makefile | 2 + drivers/media/usb/gspca/gspca.c| 2 +- drivers/media/usb/gspca/ov534.c| 10 +- drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 +- drivers/media/usb/gspca/touptek.c | 732 + drivers/media/usb/gspca/vc032x.c | 10 +- drivers/media/usb/pwc/pwc-if.c | 12 +- 10 files changed, 805 insertions(+), 27 deletions(-) create mode 100644 drivers/media/usb/gspca/touptek.c Thanks & Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 7/7] [media] marvell-ccic needs VIDEOBUF2_DMA_SG
On Wed, 28 Jan 2015 22:17:47 +0100 Arnd Bergmann wrote: > The vb2_dma_sg_memops pointer is only valid if VIDEOBUF2_DMA_SG is > set, so we should select that to avoid this build error: > > drivers/built-in.o: In function `mcam_v4l_open': > :(.text+0x388d00): undefined reference to `vb2_dma_sg_memops' I acked this one the last time it came around (I forget from who). I still don't know how to create a .config that exposes the problem, but others have clearly succeeded in doing it. Acked-by: Jonathan Corbet jon -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 6/7] [media] marvell-ccic: MMP_CAMERA no longer builds
The mmp ccic driver expects a platform_data structure that does not exist in the mainline kernel and presumably was changed in a kernel fork, which leads to build errors now: media/platform/marvell-ccic/mmp-driver.c: In function 'mmpcam_calc_dphy': media/platform/marvell-ccic/mmp-driver.c:252:15: error: 'struct mmp_camera_platform_data' has no member named 'dphy3_algo' switch (pdata->dphy3_algo) { ^ media/platform/marvell-ccic/mmp-driver.c:253:7: error: 'DPHY3_ALGO_PXA910' undeclared (first use in this function) case DPHY3_ALGO_PXA910: ^ media/platform/marvell-ccic/mmp-driver.c:253:7: note: each undeclared identifier is reported only once for each function it appears in media/platform/marvell-ccic/mmp-driver.c:257:8: error: 'struct mmp_camera_platform_data' has no member named 'dphy' This marks the driver as 'BROKEN' but keeps the code around. Alternatively it could be removed entirely. Signed-off-by: Arnd Bergmann Acked-by: Jonathan Corbet Cc: Libin Yang Fixes: 05fed81625bf75 ("[media] marvell-ccic: add MIPI support for marvell-ccic driver") > This driver most assuredly did work on XO 1.75 machines, and the > platform_data structure does exist; it's the stuff added by Libin > afterward that apparently broke things. Strange that it only came out now, > though, nearly two years later. Libin, any thoughts on this? I've carried this workaround in a private git tree that has hundreds of randconfig fixes, just started flushing out some of the patches again. The configuration in which the driver gets selected is relatively rare, and it is not enabled in any of the defconfigs obviously. When I originally wrote the patch description, I must have missed the fact that the driver was moved from a different directory and I only saw that it was broken at the point when it showed up in drivers/media/platform/marvell-ccic/. > Meanwhile, it is clearly broken, and I don't have an immediate fix, so, > > Acked-by: Jonathan Corbet Thanks > (Though I would like a different patch subject, since the current one is > wrong). Done. diff --git a/drivers/media/platform/marvell-ccic/Kconfig b/drivers/media/platform/marvell-ccic/Kconfig index 6265d36adceb..7ac0f13c98be 100644 --- a/drivers/media/platform/marvell-ccic/Kconfig +++ b/drivers/media/platform/marvell-ccic/Kconfig @@ -13,7 +13,7 @@ config VIDEO_CAFE_CCIC config VIDEO_MMP_CAMERA tristate "Marvell Armada 610 integrated camera controller support" depends on ARCH_MMP && I2C && VIDEO_V4L2 - depends on HAS_DMA + depends on HAS_DMA && BROKEN select VIDEO_OV7670 select I2C_GPIO select VIDEOBUF2_DMA_SG -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: media: vino: vino: Removed variables that is never used
Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/staging/media/vino/vino.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/vino/vino.c b/drivers/staging/media/vino/vino.c index 2c85357..f43c1ea 100644 --- a/drivers/staging/media/vino/vino.c +++ b/drivers/staging/media/vino/vino.c @@ -2375,7 +2375,6 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) next_4_desc = vino->a.next_4_desc; unsigned int line_count_2, page_index_2, - field_counter_2, start_desc_tbl_2, next_4_desc_2; #endif @@ -2421,7 +2420,6 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) #ifdef VINO_DEBUG_INT line_count_2 = vino->a.line_count; page_index_2 = vino->a.page_index; - field_counter_2 = vino->a.field_counter; start_desc_tbl_2 = vino->a.start_desc_tbl; next_4_desc_2 = vino->a.next_4_desc; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
TBS6981/vb2-cx23885 kernel oops
The following are 3 samples of kernel messages that I am getting on a fairly regular basis, which seem to have started occurring since the cx23885 vb2 conversion. I am using the https://github.com/ljalves/linux_media tree from 16 Jan 2015 I have a TBS6985 and a TBS6981 card present in the machine. The TBS6985 is working fine. The kernel messages are triggered by VDR's idle scanning which it done using the TBS6981. [16795.690383] BUG: Bad page state in process vb2-cx23885[0] pfn:36bd1 [16795.690387] page:eadaf440 count:-1 mapcount:0 mapping: (null) index:0x0 [16795.690389] flags: 0x100() [16795.690390] page dumped because: nonzero _count [16795.690391] Modules linked in: rfcomm bluetooth iptable_mangle xt_DSCP ip_tables x_tables ir_jvc_decoder(OE) ir_lirc_codec(OE) lirc_dev(OE) ir_xmp_decoder(OE) ir_sony_decoder(OE) ir_sanyo_decoder(OE) ir_sharp_decoder(OE) ir_rc6_decoder(OE) ir_rc5_decoder(OE) ir_nec_decoder(OE) ir_mce_kbd_decoder(OE) rc_tbs_nec(OE) cx25840(OE) binfmt_misc rc_dib0700_rc5(OE) dib7000p(OE) cx23885(OE) altera_ci(OE) tda18271(OE) altera_stapl(OE) snd_hda_codec_hdmi videobuf2_dvb(OE) tveeprom(OE) snd_hda_codec_realtek av201x(OE) intel_rapl cx2341x(OE) x86_pkg_temp_thermal intel_powerclamp videobuf2_dma_sg(OE) videobuf2_memops(OE) coretemp videobuf2_core(OE) kvm snd_hda_codec_generic v4l2_common(OE) snd_hda_intel snd_hda_controller snd_hda_codec videodev(OE) crct10dif_pclmul crc32_pclmul saa716x_budget(OE) ghash_clmulni_intel snd_hwdep media(OE) snd_pcm i915 aesni_intel dvb_usb_dib0700(OE) tas2101(OE) aes_x86_64 dib9000(OE) dib7000m(OE) dib0090(OE) dib0070(OE) [16795.690421] vb2: counters for queue 880227c55828: UNBALANCED! [16795.690422] cxd2820r(OE) dib3000mc(OE) lrw video [16795.690425] vb2: setup: 1 start_streaming: 1 stop_streaming: 1 [16795.690426] vb2: wait_prepare: 10464 wait_finish: 10465 [16795.690427] vb2: counters for queue 880227c55828, buffer 31: UNBALANCED! [16795.690429] vb2: buf_init: 1 buf_cleanup: 1 buf_prepare: 109 buf_finish: 110 [16795.690429] vb2: buf_queue: 109 buf_done: 109 [16795.690430] vb2: alloc: 1 put: 1 prepare: 109 finish: 109 mmap: 0 [16795.690431] vb2: get_userptr: 0 put_userptr: 0 [16795.690432] vb2: attach_dmabuf: 0 detach_dmabuf: 0 map_dmabuf: 0 unmap_dmabuf: 0 [16795.690433] vb2: get_dmabuf: 0 num_users: 0 vaddr: 110 cookie: 110 [16795.690434] gpio_ich drm_kms_helper snd_seq_midi snd_seq_midi_event snd_rawmidi gf128mul dibx000_common(OE) mb86a16(OE) snd_seq glue_helper snd_seq_device lp cx24117(OE) mei_me snd_timer dvb_usb(OE) drm ablk_helper rc_core(OE) parport saa716x_core(OE) lpc_ich snd mei dvb_core(OE) soundcore i2c_algo_bit i2c_mux serio_raw cryptd mac_hid psmouse ahci r8169 libahci mii [16795.690452] CPU: 1 PID: 16771 Comm: vb2-cx23885[0] Tainted: G OE 3.18.1-ickle75+ #1 [16795.690453] Hardware name: Shuttle SH67H3/FH67, BIOS 4.6.4 03/22/2011 [16795.690454] 81aad259 880231493a48 817781fd [16795.690456] eadaf440 880231493a78 81774bcc eadaf440 [16795.690458] 0141 0200 88023fdf4780 880231493b68 [16795.690459] Call Trace: [16795.690465] [] dump_stack+0x46/0x58 [16795.690468] [] bad_page.part.50+0xe0/0xfe [16795.690471] [] get_page_from_freelist+0x873/0x9e0 [16795.690474] [] ? select_idle_sibling+0x2b/0x120 [16795.690498] [] __alloc_pages_nodemask+0x15f/0xa50 [16795.690501] [] ? try_to_wake_up+0x1e4/0x330 [16795.690505] [] dma_generic_alloc_coherent+0xa4/0x160 [16795.690508] [] x86_swiotlb_alloc_coherent+0x21/0x50 [16795.690513] [] cx23885_risc_databuffer+0xb2/0x170 [cx23885] [16795.690519] [] ? dvb_dmx_swfilter_section_copy_dump+0x1f1/0x250 [dvb_core] [16795.690522] [] cx23885_buf_prepare+0x7f/0xd0 [cx23885] [16795.690526] [] buffer_prepare+0x19/0x20 [cx23885] [16795.690529] [] __buf_prepare+0x27e/0x390 [videobuf2_core] [16795.690532] [] vb2_internal_qbuf+0x7b/0x240 [videobuf2_core] [16795.690535] [] vb2_thread+0x10e/0x480 [videobuf2_core] [16795.690538] [] ? vb2_internal_qbuf+0x240/0x240 [videobuf2_core] [16795.690540] [] kthread+0xd2/0xf0 [16795.690542] [] ? kthread_create_on_node+0x180/0x180 [16795.690545] [] ret_from_fork+0x7c/0xb0 [16795.690547] [] ? kthread_create_on_node+0x180/0x180 [16795.690548] Disabling lock debugging due to kernel taint [129577.894551] BUG: unable to handle kernel NULL pointer dereference at 0058 [129577.896227] IP: [] vb2_thread+0x17a/0x480 [videobuf2_core] [129577.897858] PGD 0 [129577.899451] Oops: 0002 [#6] SMP [129577.901033] Modules linked in: rfcomm bluetooth iptable_mangle xt_DSCP ip_tables x_tables ir_jvc_decoder(OE) ir_lirc_codec(OE) lirc_dev(OE) ir_x mp_decoder(OE) ir_sony_decoder(OE) ir_sanyo_decoder(OE) ir_sharp_decoder(OE) ir_rc6_decoder(OE) ir_rc5_decoder(OE) ir_nec_decoder(OE) ir_mce_kbd_dec oder(OE) rc_tbs_nec(OE) cx25840(OE) binfmt_misc rc_dib0700_rc5(OE) dib7000p(OE) cx23885(OE) altera_ci(OE) tda18271(OE) altera_stapl(OE) snd_hda_code c_hdmi videobuf2_dvb(OE) tveeprom(
cron job: media_tree daily build: ERRORS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Thu Jan 29 04:00:13 CET 2015 git branch: test git hash: 8d44aeefcd79e9be3b6db4f37efc7544995b619e gcc version:i686-linux-gcc (GCC) 4.9.1 sparse version: v0.5.0-41-g6c2d743 smatch version: 0.4.1-3153-g7d56ab3 host hardware: x86_64 host os:3.18.0-1.slh.1-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: OK linux-2.6.32.27-i686: OK linux-2.6.33.7-i686: OK linux-2.6.34.7-i686: OK linux-2.6.35.9-i686: OK linux-2.6.36.4-i686: ERRORS linux-2.6.37.6-i686: ERRORS linux-2.6.38.8-i686: ERRORS linux-2.6.39.4-i686: ERRORS linux-3.0.60-i686: ERRORS linux-3.1.10-i686: ERRORS linux-3.2.37-i686: ERRORS linux-3.3.8-i686: ERRORS linux-3.4.27-i686: ERRORS linux-3.5.7-i686: ERRORS linux-3.6.11-i686: ERRORS linux-3.7.4-i686: OK linux-3.8-i686: OK linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12.23-i686: OK linux-3.13.11-i686: OK linux-3.14.9-i686: OK linux-3.15.2-i686: OK linux-3.16-i686: OK linux-3.17.8-i686: OK linux-3.18-i686: OK linux-3.19-rc4-i686: OK linux-2.6.32.27-x86_64: OK linux-2.6.33.7-x86_64: OK linux-2.6.34.7-x86_64: OK linux-2.6.35.9-x86_64: OK linux-2.6.36.4-x86_64: ERRORS linux-2.6.37.6-x86_64: ERRORS linux-2.6.38.8-x86_64: ERRORS linux-2.6.39.4-x86_64: ERRORS linux-3.0.60-x86_64: ERRORS linux-3.1.10-x86_64: ERRORS linux-3.2.37-x86_64: ERRORS linux-3.3.8-x86_64: ERRORS linux-3.4.27-x86_64: ERRORS linux-3.5.7-x86_64: ERRORS linux-3.6.11-x86_64: ERRORS linux-3.7.4-x86_64: OK linux-3.8-x86_64: OK linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12.23-x86_64: OK linux-3.13.11-x86_64: OK linux-3.14.9-x86_64: OK linux-3.15.2-x86_64: OK linux-3.16-x86_64: OK linux-3.17.8-x86_64: OK linux-3.18-x86_64: OK linux-3.19-rc4-x86_64: OK apps: OK spec-git: OK sparse: ERRORS smatch: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/7] [media] marvell-ccic: MMP_CAMERA never worked
The mmp ccic driver uses a platform_data structure that has never existed in an upstream kernel and always fails to build: media/platform/marvell-ccic/mmp-driver.c: In function 'mmpcam_calc_dphy': media/platform/marvell-ccic/mmp-driver.c:252:15: error: 'struct mmp_camera_platform_data' has no member named 'dphy3_algo' switch (pdata->dphy3_algo) { ^ media/platform/marvell-ccic/mmp-driver.c:253:7: error: 'DPHY3_ALGO_PXA910' undeclared (first use in this function) case DPHY3_ALGO_PXA910: ^ media/platform/marvell-ccic/mmp-driver.c:253:7: note: each undeclared identifier is reported only once for each function it appears in media/platform/marvell-ccic/mmp-driver.c:257:8: error: 'struct mmp_camera_platform_data' has no member named 'dphy' This marks the driver as 'BROKEN' but keeps the code around. Alternatively it could be removed entirely. Signed-off-by: Arnd Bergmann Cc: Jonathan Corbet --- drivers/media/platform/marvell-ccic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/marvell-ccic/Kconfig b/drivers/media/platform/marvell-ccic/Kconfig index 6265d36adceb..7ac0f13c98be 100644 --- a/drivers/media/platform/marvell-ccic/Kconfig +++ b/drivers/media/platform/marvell-ccic/Kconfig @@ -13,7 +13,7 @@ config VIDEO_CAFE_CCIC config VIDEO_MMP_CAMERA tristate "Marvell Armada 610 integrated camera controller support" depends on ARCH_MMP && I2C && VIDEO_V4L2 - depends on HAS_DMA + depends on HAS_DMA && BROKEN select VIDEO_OV7670 select I2C_GPIO select VIDEOBUF2_DMA_SG -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
At present, dma_buf_export() takes a series of parameters, which makes it difficult to add any new parameters for exporters, if required. Make it simpler by moving all these parameters into a struct, and pass the struct * as parameter to dma_buf_export(). While at it, unite dma_buf_export_named() with dma_buf_export(), and change all callers accordingly. Signed-off-by: Sumit Semwal --- v3: Daniel Thompson caught the C99 warning issue w/ using {0}; using {.exp_name = xxx} instead. v2: add macro to zero out local struct, and fill KBUILD_MODNAME by default drivers/dma-buf/dma-buf.c | 47 +- drivers/gpu/drm/armada/armada_gem.c| 10 -- drivers/gpu/drm/drm_prime.c| 12 --- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 9 +++-- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 -- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 9 - drivers/gpu/drm/tegra/gem.c| 10 -- drivers/gpu/drm/ttm/ttm_object.c | 9 +++-- drivers/gpu/drm/udl/udl_dmabuf.c | 9 - drivers/media/v4l2-core/videobuf2-dma-contig.c | 8 - drivers/media/v4l2-core/videobuf2-dma-sg.c | 8 - drivers/media/v4l2-core/videobuf2-vmalloc.c| 8 - drivers/staging/android/ion/ion.c | 9 +++-- include/linux/dma-buf.h| 34 +++ 14 files changed, 142 insertions(+), 50 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 5be225c2ba98..6d3df3dd9310 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -265,7 +265,7 @@ static inline int is_dma_buf_file(struct file *file) } /** - * dma_buf_export_named - Creates a new dma_buf, and associates an anon file + * dma_buf_export - Creates a new dma_buf, and associates an anon file * with this buffer, so it can be exported. * Also connect the allocator specific data and ops to the buffer. * Additionally, provide a name string for exporter; useful in debugging. @@ -277,31 +277,32 @@ static inline int is_dma_buf_file(struct file *file) * @exp_name: [in]name of the exporting module - useful for debugging. * @resv: [in]reservation-object, NULL to allocate default one. * + * All the above info comes from struct dma_buf_export_info. + * * Returns, on success, a newly created dma_buf object, which wraps the * supplied private data and operations for dma_buf_ops. On either missing * ops, or error in allocating struct dma_buf, will return negative error. * */ -struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, - size_t size, int flags, const char *exp_name, - struct reservation_object *resv) +struct dma_buf *dma_buf_export(struct dma_buf_export_info *exp_info) { struct dma_buf *dmabuf; struct file *file; size_t alloc_size = sizeof(struct dma_buf); - if (!resv) + if (!exp_info->resv) alloc_size += sizeof(struct reservation_object); else /* prevent &dma_buf[1] == dma_buf->resv */ alloc_size += 1; - if (WARN_ON(!priv || !ops - || !ops->map_dma_buf - || !ops->unmap_dma_buf - || !ops->release - || !ops->kmap_atomic - || !ops->kmap - || !ops->mmap)) { + if (WARN_ON(!exp_info->priv + || !exp_info->ops + || !exp_info->ops->map_dma_buf + || !exp_info->ops->unmap_dma_buf + || !exp_info->ops->release + || !exp_info->ops->kmap_atomic + || !exp_info->ops->kmap + || !exp_info->ops->mmap)) { return ERR_PTR(-EINVAL); } @@ -309,21 +310,22 @@ struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, if (dmabuf == NULL) return ERR_PTR(-ENOMEM); - dmabuf->priv = priv; - dmabuf->ops = ops; - dmabuf->size = size; - dmabuf->exp_name = exp_name; + dmabuf->priv = exp_info->priv; + dmabuf->ops = exp_info->ops; + dmabuf->size = exp_info->size; + dmabuf->exp_name = exp_info->exp_name; init_waitqueue_head(&dmabuf->poll); dmabuf->cb_excl.poll = dmabuf->cb_shared.poll = &dmabuf->poll; dmabuf->cb_excl.active = dmabuf->cb_shared.active = 0; - if (!resv) { - resv = (struct reservation_object *)&dmabuf[1]; - reservation_object_init(resv); + if (!exp_info->resv) { + exp_info->resv = (struct reservation_object *)&dmabuf[1]; + reservation_object_init(exp_info->resv); } - dmabuf->resv = resv; + dmabuf->resv
[PATCH v2 1/6] v4l2-ctrls: Add new S8, S16 and S32 compound control types
Only unsigned compound types are implemented so far, add the corresponding signes types. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil --- .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 21 +++ .../DocBook/media/v4l/vidioc-queryctrl.xml | 30 ++ drivers/media/v4l2-core/v4l2-ctrls.c | 30 ++ include/media/v4l2-ctrls.h | 4 +++ include/uapi/linux/videodev2.h | 6 + 5 files changed, 91 insertions(+) diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index c5bdbfc..845087e 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml @@ -186,6 +186,27 @@ type V4L2_CTRL_TYPE_STRING. + __s8 * + p_s8 + A pointer to a matrix control of signed 8-bit values. +Valid if this control is of type V4L2_CTRL_TYPE_S8. + + + + __s16 * + p_s16 + A pointer to a matrix control of signed 16-bit values. +Valid if this control is of type V4L2_CTRL_TYPE_S16. + + + + __s32 * + p_s32 + A pointer to a matrix control of signed 32-bit values. +Valid if this control is of type V4L2_CTRL_TYPE_S32. + + + __u8 * p_u8 A pointer to a matrix control of unsigned 8-bit values. diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml index 2bd98fd..293e225 100644 --- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml @@ -512,6 +512,36 @@ Older drivers which do not support this feature return an &EINVAL;. + V4L2_CTRL_TYPE_S8 + any + any + any + A signed 8-bit valued control ranging from minimum to +maximum inclusive. The step value indicates the increment between +values which are actually different on the hardware. + + + + V4L2_CTRL_TYPE_S16 + any + any + any + A signed 16-bit valued control ranging from minimum to +maximum inclusive. The step value indicates the increment between +values which are actually different on the hardware. + + + + V4L2_CTRL_TYPE_S32 + any + any + any + A signed 32-bit valued control ranging from minimum to +maximum inclusive. The step value indicates the increment between +values which are actually different on the hardware. + + + V4L2_CTRL_TYPE_U8 any any diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 45c5b47..301abb7 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1247,10 +1247,13 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, case V4L2_CTRL_TYPE_INTEGER64: return ptr1.p_s64[idx] == ptr2.p_s64[idx]; case V4L2_CTRL_TYPE_U8: + case V4L2_CTRL_TYPE_S8: return ptr1.p_u8[idx] == ptr2.p_u8[idx]; case V4L2_CTRL_TYPE_U16: + case V4L2_CTRL_TYPE_S16: return ptr1.p_u16[idx] == ptr2.p_u16[idx]; case V4L2_CTRL_TYPE_U32: + case V4L2_CTRL_TYPE_S32: return ptr1.p_u32[idx] == ptr2.p_u32[idx]; default: if (ctrl->is_int) @@ -1280,12 +1283,15 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, ptr.p_s32[idx] = ctrl->default_value; break; case V4L2_CTRL_TYPE_U8: + case V4L2_CTRL_TYPE_S8: ptr.p_u8[idx] = ctrl->default_value; break; case V4L2_CTRL_TYPE_U16: + case V4L2_CTRL_TYPE_S16: ptr.p_u16[idx] = ctrl->default_value; break; case V4L2_CTRL_TYPE_U32: + case V4L2_CTRL_TYPE_S32: ptr.p_u32[idx] = ctrl->default_value; break; default: @@ -1338,6 +1344,15 @@ static void std_log(const struct v4l2_ctrl *ctrl) case V4L2_CTRL_TYPE_U32: pr_cont("%u", (unsigned)*ptr.p_u32); break; + case V4L2_CTRL_TYPE_S8: + pr_cont("%d", (int)*ptr.p_s8); + break; + case V4L2_CTRL_TYPE_S16: + pr_cont("%d", (int)*ptr.p_s16); + break; + case V4L2_CTRL_TYPE_S32: + pr_cont("%d", (int)*ptr.p_s32); + break; default: pr_cont("unknown type %d", ctrl->type); break; @@ -1397,6 +1412,12 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
[PATCH v2 6/6] staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix
Expose the module as two controls, one for the 3x3 multiplier matrix and one for the 3x1 offset vector. Signed-off-by: Laurent Pinchart --- drivers/staging/media/omap4iss/iss_ipipe.c | 129 - drivers/staging/media/omap4iss/iss_ipipe.h | 17 2 files changed, 144 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c index 73b165e..624c5d2 100644 --- a/drivers/staging/media/omap4iss/iss_ipipe.c +++ b/drivers/staging/media/omap4iss/iss_ipipe.c @@ -119,6 +119,105 @@ static void ipipe_configure(struct iss_ipipe_device *ipipe) } /* - + * V4L2 controls + */ + +#define OMAP4ISS_IPIPE_CID_BASE(V4L2_CID_USER_BASE | 0xf000) +#define OMAP4ISS_IPIPE_CID_RGB2RGB_MULT (OMAP4ISS_IPIPE_CID_BASE + 0) +#define OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET (OMAP4ISS_IPIPE_CID_BASE + 1) + +/* + * ipipe_s_ctrl - Handle set control subdev method + * @ctrl: pointer to v4l2 control structure + */ +static int ipipe_s_ctrl(struct v4l2_ctrl *ctrl) +{ + struct iss_ipipe_device *ipipe = + container_of(ctrl->handler, struct iss_ipipe_device, ctrls); + struct iss_device *iss = to_iss_device(ipipe); + unsigned int i; + + mutex_lock(&ipipe->lock); + + if (ipipe->state == ISS_PIPELINE_STREAM_STOPPED) + goto done; + + switch (ctrl->id) { + case OMAP4ISS_IPIPE_CID_RGB2RGB_MULT: + case OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET: + ctrl = ipipe->rgb2rgb_mult; + for (i = 0; i < ctrl->elems; ++i) + iss_reg_write(iss, OMAP4_ISS_MEM_ISP_IPIPE, + IPIPE_RGB1_MUL_RR + 4 * i, + ctrl->p_new.p_s16[i]); + + ctrl = ipipe->rgb2rgb_offset; + for (i = 0; i < ctrl->elems; ++i) + iss_reg_write(iss, OMAP4_ISS_MEM_ISP_IPIPE, + IPIPE_RGB1_OFT_OR + 4 * i, + ctrl->p_new.p_s16[i]); + break; + } + +done: + mutex_unlock(&ipipe->lock); + return 0; +} + +static const struct v4l2_ctrl_ops ipipe_ctrl_ops = { + .s_ctrl = ipipe_s_ctrl, +}; + +static void ipipe_ctrl_type_init(const struct v4l2_ctrl *ctrl, +union v4l2_ctrl_ptr ptr) +{ + unsigned int i; + + switch (ctrl->id) { + case OMAP4ISS_IPIPE_CID_RGB2RGB_MULT: + /* +* Initialize the diagonal to 1.0 and all other elements to +* 0.0. +*/ + for (i = 0; i < ctrl->elems; ++i) + ptr.p_s16[i] = (i % 4) ? 0 : 256; + break; + } +} + +static const struct v4l2_ctrl_type_ops ipipe_ctrl_type_ops = { + .equal = v4l2_ctrl_type_std_equal, + .init = ipipe_ctrl_type_init, + .log = v4l2_ctrl_type_std_log, + .validate = v4l2_ctrl_type_std_validate, +}; + +static const struct v4l2_ctrl_config ipipe_ctrls[] = { + { + .ops = &ipipe_ctrl_ops, + .type_ops = &ipipe_ctrl_type_ops, + .id = OMAP4ISS_IPIPE_CID_RGB2RGB_MULT, + .name = "RGB2RGB Multiplier", + .type = V4L2_CTRL_TYPE_S16, + .def = 0, + .min = -2048, + .max = 2047, + .step = 1, + .dims = { 3, 3 }, + }, { + .ops = &ipipe_ctrl_ops, + .id = OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET, + .name = "RGB2RGB Offset", + .type = V4L2_CTRL_TYPE_S16, + .def = 0, + .min = -4096, + .max = 4095, + .step = 1, + .dims = { 3 }, + }, +}; + +/* - * V4L2 subdev operations */ @@ -133,9 +232,11 @@ static int ipipe_set_stream(struct v4l2_subdev *sd, int enable) struct iss_device *iss = to_iss_device(ipipe); int ret = 0; + mutex_lock(&ipipe->lock); + if (ipipe->state == ISS_PIPELINE_STREAM_STOPPED) { if (enable == ISS_PIPELINE_STREAM_STOPPED) - return 0; + goto done; omap4iss_isp_subclk_enable(iss, OMAP4_ISS_ISP_SUBCLK_IPIPE); @@ -161,7 +262,7 @@ static int ipipe_set_stream(struct v4l2_subdev *sd, int enable) case ISS_PIPELINE_STREAM_STOPPED: if (ipipe->state == ISS_PIPELINE_STREAM_STOPPED) - return 0; + goto done; if (omap4iss_module_sync_idle(&sd->entity, &ipipe->wait, &ipipe->stopping)) ret = -ETIMEDOUT; @@ -172,6 +273,13 @@ static int ipi
[PATCH 2/7] [media] radio/aimslab: use mdelay instead of udelay
Large udelay values are not allowed on the ARM architecture and result in a build error like ERROR: "__bad_udelay" [drivers/media/radio/radio-aimslab.ko] undefined! This changes the aimslab radio driver to use an equivalent mdelay statement. Signed-off-by: Arnd Bergmann Cc: Hans Verkuil --- drivers/media/radio/radio-aimslab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index a739ad492e7b..ea9308796741 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c @@ -129,11 +129,11 @@ static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) } else if (curvol < vol) { outb(0x98, isa->io);/* volume up + sigstr + on */ for (; curvol < vol; curvol++) - udelay(3000); + mdelay(3); } else if (curvol > vol) { outb(0x58, isa->io);/* volume down + sigstr + on*/ for (; curvol > vol; curvol--) - udelay(3000); + mdelay(3); } outb(0xd8, isa->io);/* volume steady + sigstr + on */ rt->curvol = vol; -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Vivid test device: adding YU12
Hi folks, I've been trying to add a triplanar format to those that vivid can generate, and didn't quite manage :( So, I tried adding code for it like in the patch (with some dprintk() as well) to clarify what I wanted to do. Module is insmod'ed like "insmod vivid.ko n_devs=1 node_types=0x1 multiplanar=2 vivid_debug=1" With the patch, vivid: - seems to enumerate the new triplanar format all right - vid_s_fmt_vid_cap() works as intended too, apparently - when arriving to vid_cap_queue_setup(), the size of the different sub-arrays does not look quite ok. - Generated video is, visually, all green. I added as well a capture output dmesgs. Not much of interest here, the first few lines configure the queue -- with my few added dprintk it can be seen that the queue sizes are seemingly incorrect. If and when this part is up and running, I wanted to use Vivid to test dma-buf based capture. Big thanks! Jan 28 18:05:23 kernel: [ 884.446334] vivid-000: @vivid_s_fmt_vid_cap Jan 28 18:05:23 kernel: [ 884.446350] vivid-000: vid_cap_queue_setup, fourcc=0x32315559, planes=3 Jan 28 18:05:23 kernel: [ 884.446351] vivid-000: vid_cap_queue_setup, 0 bpl=640, 2bytesize=2 Jan 28 18:05:23 kernel: [ 884.446352] vivid-000: vid_cap_queue_setup, 1 bpl=640, 2bytesize=1 Jan 28 18:05:23 kernel: [ 884.446353] vivid-000: vid_cap_queue_setup, 2 bpl=640, 2bytesize=1 Jan 28 18:05:23 kernel: [ 884.446354] vivid-000: vid_cap_queue_setup, count=2, sizes=230400, 230400, 230400 Jan 28 18:05:23 kernel: [ 884.447130] vivid-000: vid_cap_buf_prepare Jan 28 18:05:23 kernel: [ 884.447401] vivid-000: vid_cap_buf_prepare Jan 28 18:05:23 kernel: [ 884.447405] vivid-000: vid_cap_buf_queue Jan 28 18:05:23 kernel: [ 884.447406] vivid-000: vid_cap_buf_queue Jan 28 18:05:23 kernel: [ 884.447407] vivid-000: vid_cap_start_streaming Jan 28 18:05:23 kernel: [ 884.447408] vivid-000: vivid_start_generating_vid_cap Jan 28 18:05:23 kernel: [ 884.447442] vivid-000: returning from vivid_start_generating_vid_cap Jan 28 18:05:23 kernel: [ 884.447443] vivid-000: Video Capture Thread Start Jan 28 18:05:23 kernel: [ 884.447444] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.447448] vivid-000: loop_vid_copy: 640x360@0x0 loop_vid_out: 640x360@0x0 loop_vid_cap: 640x360@0x0 Jan 28 18:05:23 kernel: [ 884.447450] vivid-000: loop_fb_copy: 0x0@0x0 loop_vid_overlay: 0x0@0x0 loop_vid_overlay_cap: 0x0@0x0 Jan 28 18:05:23 kernel: [ 884.447987] vivid-000: filled buffer 0 Jan 28 18:05:23 kernel: [ 884.478491] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.478494] vivid-000: loop_vid_copy: 640x360@0x0 loop_vid_out: 640x360@0x0 loop_vid_cap: 640x360@0x0 Jan 28 18:05:23 kernel: [ 884.478496] vivid-000: loop_fb_copy: 0x0@0x0 loop_vid_overlay: 0x0@0x0 loop_vid_overlay_cap: 0x0@0x0 Jan 28 18:05:23 kernel: [ 884.478945] vivid-000: filled buffer 1 Jan 28 18:05:23 kernel: [ 884.479243] vivid-000: vid_cap_buf_prepare Jan 28 18:05:23 kernel: [ 884.479246] vivid-000: vid_cap_buf_queue Jan 28 18:05:23 kernel: [ 884.514523] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.514526] vivid-000: loop_vid_copy: 640x360@0x0 loop_vid_out: 640x360@0x0 loop_vid_cap: 640x360@0x0 Jan 28 18:05:23 kernel: [ 884.514527] vivid-000: loop_fb_copy: 0x0@0x0 loop_vid_overlay: 0x0@0x0 loop_vid_overlay_cap: 0x0@0x0 Jan 28 18:05:23 kernel: [ 884.514723] vivid-000: filled buffer 0 Jan 28 18:05:23 kernel: [ 884.546620] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.578592] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.614667] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.646706] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.678709] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.714780] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.71] vivid-000: vid_cap_buf_prepare Jan 28 18:05:23 kernel: [ 884.715557] vivid-000: vid_cap_buf_queue Jan 28 18:05:23 kernel: [ 884.746817] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.746845] vivid-000: loop_vid_copy: 640x360@0x0 loop_vid_out: 640x360@0x0 loop_vid_cap: 640x360@0x0 Jan 28 18:05:23 kernel: [ 884.746846] vivid-000: loop_fb_copy: 0x0@0x0 loop_vid_overlay: 0x0@0x0 loop_vid_overlay_cap: 0x0@0x0 Jan 28 18:05:23 kernel: [ 884.747119] vivid-000: filled buffer 1 Jan 28 18:05:23 kernel: [ 884.778812] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.814849] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.846895] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.878922] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.914996] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.947015] vivid-000: Video Capture Thread Tick Jan 28 18:05:23 kernel: [ 884.947899] vivid-000: vid_cap_buf_prepare Jan 28 1
Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Em Wed, 28 Jan 2015 18:24:03 +0530 Sumit Semwal escreveu: > +/** > + * helper macro for exporters; zeros and fills in most common values > + */ > +#define DEFINE_DMA_BUF_EXPORT_INFO(a)\ > + struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME } > + I suspect that this will let the other fields not initialized. You likely need to do: #define DEFINE_DMA_BUF_EXPORT_INFO(a) \ struct dma_buf_export_info a = {\ .exp_name = KBUILD_MODNAME; \ .fields = 0;\ ... } Regards, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH/RFC v10 03/19] DT: leds: Add led-sources property
On Wed, Jan 21, 2015 at 10:39:05AM +0100, Jacek Anaszewski wrote: > I agree. I think that led-sources-cnt is redundant. A list property > can be read using of_prop_next_u32 function. I missed that and thus > proposed putting led-sources-cnt in each sub-node to be able to read > led-sources list with of_property_read_u32_array. > > Effectively, I propose to avoid adding led-sources-cnt property. You can also read the array size using of_get_property(). -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] [media] timberdale: do not select TIMB_DMA
The timberdale media driver requires the use of the respective dma engine driver, but that may not be enabled, causing a Kconfig warning: warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE) This fixes the dependency by removing the inappropriate 'select' statement and replacing it with a direct dependency on the drivers that provide the services this needs. Signed-off-by: Arnd Bergmann Fixes: 7155043c2d027 ("[media] enable COMPILE_TEST for media drivers") --- drivers/media/platform/Kconfig | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 765bffb49a72..6a1334be7544 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -56,10 +56,8 @@ config VIDEO_VIU config VIDEO_TIMBERDALE tristate "Support for timberdale Video In/LogiWIN" - depends on VIDEO_V4L2 && I2C && DMADEVICES - depends on MFD_TIMBERDALE || COMPILE_TEST - select DMA_ENGINE - select TIMB_DMA + depends on VIDEO_V4L2 && I2C + depends on (MFD_TIMBERDALE && TIMB_DMA) || COMPILE_TEST select VIDEO_ADV7180 select VIDEOBUF_DMA_CONTIG ---help--- -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Op 28-01-15 om 13:54 schreef Sumit Semwal: > At present, dma_buf_export() takes a series of parameters, which > makes it difficult to add any new parameters for exporters, if required. > > Make it simpler by moving all these parameters into a struct, and pass > the struct * as parameter to dma_buf_export(). > > While at it, unite dma_buf_export_named() with dma_buf_export(), and > change all callers accordingly. > > Signed-off-by: Sumit Semwal > --- > v3: Daniel Thompson caught the C99 warning issue w/ using {0}; using > {.exp_name = xxx} instead. > > v2: add macro to zero out local struct, and fill KBUILD_MODNAME by default > > drivers/dma-buf/dma-buf.c | 47 > +- > drivers/gpu/drm/armada/armada_gem.c| 10 -- > drivers/gpu/drm/drm_prime.c| 12 --- > drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 9 +++-- > drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 -- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 9 - > drivers/gpu/drm/tegra/gem.c| 10 -- > drivers/gpu/drm/ttm/ttm_object.c | 9 +++-- > drivers/gpu/drm/udl/udl_dmabuf.c | 9 - > drivers/media/v4l2-core/videobuf2-dma-contig.c | 8 - > drivers/media/v4l2-core/videobuf2-dma-sg.c | 8 - > drivers/media/v4l2-core/videobuf2-vmalloc.c| 8 - > drivers/staging/android/ion/ion.c | 9 +++-- > include/linux/dma-buf.h| 34 +++ > 14 files changed, 142 insertions(+), 50 deletions(-) > > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index 5be225c2ba98..6d3df3dd9310 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -265,7 +265,7 @@ static inline int is_dma_buf_file(struct file *file) > } > > /** > - * dma_buf_export_named - Creates a new dma_buf, and associates an anon file > + * dma_buf_export - Creates a new dma_buf, and associates an anon file > * with this buffer, so it can be exported. > * Also connect the allocator specific data and ops to the buffer. > * Additionally, provide a name string for exporter; useful in debugging. > @@ -277,31 +277,32 @@ static inline int is_dma_buf_file(struct file *file) > * @exp_name:[in]name of the exporting module - useful for > debugging. > * @resv:[in]reservation-object, NULL to allocate default one. > * > + * All the above info comes from struct dma_buf_export_info. > + * > * Returns, on success, a newly created dma_buf object, which wraps the > * supplied private data and operations for dma_buf_ops. On either missing > * ops, or error in allocating struct dma_buf, will return negative error. > * > */ > -struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops > *ops, > - size_t size, int flags, const char *exp_name, > - struct reservation_object *resv) > +struct dma_buf *dma_buf_export(struct dma_buf_export_info *exp_info) This function should probably take a const struct dma_buf_export_info here.. Rest looks sane. ~Maarten > { > struct dma_buf *dmabuf; > struct file *file; > size_t alloc_size = sizeof(struct dma_buf); > - if (!resv) > + if (!exp_info->resv) > alloc_size += sizeof(struct reservation_object); > else > /* prevent &dma_buf[1] == dma_buf->resv */ > alloc_size += 1; > > - if (WARN_ON(!priv || !ops > - || !ops->map_dma_buf > - || !ops->unmap_dma_buf > - || !ops->release > - || !ops->kmap_atomic > - || !ops->kmap > - || !ops->mmap)) { > + if (WARN_ON(!exp_info->priv > + || !exp_info->ops > + || !exp_info->ops->map_dma_buf > + || !exp_info->ops->unmap_dma_buf > + || !exp_info->ops->release > + || !exp_info->ops->kmap_atomic > + || !exp_info->ops->kmap > + || !exp_info->ops->mmap)) { > return ERR_PTR(-EINVAL); > } > > @@ -309,21 +310,22 @@ struct dma_buf *dma_buf_export_named(void *priv, const > struct dma_buf_ops *ops, > if (dmabuf == NULL) > return ERR_PTR(-ENOMEM); > > - dmabuf->priv = priv; > - dmabuf->ops = ops; > - dmabuf->size = size; > - dmabuf->exp_name = exp_name; > + dmabuf->priv = exp_info->priv; > + dmabuf->ops = exp_info->ops; > + dmabuf->size = exp_info->size; > + dmabuf->exp_name = exp_info->exp_name; > init_waitqueue_head(&dmabuf->poll); > dmabuf->cb_excl.poll = dmabuf->cb_shared.poll = &dmabuf->poll; > dmabuf->cb_excl.active = dmabuf->cb_shared.active = 0; > > - if (!resv) { > - resv = (struct reservation_ob
Re: [PATCH] media: au0828 analog_register error path fixes to do proper cleanup
On 12/30/2014 05:22 PM, Shuah Khan wrote: > au0828_analog_register() doesn't release video and vbi queues > created by vb2_queue_init(). In addition, it doesn't unregister > vdev when vbi register fails. Add vb2_queue_release() calls to > release video and vbi queues to the failure path to be called > when vdev register fails. Add video_unregister_device() for > vdev when vbi register fails. > > Signed-off-by: Shuah Khan > --- > Please note that this patch is dependent on the au0828 vb2 > conversion patch. I have to fold this patch into the vb2 conversion patch as it no longer applies after the recent changes to address comments on patch v3. I will fold it into vb2 convert patch v6. It makes sense since vb2_queue_release() should be part of the conversion work anyway. thanks, -- Shuah > > drivers/media/usb/au0828/au0828-video.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/usb/au0828/au0828-video.c > b/drivers/media/usb/au0828/au0828-video.c > index 94b65b8..17450eb 100644 > --- a/drivers/media/usb/au0828/au0828-video.c > +++ b/drivers/media/usb/au0828/au0828-video.c > @@ -1785,7 +1785,7 @@ int au0828_analog_register(struct au0828_dev *dev, > dprintk(1, "unable to register video device (error = %d).\n", > retval); > ret = -ENODEV; > - goto err_vbi_dev; > + goto err_reg_vdev; > } > > /* Register the vbi device */ > @@ -1795,14 +1795,18 @@ int au0828_analog_register(struct au0828_dev *dev, > dprintk(1, "unable to register vbi device (error = %d).\n", > retval); > ret = -ENODEV; > - goto err_vbi_dev; > + goto err_reg_vbi_dev; > } > > - > dprintk(1, "%s completed!\n", __func__); > > return 0; > > +err_reg_vbi_dev: > + video_unregister_device(dev->vdev); > +err_reg_vdev: > + vb2_queue_release(&dev->vb_vidq); > + vb2_queue_release(&dev->vb_vbiq); > err_vbi_dev: > video_device_release(dev->vbi_dev); > err_vdev: > -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5] media: au0828 - convert to use videobuf2
On 01/23/2015 12:41 PM, Shuah Khan wrote: > Convert au0828 to use videobuf2. Tested with NTSC. > Tested video and vbi devices with xawtv, tvtime, > and vlc. Ran v4l2-compliance to ensure there are > no failures. > > Video compliance test results summary: > Total: 75, Succeeded: 75, Failed: 0, Warnings: 18 > > Vbi compliance test results summary: > Total: 75, Succeeded: 75, Failed: 0, Warnings: 0 > > Signed-off-by: Shuah Khan > --- Hi Hans, Please don't pull this in. Found a bug in stop_streaming() when re-tuning that requires re-working this patch. stop_streaming() calls is doing more than it should while holding slock triggering lock warning. It shouldn't call v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_stream, 0); while holding slock triggering lock warning. I will send patch v6. thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 3/6] v4l2-ctrls: Make the control type init op initialize the whole control
The control type init operation is called in a loop to initialize all elements of a control. Not only is this inefficient for control types that could use a memset(), it also complicates the implementation of custom control types, for instance when a matrix needs to be initialized with different values for its elements. Make the init operation initialize the whole control instead, and use memset() when possible. Signed-off-by: Laurent Pinchart --- drivers/media/v4l2-core/v4l2-ctrls.c | 46 ++-- include/media/v4l2-ctrls.h | 3 +-- 2 files changed, 34 insertions(+), 15 deletions(-) Changes since v1: - Remove support for V4L2_CTRL_TYPE_U8 and V4L2_CTRL_TYPE_S8 from std_init_one(), as those cases are now handled by std_init() diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index adac93e..81b8e66 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1263,8 +1263,8 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, } } -static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, -union v4l2_ctrl_ptr ptr) +static void std_init_one(const struct v4l2_ctrl *ctrl, u32 idx, +union v4l2_ctrl_ptr ptr) { switch (ctrl->type) { case V4L2_CTRL_TYPE_STRING: @@ -1282,10 +1282,6 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, case V4L2_CTRL_TYPE_BOOLEAN: ptr.p_s32[idx] = ctrl->default_value; break; - case V4L2_CTRL_TYPE_U8: - case V4L2_CTRL_TYPE_S8: - ptr.p_u8[idx] = ctrl->default_value; - break; case V4L2_CTRL_TYPE_U16: case V4L2_CTRL_TYPE_S16: ptr.p_u16[idx] = ctrl->default_value; @@ -1295,8 +1291,35 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, ptr.p_u32[idx] = ctrl->default_value; break; default: - idx *= ctrl->elem_size; - memset(ptr.p + idx, 0, ctrl->elem_size); + break; + } +} + +static void std_init(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr) +{ + u32 idx; + + switch (ctrl->type) { + case V4L2_CTRL_TYPE_STRING: + case V4L2_CTRL_TYPE_INTEGER64: + case V4L2_CTRL_TYPE_INTEGER: + case V4L2_CTRL_TYPE_INTEGER_MENU: + case V4L2_CTRL_TYPE_MENU: + case V4L2_CTRL_TYPE_BITMASK: + case V4L2_CTRL_TYPE_BOOLEAN: + case V4L2_CTRL_TYPE_U16: + case V4L2_CTRL_TYPE_S16: + case V4L2_CTRL_TYPE_U32: + case V4L2_CTRL_TYPE_S32: + for (idx = 0; idx < ctrl->elems; idx++) + std_init_one(ctrl, idx, ptr); + break; + case V4L2_CTRL_TYPE_U8: + case V4L2_CTRL_TYPE_S8: + memset(ptr.p_u8, ctrl->default_value, ctrl->elems); + break; + default: + memset(ptr.p, 0, ctrl->elems * ctrl->elem_size); break; } } @@ -1929,7 +1952,6 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, unsigned elems = 1; bool is_array; unsigned tot_ctrl_size; - unsigned idx; void *data; int err; @@ -2049,10 +2071,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, ctrl->p_new.p = &ctrl->val; ctrl->p_cur.p = &ctrl->cur.val; } - for (idx = 0; idx < elems; idx++) { - ctrl->type_ops->init(ctrl, idx, ctrl->p_cur); - ctrl->type_ops->init(ctrl, idx, ctrl->p_new); - } + ctrl->type_ops->init(ctrl, ctrl->p_cur); + ctrl->type_ops->init(ctrl, ctrl->p_new); if (handler_new_ref(hdl, ctrl)) { kfree(ctrl); diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index e1cfb8f..a7280e9 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -87,8 +87,7 @@ struct v4l2_ctrl_type_ops { bool (*equal)(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr1, union v4l2_ctrl_ptr ptr2); - void (*init)(const struct v4l2_ctrl *ctrl, u32 idx, -union v4l2_ctrl_ptr ptr); + void (*init)(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr); void (*log)(const struct v4l2_ctrl *ctrl); int (*validate)(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr); -- 2.0.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/7] [media] ARM randconfig fixes
Hi Mauro, This is one set of randconfig fixes that I've been carrying in a local branch for a long time. I have made sure that they are all still required, but there are others that I have not been able to reproduce yet, so I will probably send them out once I get the errors again. The ones here are all trivial, mostly adding missing dependencies. Please apply. Arnd Bergmann (7): [media] timberdale: do not select TIMB_DMA [media] radio/aimslab: use mdelay instead of udelay [media] staging/davinci/vpfe/dm365: add missing dependencies [media] siano: fix Kconfig dependencies [media] gspca: add INPUT dependency [media] marvell-ccic: MMP_CAMERA never worked [media] marvell-ccic needs VIDEOBUF2_DMA_SG drivers/media/mmc/siano/Kconfig | 2 ++ drivers/media/platform/Kconfig | 6 ++ drivers/media/platform/marvell-ccic/Kconfig | 3 ++- drivers/media/radio/radio-aimslab.c | 4 ++-- drivers/media/usb/gspca/Kconfig | 1 + drivers/media/usb/siano/Kconfig | 2 ++ drivers/staging/media/davinci_vpfe/Kconfig | 2 ++ 7 files changed, 13 insertions(+), 7 deletions(-) -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] [media] staging/davinci/vpfe/dm365: add missing dependencies
This driver can only be built when VIDEO_V4L2_SUBDEV_API and VIDEO_DAVINCI_VPBE_DISPLAY are also provided by the kernel. drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format': drivers/staging/media/davinci_vpfe/dm365_isif.c:1410:3: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration] return v4l2_subdev_get_try_format(fh, pad); ^ Signed-off-by: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/staging/media/davinci_vpfe/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/davinci_vpfe/Kconfig b/drivers/staging/media/davinci_vpfe/Kconfig index 4de2f082491d..f40a06954a92 100644 --- a/drivers/staging/media/davinci_vpfe/Kconfig +++ b/drivers/staging/media/davinci_vpfe/Kconfig @@ -2,6 +2,8 @@ config VIDEO_DM365_VPFE tristate "DM365 VPFE Media Controller Capture Driver" depends on VIDEO_V4L2 && ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF depends on HAS_DMA + depends on VIDEO_V4L2_SUBDEV_API + depends on VIDEO_DAVINCI_VPBE_DISPLAY select VIDEOBUF2_DMA_CONTIG help Support for DM365 VPFE based Media Controller Capture driver. -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/7] [media] gspca: add INPUT dependency
The gspca driver uses the input_event infrastructure and fails to link if that is not available: drivers/built-in.o: In function `gspca_disconnect': media/usb/gspca/gspca.c:2171: undefined reference to `input_unregister_device' drivers/built-in.o: In function `gspca_dev_probe2': media/usb/gspca/gspca.c:2112: undefined reference to `input_allocate_device' media/usb/gspca/gspca.c:2112: undefined reference to `input_register_device' media/usb/gspca/gspca.c:2112: undefined reference to `input_unregister_device' media/usb/gspca/gspca.c:2112: undefined reference to `input_free_device' drivers/built-in.o: In function `sd_int_pkt_scan': media/usb/gspca/pac207.c:428: undefined reference to `input_event' drivers/built-in.o: In function `sd_int_pkt_scan': media/usb/gspca/pac7302.c:879: undefined reference to `input_event' drivers/built-in.o: In function `sd_int_pkt_scan': media/usb/gspca/se401.c:612: undefined reference to `input_event' drivers/built-in.o: In function `sd_stop0': media/usb/gspca/xirlink_cit.c:2742: undefined reference to `input_event' drivers/built-in.o: In function `cit_check_button': media/usb/gspca/xirlink_cit.c:2935: undefined reference to `input_event' drivers/built-in.o:/git/arm-soc/include/linux/input.h:414: more undefined references to `input_event' follow This adds an explicit dependency. Signed-off-by: Arnd Bergmann Cc: Hans de Goede --- drivers/media/usb/gspca/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/gspca/Kconfig b/drivers/media/usb/gspca/Kconfig index eed10d782535..2b23aad5a9f2 100644 --- a/drivers/media/usb/gspca/Kconfig +++ b/drivers/media/usb/gspca/Kconfig @@ -1,6 +1,7 @@ menuconfig USB_GSPCA tristate "GSPCA based webcams" depends on VIDEO_V4L2 + depends on INPUT default m ---help--- Say Y here if you want to enable selecting webcams based -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [possible BUG, cx23885] Dual tuner TV card, works using one tuner only, doesn't work if both tuners are used
> > Hi, James. > > After searching for somebody posting some issues similar to mine, I think this > one you posted to the mailing list can be related: > > https://www.mail-archive.com/linux- > media%40vger.kernel.org/msg80078.html > > I'm having problems using both tuners in a dual tuner card (Terratec Cinergy T > PCIe Dual), also based on cx23885, but it uses different frontends/tuners > than yours. > I'm pretty sure mine was an actual hardware fault. At first it worked perfectly. Then after a bit the server would occasionally lock up hard or reboot, then more often, then every time. I spent ages thinking it was a driver problem and did all sorts of traces etc and found nothing. In the end I just got mythtv to not use the second tuner (or the first tuner - as long as only one was used it was fine). Then about a month ago it started locking up again occasionally, then more often, then every time, only using the one tuner. Strange though that if it booted up without locking up it would be okay. I bought a usb tuner and haven't used the cx23885 card since. I will be seeking a replacement under warranty though, as the signal quality is quite a bit better. Good luck in your quest though! James
[PATCH 7/7] [media] marvell-ccic needs VIDEOBUF2_DMA_SG
The vb2_dma_sg_memops pointer is only valid if VIDEOBUF2_DMA_SG is set, so we should select that to avoid this build error: drivers/built-in.o: In function `mcam_v4l_open': :(.text+0x388d00): undefined reference to `vb2_dma_sg_memops' Signed-off-by: Arnd Bergmann Cc: Jonathan Corbet --- drivers/media/platform/marvell-ccic/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/marvell-ccic/Kconfig b/drivers/media/platform/marvell-ccic/Kconfig index 7ac0f13c98be..4bf5bd1e90d6 100644 --- a/drivers/media/platform/marvell-ccic/Kconfig +++ b/drivers/media/platform/marvell-ccic/Kconfig @@ -5,6 +5,7 @@ config VIDEO_CAFE_CCIC select VIDEO_OV7670 select VIDEOBUF2_VMALLOC select VIDEOBUF2_DMA_CONTIG + select VIDEOBUF2_DMA_SG ---help--- This is a video4linux2 driver for the Marvell 88ALP01 integrated CMOS camera controller. This is the controller found on first- -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] [media] siano: fix Kconfig dependencies
The USB and MMC front-ends to the siano driver both only make sense when combined with the SMS_SIANO_MDTV driver. That driver already requires RC_CORE to not be a module, so we also need to add that dependency here. drivers/built-in.o: In function `smssdio_remove': :(.text+0x155bd8): undefined reference to `smscore_putbuffer' :(.text+0x155bdc): undefined reference to `smscore_unregister_device' drivers/built-in.o: In function `smssdio_interrupt': :(.text+0x155e4c): undefined reference to `smsendian_handle_rx_message' :(.text+0x155e50): undefined reference to `smscore_onresponse' :(.text+0x155e54): undefined reference to `smscore_getbuffer' :(.text+0x155e58): undefined reference to `smscore_putbuffer' drivers/built-in.o: In function `smssdio_sendrequest': :(.text+0x155f20): undefined reference to `smsendian_handle_tx_message' drivers/built-in.o: In function `smssdio_probe': :(.text+0x15610c): undefined reference to `sms_get_board' :(.text+0x156114): undefined reference to `smscore_register_device' :(.text+0x156118): undefined reference to `smscore_set_board_id' :(.text+0x156128): undefined reference to `smscore_unregister_device' :(.text+0x156140): undefined reference to `smscore_start_device' Signed-off-by: Arnd Bergmann --- drivers/media/mmc/siano/Kconfig | 2 ++ drivers/media/usb/siano/Kconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/media/mmc/siano/Kconfig b/drivers/media/mmc/siano/Kconfig index aa05ad3c1ccb..7693487e2f63 100644 --- a/drivers/media/mmc/siano/Kconfig +++ b/drivers/media/mmc/siano/Kconfig @@ -6,6 +6,8 @@ config SMS_SDIO_DRV tristate "Siano SMS1xxx based MDTV via SDIO interface" depends on DVB_CORE && HAS_DMA depends on MMC + depends on !RC_CORE || RC_CORE select MEDIA_COMMON_OPTIONS + select SMS_SIANO_MDTV ---help--- Choose if you would like to have Siano's support for SDIO interface diff --git a/drivers/media/usb/siano/Kconfig b/drivers/media/usb/siano/Kconfig index 5afbd9a4b55c..d37b742d4f7a 100644 --- a/drivers/media/usb/siano/Kconfig +++ b/drivers/media/usb/siano/Kconfig @@ -5,7 +5,9 @@ config SMS_USB_DRV tristate "Siano SMS1xxx based MDTV receiver" depends on DVB_CORE && HAS_DMA + depends on !RC_CORE || RC_CORE select MEDIA_COMMON_OPTIONS + select SMS_SIANO_MDTV ---help--- Choose if you would like to have Siano's support for USB interface -- 2.1.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/6] v4l2-ctrls: Don't initialize array tail when setting a control
Setting an array control subset isn't allowed by the control framework, which returns an error in prepare_ext_ctrls() if the control size specified by userspace is smaller than the total size. There is thus no need to initialize the array tail to its default value, as the tail will always be empty. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 301abb7..adac93e 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1518,13 +1518,9 @@ static int user_to_ptr(struct v4l2_ext_control *c, ctrl->is_new = 1; if (ctrl->is_ptr && !ctrl->is_string) { - unsigned idx; - ret = copy_from_user(ptr.p, c->ptr, c->size) ? -EFAULT : 0; if (ret || !ctrl->is_array) return ret; - for (idx = c->size / ctrl->elem_size; idx < ctrl->elems; idx++) - ctrl->type_ops->init(ctrl, idx, ptr); return 0; } -- 2.0.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 4/6] v4l2-ctrls: Export the standard control type operations
Drivers that implement custom control types need to implement the equal, init, log and validate operations. Depending on the control type some of those operations can use the standard control type implementation provided by the v4l2 control framework. Export them to enable their reuse. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls.c | 27 --- include/media/v4l2-ctrls.h | 9 + 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 81b8e66..cbc83b6 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1233,9 +1233,9 @@ static void send_event(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl, u32 changes) v4l2_event_queue_fh(sev->fh, &ev); } -static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, - union v4l2_ctrl_ptr ptr1, - union v4l2_ctrl_ptr ptr2) +bool v4l2_ctrl_type_std_equal(const struct v4l2_ctrl *ctrl, u32 idx, + union v4l2_ctrl_ptr ptr1, + union v4l2_ctrl_ptr ptr2) { switch (ctrl->type) { case V4L2_CTRL_TYPE_BUTTON: @@ -1262,6 +1262,7 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, return !memcmp(ptr1.p + idx, ptr2.p + idx, ctrl->elem_size); } } +EXPORT_SYMBOL_GPL(v4l2_ctrl_type_std_equal); static void std_init_one(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr) @@ -1295,7 +1296,8 @@ static void std_init_one(const struct v4l2_ctrl *ctrl, u32 idx, } } -static void std_init(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr) +void v4l2_ctrl_type_std_init(const struct v4l2_ctrl *ctrl, +union v4l2_ctrl_ptr ptr) { u32 idx; @@ -1323,8 +1325,9 @@ static void std_init(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr) break; } } +EXPORT_SYMBOL_GPL(v4l2_ctrl_type_std_init); -static void std_log(const struct v4l2_ctrl *ctrl) +void v4l2_ctrl_type_std_log(const struct v4l2_ctrl *ctrl) { union v4l2_ctrl_ptr ptr = ctrl->p_cur; @@ -1381,6 +1384,7 @@ static void std_log(const struct v4l2_ctrl *ctrl) break; } } +EXPORT_SYMBOL_GPL(v4l2_ctrl_type_std_log); /* * Round towards the closest legal value. Be careful when we are @@ -1404,8 +1408,8 @@ static void std_log(const struct v4l2_ctrl *ctrl) }) /* Validate a new control */ -static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, - union v4l2_ctrl_ptr ptr) +int v4l2_ctrl_type_std_validate(const struct v4l2_ctrl *ctrl, u32 idx, + union v4l2_ctrl_ptr ptr) { size_t len; u64 offset; @@ -1479,12 +1483,13 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, return -EINVAL; } } +EXPORT_SYMBOL_GPL(v4l2_ctrl_type_std_validate); static const struct v4l2_ctrl_type_ops std_type_ops = { - .equal = std_equal, - .init = std_init, - .log = std_log, - .validate = std_validate, + .equal = v4l2_ctrl_type_std_equal, + .init = v4l2_ctrl_type_std_init, + .log = v4l2_ctrl_type_std_log, + .validate = v4l2_ctrl_type_std_validate, }; /* Helper function: copy the given control value back to the caller */ diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index a7280e9..71067fb 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -93,6 +93,15 @@ struct v4l2_ctrl_type_ops { union v4l2_ctrl_ptr ptr); }; +bool v4l2_ctrl_type_std_equal(const struct v4l2_ctrl *ctrl, u32 idx, + union v4l2_ctrl_ptr ptr1, + union v4l2_ctrl_ptr ptr2); +void v4l2_ctrl_type_std_init(const struct v4l2_ctrl *ctrl, +union v4l2_ctrl_ptr ptr); +void v4l2_ctrl_type_std_log(const struct v4l2_ctrl *ctrl); +int v4l2_ctrl_type_std_validate(const struct v4l2_ctrl *ctrl, u32 idx, + union v4l2_ctrl_ptr ptr); + typedef void (*v4l2_ctrl_notify_fnc)(struct v4l2_ctrl *ctrl, void *priv); /** struct v4l2_ctrl - The control structure. -- 2.0.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 5/6] staging: media: omap4iss: Cleanup media entities after unregistration
The ipipeif, ipipe and resizer media entities are cleaned up before unregistering the media device, creating a race condition. Fix it by cleaning them up at cleanup time. Signed-off-by: Laurent Pinchart --- drivers/staging/media/omap4iss/iss_ipipe.c | 6 +++--- drivers/staging/media/omap4iss/iss_ipipeif.c | 6 +++--- drivers/staging/media/omap4iss/iss_resizer.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c index a1a46ef..73b165e 100644 --- a/drivers/staging/media/omap4iss/iss_ipipe.c +++ b/drivers/staging/media/omap4iss/iss_ipipe.c @@ -516,8 +516,6 @@ static int ipipe_init_entities(struct iss_ipipe_device *ipipe) void omap4iss_ipipe_unregister_entities(struct iss_ipipe_device *ipipe) { - media_entity_cleanup(&ipipe->subdev.entity); - v4l2_device_unregister_subdev(&ipipe->subdev); } @@ -566,5 +564,7 @@ int omap4iss_ipipe_init(struct iss_device *iss) */ void omap4iss_ipipe_cleanup(struct iss_device *iss) { - /* FIXME: are you sure there's nothing to do? */ + struct iss_ipipe_device *ipipe = &iss->ipipe; + + media_entity_cleanup(&ipipe->subdev.entity); } diff --git a/drivers/staging/media/omap4iss/iss_ipipeif.c b/drivers/staging/media/omap4iss/iss_ipipeif.c index 3943fae..1a905e1 100644 --- a/drivers/staging/media/omap4iss/iss_ipipeif.c +++ b/drivers/staging/media/omap4iss/iss_ipipeif.c @@ -773,8 +773,6 @@ static int ipipeif_init_entities(struct iss_ipipeif_device *ipipeif) void omap4iss_ipipeif_unregister_entities(struct iss_ipipeif_device *ipipeif) { - media_entity_cleanup(&ipipeif->subdev.entity); - v4l2_device_unregister_subdev(&ipipeif->subdev); omap4iss_video_unregister(&ipipeif->video_out); } @@ -828,5 +826,7 @@ int omap4iss_ipipeif_init(struct iss_device *iss) */ void omap4iss_ipipeif_cleanup(struct iss_device *iss) { - /* FIXME: are you sure there's nothing to do? */ + struct iss_ipipeif_device *ipipeif = &iss->ipipeif; + + media_entity_cleanup(&ipipeif->subdev.entity); } diff --git a/drivers/staging/media/omap4iss/iss_resizer.c b/drivers/staging/media/omap4iss/iss_resizer.c index 3ab9728..d4834b6 100644 --- a/drivers/staging/media/omap4iss/iss_resizer.c +++ b/drivers/staging/media/omap4iss/iss_resizer.c @@ -817,8 +817,6 @@ static int resizer_init_entities(struct iss_resizer_device *resizer) void omap4iss_resizer_unregister_entities(struct iss_resizer_device *resizer) { - media_entity_cleanup(&resizer->subdev.entity); - v4l2_device_unregister_subdev(&resizer->subdev); omap4iss_video_unregister(&resizer->video_out); } @@ -872,5 +870,7 @@ int omap4iss_resizer_init(struct iss_device *iss) */ void omap4iss_resizer_cleanup(struct iss_device *iss) { - /* FIXME: are you sure there's nothing to do? */ + struct iss_resizer_device *resizer = &iss->resizer; + + media_entity_cleanup(&resizer->subdev.entity); } -- 2.0.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/6] omap4iss: Add RGB2RGB blending matrix support
Hello, This patch set adds support for exposing the OMAP4 ISS IPIPE RGB2RGB blending matrix through V4L2 controls, using the compound controls support. Patches 1 to 4 add new signed compound control types and simplify the control type init operation. Patches 5 then fixes an issue with the omap4iss driver, and patch 6 finally adds RGB2RGB blending matrix support. Please see individual patches for changes since v1. Laurent Pinchart (6): v4l2-ctrls: Add new S8, S16 and S32 compound control types v4l2-ctrls: Don't initialize array tail when setting a control v4l2-ctrls: Make the control type init op initialize the whole control v4l2-ctrls: Export the standard control type operations staging: media: omap4iss: Cleanup media entities after unregistration staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 21 .../DocBook/media/v4l/vidioc-queryctrl.xml | 30 + drivers/media/v4l2-core/v4l2-ctrls.c | 103 drivers/staging/media/omap4iss/iss_ipipe.c | 135 - drivers/staging/media/omap4iss/iss_ipipe.h | 17 +++ drivers/staging/media/omap4iss/iss_ipipeif.c | 6 +- drivers/staging/media/omap4iss/iss_resizer.c | 6 +- include/media/v4l2-ctrls.h | 16 ++- include/uapi/linux/videodev2.h | 6 + 9 files changed, 301 insertions(+), 39 deletions(-) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] dma-buf: cleanup dma_buf_export() to make it easily extensible
On 28 January 2015 at 16:50, Daniel Thompson wrote: > On 28/01/15 06:00, Sumit Semwal wrote: >> +/** >> + * helper macro for exporters; zeros and fills in most common values >> + */ >> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)\ >> + struct dma_buf_export_info a = {0}; \ >> + exp_info.exp_name = KBUILD_MODNAME >> + > > This risks generating C99 warnings unless used with care (and only once > per function). Shouldn't this be more like: > > #define DEFINE_DMA_BUF_EXPORT_INFO(a) \ > struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME } > Ah! My bad; thanks for catching this, Daniel; I'll send out the updated patch in a minute! > Daniel. > -- Thanks and regards, Sumit Semwal Kernel Team Lead - Linaro Mobile Group Linaro.org │ Open source software for ARM SoCs -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] [media] v4l: vsp1: Fix VI6_DPR_ROUTE_FXA_MASK macro
FXA bit of VI6_DPR_mod_ROUTE register starts from 16bit. But VI6_DPR_ROUTE_FXA_MASK is set to become start from 8bit. This fixes shift size for VI6_DPR_ROUTE_FXA_MASK. Signed-off-by: Nobuhiro Iwamatsu --- drivers/media/platform/vsp1/vsp1_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vsp1/vsp1_regs.h b/drivers/media/platform/vsp1/vsp1_regs.h index 4177f98..25b4873 100644 --- a/drivers/media/platform/vsp1/vsp1_regs.h +++ b/drivers/media/platform/vsp1/vsp1_regs.h @@ -304,7 +304,7 @@ #define VI6_DPR_HST_ROUTE 0x2044 #define VI6_DPR_HSI_ROUTE 0x2048 #define VI6_DPR_BRU_ROUTE 0x204c -#define VI6_DPR_ROUTE_FXA_MASK (0xff << 8) +#define VI6_DPR_ROUTE_FXA_MASK (0xff << 16) #define VI6_DPR_ROUTE_FXA_SHIFT16 #define VI6_DPR_ROUTE_FP_MASK (0x3f << 8) #define VI6_DPR_ROUTE_FP_SHIFT 8 -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] [media] v4l: vsp1: Fix VI6_DPR_ROUTE_FP_MASK macro
FP bit of VI6_DPR_mod_ROUTE register is 6bit. But VI6_DPR_ROUTE_FP_MASK is set to 0xFF, this will mask until the reserve bit. This fixes size for VI6_DPR_ROUTE_FP_MASK. Signed-off-by: Nobuhiro Iwamatsu --- drivers/media/platform/vsp1/vsp1_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vsp1/vsp1_regs.h b/drivers/media/platform/vsp1/vsp1_regs.h index f61e109..4177f98 100644 --- a/drivers/media/platform/vsp1/vsp1_regs.h +++ b/drivers/media/platform/vsp1/vsp1_regs.h @@ -306,7 +306,7 @@ #define VI6_DPR_BRU_ROUTE 0x204c #define VI6_DPR_ROUTE_FXA_MASK (0xff << 8) #define VI6_DPR_ROUTE_FXA_SHIFT16 -#define VI6_DPR_ROUTE_FP_MASK (0xff << 8) +#define VI6_DPR_ROUTE_FP_MASK (0x3f << 8) #define VI6_DPR_ROUTE_FP_SHIFT 8 #define VI6_DPR_ROUTE_RT_MASK (0x3f << 0) #define VI6_DPR_ROUTE_RT_SHIFT 0 -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] [media] v4l: vsp1: Fix VI6_WPF_SZCLIP_SIZE_MASK macro
Clipping size bit of VI6_WPFn _HSZCLIP and VI6_WPFn _VSZCLIP register are from 0 bit to 11 bit. But VI6_WPF_SZCLIP_SIZE_MASK is set to 0x1FFF, this will mask until the reserve bits. This fixes size for VI6_WPF_SZCLIP_SIZE_MASK. Signed-off-by: Nobuhiro Iwamatsu --- drivers/media/platform/vsp1/vsp1_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vsp1/vsp1_regs.h b/drivers/media/platform/vsp1/vsp1_regs.h index da3c573..f61e109 100644 --- a/drivers/media/platform/vsp1/vsp1_regs.h +++ b/drivers/media/platform/vsp1/vsp1_regs.h @@ -238,7 +238,7 @@ #define VI6_WPF_SZCLIP_EN (1 << 28) #define VI6_WPF_SZCLIP_OFST_MASK (0xff << 16) #define VI6_WPF_SZCLIP_OFST_SHIFT 16 -#define VI6_WPF_SZCLIP_SIZE_MASK (0x1fff << 0) +#define VI6_WPF_SZCLIP_SIZE_MASK (0xfff << 0) #define VI6_WPF_SZCLIP_SIZE_SHIFT 0 #define VI6_WPF_OUTFMT 0x100c -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/7] [media] marvell-ccic: MMP_CAMERA never worked
On Wed, 28 Jan 2015 22:17:46 +0100 Arnd Bergmann wrote: > The mmp ccic driver uses a platform_data structure that has never > existed in an upstream kernel and always fails to build: This driver most assuredly did work on XO 1.75 machines, and the platform_data structure does exist; it's the stuff added by Libin afterward that apparently broke things. Strange that it only came out now, though, nearly two years later. Libin, any thoughts on this? Meanwhile, it is clearly broken, and I don't have an immediate fix, so, Acked-by: Jonathan Corbet (Though I would like a different patch subject, since the current one is wrong). I think the right thing to do, alas, might be to back out all of Libin's changes. They clearly are not being used by anybody and do not seem to be getting any further development attention. It would like to keep this driver working for XO systems for a while yet...but I won't get to it right away. Thanks, jon -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH] media: fix au0828_analog_register() to not free au0828_dev
On 12/20/2014 08:24 PM, Shuah Khan wrote: > au0828_analog_register() frees au0828_dev when it fails to > locate isoc endpoint. au0828_usb_probe() continues with dvb > and rc probe and registration assuming dev is still valid. > When au0828_analog_register() fails to locate isoc endpoint, > it should return without free'ing au0828_dev. Otherwise, the > probe will fail as dev is null when au0828_dvb_register() is > called. > > Signed-off-by: Shuah Khan > --- > > Resending as the first one had malformed changelog > > drivers/media/usb/au0828/au0828-video.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/media/usb/au0828/au0828-video.c > b/drivers/media/usb/au0828/au0828-video.c > index 3bdf132..94b65b8 100644 > --- a/drivers/media/usb/au0828/au0828-video.c > +++ b/drivers/media/usb/au0828/au0828-video.c > @@ -1713,7 +1713,6 @@ int au0828_analog_register(struct au0828_dev *dev, > } > if (!(dev->isoc_in_endpointaddr)) { > pr_info("Could not locate isoc endpoint\n"); > - kfree(dev); > return -ENODEV; > } > > Just checking if this patch was lost in holiday fog :) thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFCv3 1/2] device: add dma_params->max_segment_count
Hello, On 2015-01-27 09:25, Sumit Semwal wrote: From: Rob Clark For devices which have constraints about maximum number of segments in an sglist. For example, a device which could only deal with contiguous buffers would set max_segment_count to 1. The initial motivation is for devices sharing buffers via dma-buf, to allow the buffer exporter to know the constraints of other devices which have attached to the buffer. The dma_mask and fields in 'struct device_dma_parameters' tell the exporter everything else that is needed, except whether the importer has constraints about maximum number of segments. Signed-off-by: Rob Clark [sumits: Minor updates wrt comments] Signed-off-by: Sumit Semwal This feature is definitely needed to start thinking of real buffer sharing between devices. Acked-by: Marek Szyprowski --- v3: include Robin Murphy's fix[1] for handling '0' as a value for max_segment_count v2: minor updates wrt comments on the first version [1]: http://article.gmane.org/gmane.linux.kernel.iommu/8175/ include/linux/device.h | 1 + include/linux/dma-mapping.h | 19 +++ 2 files changed, 20 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index fb506738f7b7..a32f9b67315c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -647,6 +647,7 @@ struct device_dma_parameters { * sg limitations. */ unsigned int max_segment_size; + unsigned int max_segment_count;/* INT_MAX for unlimited */ unsigned long segment_boundary_mask; }; diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index c3007cb4bfa6..d3351a36d5ec 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -154,6 +154,25 @@ static inline unsigned int dma_set_max_seg_size(struct device *dev, return -EIO; } +#define DMA_SEGMENTS_MAX_SEG_COUNT ((unsigned int) INT_MAX) + +static inline unsigned int dma_get_max_seg_count(struct device *dev) +{ + if (dev->dma_parms && dev->dma_parms->max_segment_count) + return dev->dma_parms->max_segment_count; + return DMA_SEGMENTS_MAX_SEG_COUNT; +} + +static inline int dma_set_max_seg_count(struct device *dev, + unsigned int count) +{ + if (dev->dma_parms) { + dev->dma_parms->max_segment_count = count; + return 0; + } + return -EIO; +} + static inline unsigned long dma_get_seg_boundary(struct device *dev) { return dev->dma_parms ? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4] [media] Add LVDS RGB media bus formats
This patch adds three new RGB media bus formats that describe 18-bit or 24-bit samples transferred over an LVDS bus with three or four differential data pairs, serialized into 7 time slots, using standard SPWG/PSWG/VESA or JEIDA data ordering. Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus --- This patch depends on Boris' "Add RGB444_1X12 and RGB565_1X16 media bus formats" patch due to the numbering changes: https://lkml.org/lkml/2015/1/6/203 Changes since v3: - Added Sakari's ack --- Documentation/DocBook/media/v4l/subdev-formats.xml | 255 + include/uapi/linux/media-bus-format.h | 5 +- 2 files changed, 259 insertions(+), 1 deletion(-) diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index be57efa..a88f72b 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml @@ -622,6 +622,261 @@ see . + + On LVDS buses, usually each sample is transferred serialized in + seven time slots per pixel clock, on three (18-bit) or four (24-bit) + differential data pairs at the same time. The remaining bits are used for + control signals as defined by SPWG/PSWG/VESA or JEIDA standards. + The 24-bit RGB format serialized in seven time slots on four lanes using + JEIDA defined bit mapping will be named + MEDIA_BUS_FMT_RGB888_1X7X3_JEIDA, for example. + + + + LVDS RGB formats + + + + + + + + + + + + + Identifier + Code + + + Data organization + + + + + Timeslot + Lane + 3 + 2 + 1 + 0 + + + + + MEDIA_BUS_FMT_RGB666_1X7X3_SPWG + 0x1010 + 0 + + - + d + b1 + g0 + + + + + 1 + + - + d + b0 + r5 + + + + + 2 + + - + d + g5 + r4 + + + + + 3 + + - + b5 + g4 + r3 + + + + + 4 + + - + b4 + g3 + r2 + + + + + 5 + + - + b3 + g2 + r1 + + + + + 6 + + - + b2 + g1 + r0 + + + MEDIA_BUS_FMT_RGB888_1X7X4_SPWG + 0x1011 + 0 + + d + d + b1 + g0 + + + + + 1 + + b7 + d + b0 + r5 + + + + + 2 + + b6 + d + g5 + r4 + + + + + 3 + + g7 + b5 + g4 + r3 + + + + + 4 + + g6 + b4 + g3 + r2 + + + + + 5 + + r7 + b3 + g2 + r1 + + + + + 6 + + r6 + b2 + g1 + r0 + + + MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA + 0x1012 + 0 + + d + d + b3 + g2 + + + + + 1 + + b1 + d + b2 + r7 + + + + + 2 + + b0 + d + g7 + r6 + + + + + 3 + + g1 + b7 + g6 + r5 + + + + + 4 + + g0 + b6 + g5 +
[PATCH 2/3] dvb_net: Use standard debugging facilities
Convert dprintk to netdev_dbg where appropriate. Remove dvb_net_debug module_param. Remove __func__ from output as that can be added by dynamic_debug. Signed-off-by: Joe Perches --- drivers/media/dvb-core/dvb_net.c | 57 +--- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c index ff79b0b..0b0f97a 100644 --- a/drivers/media/dvb-core/dvb_net.c +++ b/drivers/media/dvb-core/dvb_net.c @@ -68,13 +68,6 @@ #include "dvb_demux.h" #include "dvb_net.h" -static int dvb_net_debug; -module_param(dvb_net_debug, int, 0444); -MODULE_PARM_DESC(dvb_net_debug, "enable debug messages"); - -#define dprintk(x...) do { if (dvb_net_debug) printk(x); } while (0) - - static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt ) { unsigned int j; @@ -312,9 +305,9 @@ static int handle_ule_extensions( struct dvb_net_priv *p ) return l; /* Stop extension header processing and discard SNDU. */ total_ext_len += l; #ifdef ULE_DEBUG - dprintk("handle_ule_extensions: ule_next_hdr=%p, ule_sndu_type=%i, " - "l=%i, total_ext_len=%i\n", p->ule_next_hdr, - (int) p->ule_sndu_type, l, total_ext_len); + pr_debug("ule_next_hdr=%p, ule_sndu_type=%i, l=%i, total_ext_len=%i\n", +p->ule_next_hdr, (int)p->ule_sndu_type, +l, total_ext_len); #endif } while (p->ule_sndu_type < ETH_P_802_3_MIN); @@ -697,8 +690,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) if (drop) { #ifdef ULE_DEBUG - dprintk("Dropping SNDU: MAC destination address does not match: dest addr: %pM, dev addr: %pM\n", - priv->ule_skb->data, dev->dev_addr); + netdev_dbg(dev, "Dropping SNDU: MAC destination address does not match: dest addr: %pM, dev addr: %pM\n", + priv->ule_skb->data, dev->dev_addr); #endif dev_kfree_skb(priv->ule_skb); goto sndu_done; @@ -961,8 +954,7 @@ static int dvb_net_filter_sec_set(struct net_device *dev, (*secfilter)->filter_mask[10] = mac_mask[1]; (*secfilter)->filter_mask[11]=mac_mask[0]; - dprintk("%s: filter mac=%pM\n", dev->name, mac); - dprintk("%s: filter mask=%pM\n", dev->name, mac_mask); + netdev_dbg(dev, "filter mac=%pM mask=%pM\n", mac, mac_mask); return 0; } @@ -974,7 +966,7 @@ static int dvb_net_feed_start(struct net_device *dev) struct dmx_demux *demux = priv->demux; unsigned char *mac = (unsigned char *) dev->dev_addr; - dprintk("%s: rx_mode %i\n", __func__, priv->rx_mode); + netdev_dbg(dev, "rx_mode %i\n", priv->rx_mode); mutex_lock(&priv->mutex); if (priv->tsfeed || priv->secfeed || priv->secfilter || priv->multi_secfilter[0]) printk("%s: BUG %d\n", __func__, __LINE__); @@ -984,7 +976,7 @@ static int dvb_net_feed_start(struct net_device *dev) priv->tsfeed = NULL; if (priv->feedtype == DVB_NET_FEEDTYPE_MPE) { - dprintk("%s: alloc secfeed\n", __func__); + netdev_dbg(dev, "alloc secfeed\n"); ret=demux->allocate_section_feed(demux, &priv->secfeed, dvb_net_sec_callback); if (ret<0) { @@ -1002,38 +994,38 @@ static int dvb_net_feed_start(struct net_device *dev) } if (priv->rx_mode != RX_MODE_PROMISC) { - dprintk("%s: set secfilter\n", __func__); + netdev_dbg(dev, "set secfilter\n"); dvb_net_filter_sec_set(dev, &priv->secfilter, mac, mask_normal); } switch (priv->rx_mode) { case RX_MODE_MULTI: for (i = 0; i < priv->multi_num; i++) { - dprintk("%s: set multi_secfilter[%d]\n", __func__, i); + netdev_dbg(dev, "set multi_secfilter[%d]\n", i); dvb_net_filter_sec_set(dev, &priv->multi_secfilter[i], priv->multi_macs[i], mask_normal); } break; case RX_MODE_ALL_MULTI: priv->multi_num=1; - dprintk("%s: set multi_secfilter[0]\n", __func__); + netdev_dbg(dev, "set multi_secfilter[0]\n"); dvb_net_filter_sec_set(dev, &priv->multi_secfilter[0],
[PATCH 3/3] dvb_net: Convert local hex dump to print_hex_dump_debug
Use the generic facility instead of a home-grown one. Signed-off-by: Joe Perches --- drivers/media/dvb-core/dvb_net.c | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c index 0b0f97a..686d327 100644 --- a/drivers/media/dvb-core/dvb_net.c +++ b/drivers/media/dvb-core/dvb_net.c @@ -83,33 +83,9 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt ) #ifdef ULE_DEBUG -#define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) - -static void hexdump( const unsigned char *buf, unsigned short len ) +static void hexdump(const unsigned char *buf, unsigned short len) { - char str[80], octet[10]; - int ofs, i, l; - - for (ofs = 0; ofs < len; ofs += 16) { - sprintf( str, "%03d: ", ofs ); - - for (i = 0; i < 16; i++) { - if ((i + ofs) < len) - sprintf( octet, "%02x ", buf[ofs + i] ); - else - strcpy( octet, " " ); - - strcat( str, octet ); - } - strcat( str, " " ); - l = strlen( str ); - - for (i = 0; (i < 16) && ((i + ofs) < len); i++) - str[l++] = isprint( buf[ofs + i] ) ? buf[ofs + i] : '.'; - - str[l] = '\0'; - printk( KERN_WARNING "%s\n", str ); - } + print_hex_dump_debug("", DUMP_PREFIX_OFFSET, 16, 1, buf, len, true); } #endif -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] dvb_net: Use vsprintf %pM extension to print Ethernet addresses
No need for more macros, so remove them and use the kernel extension. Signed-off-by: Joe Perches --- drivers/media/dvb-core/dvb_net.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c index e4041f0..ff79b0b 100644 --- a/drivers/media/dvb-core/dvb_net.c +++ b/drivers/media/dvb-core/dvb_net.c @@ -90,9 +90,6 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt ) #ifdef ULE_DEBUG -#define MAC_ADDR_PRINTFMT "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" -#define MAX_ADDR_PRINTFMT_ARGS(macap) (macap)[0],(macap)[1],(macap)[2],(macap)[3],(macap)[4],(macap)[5] - #define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) static void hexdump( const unsigned char *buf, unsigned short len ) @@ -700,8 +697,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) if (drop) { #ifdef ULE_DEBUG - dprintk("Dropping SNDU: MAC destination address does not match: dest addr: "MAC_ADDR_PRINTFMT", dev addr: "MAC_ADDR_PRINTFMT"\n", - MAX_ADDR_PRINTFMT_ARGS(priv->ule_skb->data), MAX_ADDR_PRINTFMT_ARGS(dev->dev_addr)); + dprintk("Dropping SNDU: MAC destination address does not match: dest addr: %pM, dev addr: %pM\n", + priv->ule_skb->data, dev->dev_addr); #endif dev_kfree_skb(priv->ule_skb); goto sndu_done; -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] dvb-usb: fix spaces after commas
Signed-off-by: Luis de Bethencourt --- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c index 719413b..c901d15 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c @@ -84,14 +84,14 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) static int dvb_usb_start_feed(struct dvb_demux_feed *dvbdmxfeed) { - deb_ts("start pid: 0x%04x, feedtype: %d\n", dvbdmxfeed->pid,dvbdmxfeed->type); - return dvb_usb_ctrl_feed(dvbdmxfeed,1); + deb_ts("start pid: 0x%04x, feedtype: %d\n", dvbdmxfeed->pid, dvbdmxfeed->type); + return dvb_usb_ctrl_feed(dvbdmxfeed, 1); } static int dvb_usb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) { deb_ts("stop pid: 0x%04x, feedtype: %d\n", dvbdmxfeed->pid, dvbdmxfeed->type); - return dvb_usb_ctrl_feed(dvbdmxfeed,0); + return dvb_usb_ctrl_feed(dvbdmxfeed, 0); } int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) @@ -108,8 +108,8 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) adap->dvb_adap.priv = adap; if (adap->dev->props.read_mac_address) { - if (adap->dev->props.read_mac_address(adap->dev,adap->dvb_adap.proposed_mac) == 0) - info("MAC address: %pM",adap->dvb_adap.proposed_mac); + if (adap->dev->props.read_mac_address(adap->dev, adap->dvb_adap.proposed_mac) == 0) + info("MAC address: %pM", adap->dvb_adap.proposed_mac); else err("MAC address reading failed."); } @@ -128,7 +128,7 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) adap->demux.stop_feed= dvb_usb_stop_feed; adap->demux.write_to_decoder = NULL; if ((ret = dvb_dmx_init(&adap->demux)) < 0) { - err("dvb_dmx_init failed: error %d",ret); + err("dvb_dmx_init failed: error %d", ret); goto err_dmx; } @@ -136,13 +136,13 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) adap->dmxdev.demux = &adap->demux.dmx; adap->dmxdev.capabilities= 0; if ((ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap)) < 0) { - err("dvb_dmxdev_init failed: error %d",ret); + err("dvb_dmxdev_init failed: error %d", ret); goto err_dmx_dev; } if ((ret = dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx)) < 0) { - err("dvb_net_init failed: error %d",ret); + err("dvb_net_init failed: error %d", ret); goto err_net_init; } -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/3] dvb_net: general cleaning
Use more common kernel mechanisms Joe Perches (3): dvb_net: Use vsprintf %pM extension to print Ethernet addresses dvb_net: Use standard debugging facilities dvb_net: Convert local hex dump to print_hex_dump_debug drivers/media/dvb-core/dvb_net.c | 88 1 file changed, 26 insertions(+), 62 deletions(-) -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 3/6] v4l2-ctrls: Make the control type init op initialize the whole control
On 01/28/15 10:17, Laurent Pinchart wrote: > The control type init operation is called in a loop to initialize all > elements of a control. Not only is this inefficient for control types > that could use a memset(), it also complicates the implementation of > custom control types, for instance when a matrix needs to be initialized > with different values for its elements. > > Make the init operation initialize the whole control instead, and use > memset() when possible. > > Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Thanks! Hans > --- > drivers/media/v4l2-core/v4l2-ctrls.c | 46 > ++-- > include/media/v4l2-ctrls.h | 3 +-- > 2 files changed, 34 insertions(+), 15 deletions(-) > > Changes since v1: > > - Remove support for V4L2_CTRL_TYPE_U8 and V4L2_CTRL_TYPE_S8 from > std_init_one(), as those cases are now handled by std_init() > > diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c > b/drivers/media/v4l2-core/v4l2-ctrls.c > index adac93e..81b8e66 100644 > --- a/drivers/media/v4l2-core/v4l2-ctrls.c > +++ b/drivers/media/v4l2-core/v4l2-ctrls.c > @@ -1263,8 +1263,8 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, u32 > idx, > } > } > > -static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, > - union v4l2_ctrl_ptr ptr) > +static void std_init_one(const struct v4l2_ctrl *ctrl, u32 idx, > + union v4l2_ctrl_ptr ptr) > { > switch (ctrl->type) { > case V4L2_CTRL_TYPE_STRING: > @@ -1282,10 +1282,6 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 > idx, > case V4L2_CTRL_TYPE_BOOLEAN: > ptr.p_s32[idx] = ctrl->default_value; > break; > - case V4L2_CTRL_TYPE_U8: > - case V4L2_CTRL_TYPE_S8: > - ptr.p_u8[idx] = ctrl->default_value; > - break; > case V4L2_CTRL_TYPE_U16: > case V4L2_CTRL_TYPE_S16: > ptr.p_u16[idx] = ctrl->default_value; > @@ -1295,8 +1291,35 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 > idx, > ptr.p_u32[idx] = ctrl->default_value; > break; > default: > - idx *= ctrl->elem_size; > - memset(ptr.p + idx, 0, ctrl->elem_size); > + break; > + } > +} > + > +static void std_init(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr) > +{ > + u32 idx; > + > + switch (ctrl->type) { > + case V4L2_CTRL_TYPE_STRING: > + case V4L2_CTRL_TYPE_INTEGER64: > + case V4L2_CTRL_TYPE_INTEGER: > + case V4L2_CTRL_TYPE_INTEGER_MENU: > + case V4L2_CTRL_TYPE_MENU: > + case V4L2_CTRL_TYPE_BITMASK: > + case V4L2_CTRL_TYPE_BOOLEAN: > + case V4L2_CTRL_TYPE_U16: > + case V4L2_CTRL_TYPE_S16: > + case V4L2_CTRL_TYPE_U32: > + case V4L2_CTRL_TYPE_S32: > + for (idx = 0; idx < ctrl->elems; idx++) > + std_init_one(ctrl, idx, ptr); > + break; > + case V4L2_CTRL_TYPE_U8: > + case V4L2_CTRL_TYPE_S8: > + memset(ptr.p_u8, ctrl->default_value, ctrl->elems); > + break; > + default: > + memset(ptr.p, 0, ctrl->elems * ctrl->elem_size); > break; > } > } > @@ -1929,7 +1952,6 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct > v4l2_ctrl_handler *hdl, > unsigned elems = 1; > bool is_array; > unsigned tot_ctrl_size; > - unsigned idx; > void *data; > int err; > > @@ -2049,10 +2071,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct > v4l2_ctrl_handler *hdl, > ctrl->p_new.p = &ctrl->val; > ctrl->p_cur.p = &ctrl->cur.val; > } > - for (idx = 0; idx < elems; idx++) { > - ctrl->type_ops->init(ctrl, idx, ctrl->p_cur); > - ctrl->type_ops->init(ctrl, idx, ctrl->p_new); > - } > + ctrl->type_ops->init(ctrl, ctrl->p_cur); > + ctrl->type_ops->init(ctrl, ctrl->p_new); > > if (handler_new_ref(hdl, ctrl)) { > kfree(ctrl); > diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h > index e1cfb8f..a7280e9 100644 > --- a/include/media/v4l2-ctrls.h > +++ b/include/media/v4l2-ctrls.h > @@ -87,8 +87,7 @@ struct v4l2_ctrl_type_ops { > bool (*equal)(const struct v4l2_ctrl *ctrl, u32 idx, > union v4l2_ctrl_ptr ptr1, > union v4l2_ctrl_ptr ptr2); > - void (*init)(const struct v4l2_ctrl *ctrl, u32 idx, > - union v4l2_ctrl_ptr ptr); > + void (*init)(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr); > void (*log)(const struct v4l2_ctrl *ctrl); > int (*validate)(const struct v4l2_ctrl *ctrl, u32 idx, > union v4l2_ctrl_ptr ptr); > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] media: v4l2-image-sizes.h: add SVGA, XGA and UXGA size definitions
Hi Josh, On Wed, 28 Jan 2015, Josh Wu wrote: > Hi, Guennadi > > On 11/28/2014 4:13 AM, Guennadi Liakhovetski wrote: > > Hi Josh, > > > > On Thu, 27 Nov 2014, Josh Wu wrote: > > > > > Hi, Guennadi > > > > > > On 11/26/2014 6:23 AM, Guennadi Liakhovetski wrote: > > > > Hi Josh, > > > > > > > > On Tue, 25 Nov 2014, Josh Wu wrote: > > > > > > > > > Add SVGA, UXGA and XGA size definitions to v4l2-image-sizes.h. > > > > > The definitions are sorted by alphabet order. > > > > > > > > > > Signed-off-by: Josh Wu > > > > Thanks for your patches. I'm ok with these two, but the second of them > > > > depends on the first one, and the first one wouldn't (normally) be going > > > > via the soc-camera tree. Mauro, how would you prefer to handle this? > > > > Should I pick up and push to you both of them or postpone #2 until the > > > > next merge window? > > > The first patch is already merged in the media_tree. If the soc-camera > > > tree > > > will be merged to the media_tree, then there should have no dependency > > > issue. > > > Am I understanding correct? > > Yes, then it should be ok! > > Just checking the status of this patch. I don't found this patch in media's > tree or soc_camera's tree. > Could you take this patch in your tree? uhm, yes, sorry, I'll try to make sure not to miss it with my next pull request. Thanks for a reminder! Regards Guennadi > Best Regards, > Josh Wu > > > > > Thanks > > Guennadi > > > > > Best Regards, > > > Josh Wu > > > > > > > Thanks > > > > Guennadi > > > > > > > > > --- > > > > >include/media/v4l2-image-sizes.h | 9 + > > > > >1 file changed, 9 insertions(+) > > > > > > > > > > diff --git a/include/media/v4l2-image-sizes.h > > > > > b/include/media/v4l2-image-sizes.h > > > > > index 10daf92..c70c917 100644 > > > > > --- a/include/media/v4l2-image-sizes.h > > > > > +++ b/include/media/v4l2-image-sizes.h > > > > > @@ -25,10 +25,19 @@ > > > > >#define QVGA_WIDTH 320 > > > > >#define QVGA_HEIGHT240 > > > > >+#define SVGA_WIDTH800 > > > > > +#define SVGA_HEIGHT 680 > > > > > + > > > > >#define SXGA_WIDTH 1280 > > > > >#define SXGA_HEIGHT1024 > > > > > #define VGA_WIDTH640 > > > > >#define VGA_HEIGHT 480 > > > > >+#define UXGA_WIDTH1600 > > > > > +#define UXGA_HEIGHT 1200 > > > > > + > > > > > +#define XGA_WIDTH1024 > > > > > +#define XGA_HEIGHT 768 > > > > > + > > > > >#endif /* _IMAGE_SIZES_H */ > > > > > -- > > > > > 1.9.1 > > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media: gspca_vc032x - wrong bytesperline
Hi, On 26-01-15 11:38, Luca Bonissi wrote: Hi! I found a problem on vc032x gspca usb webcam subdriver: "bytesperline" property is wrong for YUYV and YVYU formats. With recent v4l-utils library (>=0.9.1), that uses "bytesperline" for pixel format conversion, the result is a wrong jerky image. Patch tested on my laptop (USB webcam Logitech Orbicam 046d:0892). Thanks, I've added this patch to my gspca tree, and send a pull-req to Mauro to get it added to 3.20 . Regards, Hans --- drivers/media/usb/gspca/vc032x.c.orig 2014-08-04 00:25:02.0 +0200 +++ drivers/media/usb/gspca/vc032x.c2015-01-12 00:28:39.423311693 +0100 @@ -68,12 +68,12 @@ static const struct v4l2_pix_format vc0321_mode[] = { {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, - .bytesperline = 320, + .bytesperline = 320 * 2, .sizeimage = 320 * 240 * 2, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 1}, {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, - .bytesperline = 640, + .bytesperline = 640 * 2, .sizeimage = 640 * 480 * 2, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 0}, @@ -97,12 +97,12 @@ }; static const struct v4l2_pix_format bi_mode[] = { {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, - .bytesperline = 320, + .bytesperline = 320 * 2, .sizeimage = 320 * 240 * 2, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 2}, {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, - .bytesperline = 640, + .bytesperline = 640 * 2, .sizeimage = 640 * 480 * 2, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 1}, -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 6/6] staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix
On 01/28/15 10:17, Laurent Pinchart wrote: > Expose the module as two controls, one for the 3x3 multiplier matrix and > one for the 3x1 offset vector. > > Signed-off-by: Laurent Pinchart > --- > drivers/staging/media/omap4iss/iss_ipipe.c | 129 > - > drivers/staging/media/omap4iss/iss_ipipe.h | 17 > 2 files changed, 144 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c > b/drivers/staging/media/omap4iss/iss_ipipe.c > index 73b165e..624c5d2 100644 > --- a/drivers/staging/media/omap4iss/iss_ipipe.c > +++ b/drivers/staging/media/omap4iss/iss_ipipe.c > @@ -119,6 +119,105 @@ static void ipipe_configure(struct iss_ipipe_device > *ipipe) > } > > /* > - > + * V4L2 controls > + */ > + > +#define OMAP4ISS_IPIPE_CID_BASE (V4L2_CID_USER_BASE | > 0xf000) Private control ranges should be reserved in uapi/linux/v4l2-controls.h. See e.g. V4L2_CID_USER_SAA7134_BASE. > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_MULT > (OMAP4ISS_IPIPE_CID_BASE + 0) > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET(OMAP4ISS_IPIPE_CID_BASE + 1) Can you give some information how the values are interpreted? That should be documented anyway, but I would like to see how this compares to the adv drivers. This is something that we might want to make available as standard controls. I will have to think about that a bit more. Regards, Hans > + > +/* > + * ipipe_s_ctrl - Handle set control subdev method > + * @ctrl: pointer to v4l2 control structure > + */ > +static int ipipe_s_ctrl(struct v4l2_ctrl *ctrl) > +{ > + struct iss_ipipe_device *ipipe = > + container_of(ctrl->handler, struct iss_ipipe_device, ctrls); > + struct iss_device *iss = to_iss_device(ipipe); > + unsigned int i; > + > + mutex_lock(&ipipe->lock); > + > + if (ipipe->state == ISS_PIPELINE_STREAM_STOPPED) > + goto done; > + > + switch (ctrl->id) { > + case OMAP4ISS_IPIPE_CID_RGB2RGB_MULT: > + case OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET: > + ctrl = ipipe->rgb2rgb_mult; > + for (i = 0; i < ctrl->elems; ++i) > + iss_reg_write(iss, OMAP4_ISS_MEM_ISP_IPIPE, > + IPIPE_RGB1_MUL_RR + 4 * i, > + ctrl->p_new.p_s16[i]); > + > + ctrl = ipipe->rgb2rgb_offset; > + for (i = 0; i < ctrl->elems; ++i) > + iss_reg_write(iss, OMAP4_ISS_MEM_ISP_IPIPE, > + IPIPE_RGB1_OFT_OR + 4 * i, > + ctrl->p_new.p_s16[i]); > + break; > + } > + > +done: > + mutex_unlock(&ipipe->lock); > + return 0; > +} > + > +static const struct v4l2_ctrl_ops ipipe_ctrl_ops = { > + .s_ctrl = ipipe_s_ctrl, > +}; > + > +static void ipipe_ctrl_type_init(const struct v4l2_ctrl *ctrl, > + union v4l2_ctrl_ptr ptr) > +{ > + unsigned int i; > + > + switch (ctrl->id) { > + case OMAP4ISS_IPIPE_CID_RGB2RGB_MULT: > + /* > + * Initialize the diagonal to 1.0 and all other elements to > + * 0.0. > + */ > + for (i = 0; i < ctrl->elems; ++i) > + ptr.p_s16[i] = (i % 4) ? 0 : 256; > + break; > + } > +} > + > +static const struct v4l2_ctrl_type_ops ipipe_ctrl_type_ops = { > + .equal = v4l2_ctrl_type_std_equal, > + .init = ipipe_ctrl_type_init, > + .log = v4l2_ctrl_type_std_log, > + .validate = v4l2_ctrl_type_std_validate, > +}; > + > +static const struct v4l2_ctrl_config ipipe_ctrls[] = { > + { > + .ops = &ipipe_ctrl_ops, > + .type_ops = &ipipe_ctrl_type_ops, > + .id = OMAP4ISS_IPIPE_CID_RGB2RGB_MULT, > + .name = "RGB2RGB Multiplier", > + .type = V4L2_CTRL_TYPE_S16, > + .def = 0, > + .min = -2048, > + .max = 2047, > + .step = 1, > + .dims = { 3, 3 }, > + }, { > + .ops = &ipipe_ctrl_ops, > + .id = OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET, > + .name = "RGB2RGB Offset", > + .type = V4L2_CTRL_TYPE_S16, > + .def = 0, > + .min = -4096, > + .max = 4095, > + .step = 1, > + .dims = { 3 }, > + }, > +}; > + > +/* > - > * V4L2 subdev operations > */ > > @@ -133,9 +232,11 @@ static int ipipe_set_stream(struct v4l2_subdev *sd, int > enable) > struct iss_device *iss = to_iss_device(ipipe); > int ret = 0; > > + mutex_lock(&ipipe->lock); > + > if (ipipe->state == ISS_PIPELINE_STREAM_STOPPED) { > if (enable == ISS_PIPELINE_STREAM_STOPPED) > - return 0; > +
Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible
Hi Mauro, On 28 January 2015 at 18:53, Mauro Carvalho Chehab wrote: > Em Wed, 28 Jan 2015 18:24:03 +0530 > Sumit Semwal escreveu: > >> +/** >> + * helper macro for exporters; zeros and fills in most common values >> + */ >> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)\ >> + struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME } >> + > > I suspect that this will let the other fields not initialized. > > You likely need to do: > > #define DEFINE_DMA_BUF_EXPORT_INFO(a) \ > struct dma_buf_export_info a = {\ > .exp_name = KBUILD_MODNAME; \ > .fields = 0;\ > ... > } I suspected the same, but Daniel kindly referred to the C99 standard, which states: " If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration." So I think we're well covered there? > > Regards, > Mauro -- Thanks and regards, Sumit Semwal Kernel Team Lead - Linaro Mobile Group Linaro.org │ Open source software for ARM SoCs -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/6] v4l2-ctrls: Add new S8, S16 and S32 compound control types
On 01/28/15 10:17, Laurent Pinchart wrote: > Only unsigned compound types are implemented so far, add the > corresponding signes types. Nitpick: signes -> signed Regards, Hans > > Signed-off-by: Laurent Pinchart > Acked-by: Hans Verkuil -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH/RFC v10 04/19] dt-binding: mfd: max77693: Add DT binding related macros
Hi Jacek, On Tue, Jan 20, 2015 at 01:53:05PM +0100, Jacek Anaszewski wrote: > On 01/20/2015 12:12 PM, Lee Jones wrote: > >On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > > > >>Add macros for max77693 led part related binding. > >> > >>Signed-off-by: Jacek Anaszewski > >>Acked-by: Kyungmin Park > >>Cc: Lee Jones > >>Cc: Chanwoo Choi > >>--- > >> include/dt-bindings/mfd/max77693.h | 21 + > >> 1 file changed, 21 insertions(+) > >> create mode 100644 include/dt-bindings/mfd/max77693.h > >> > >>diff --git a/include/dt-bindings/mfd/max77693.h > >>b/include/dt-bindings/mfd/max77693.h > >>new file mode 100644 > >>index 000..f53e197 > >>--- /dev/null > >>+++ b/include/dt-bindings/mfd/max77693.h > >>@@ -0,0 +1,21 @@ > >>+/* > >>+ * This header provides macros for MAX77693 device binding > >>+ * > >>+ * Copyright (C) 2014, Samsung Electronics Co., Ltd. > >>+ * > >>+ * Author: Jacek Anaszewski > >>+ */ > >>+ > >>+#ifndef __DT_BINDINGS_MAX77693_H__ > >>+#define __DT_BINDINGS_MAX77693_H > >>+ > >>+/* External trigger type */ > >>+#define MAX77693_LED_TRIG_TYPE_EDGE0 > >>+#define MAX77693_LED_TRIG_TYPE_LEVEL 1 > >>+ > >>+/* Boost modes */ > >>+#define MAX77693_LED_BOOST_OFF 0 > >>+#define MAX77693_LED_BOOST_ADAPTIVE1 > >>+#define MAX77693_LED_BOOST_FIXED 2 > >>+ > >>+#endif /* __DT_BINDINGS_MAX77693_H */ > > > >These look fairly generic. Do generic LED defines already exist? If > >not, can they? > > I am not entirely sure that they are generic. Different devices > may define different trigger types for low current LEDs and flash > LEDs. Boost modes could also have different semantics. > > Regardless of the above we can consider renaming the file to > include/dt-bindings/leds/max77693.h > > Bryan - what is your opinion? At least trigger type can be chosen for lm3555 (as3645a) as well. I'm not sure about boost mode. -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: HW seek and TDA8290
Em Wed, 28 Jan 2015 04:07:44 + Buda Servantes escreveu: > It is possible to have HW seek support in TDA8290 cards as in recent TEA575x? Yes, if tda8290 provides such feature and someone with its datasheet can implement the code and submit us. Regards, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 6/6] staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix
Hi Hans, Thank you for the review. On Wednesday 28 January 2015 11:27:02 Hans Verkuil wrote: > On 01/28/15 10:17, Laurent Pinchart wrote: > > Expose the module as two controls, one for the 3x3 multiplier matrix and > > one for the 3x1 offset vector. > > > > Signed-off-by: Laurent Pinchart > > --- > > > > drivers/staging/media/omap4iss/iss_ipipe.c | 129 +++- > > drivers/staging/media/omap4iss/iss_ipipe.h | 17 > > 2 files changed, 144 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c > > b/drivers/staging/media/omap4iss/iss_ipipe.c index 73b165e..624c5d2 > > 100644 > > --- a/drivers/staging/media/omap4iss/iss_ipipe.c > > +++ b/drivers/staging/media/omap4iss/iss_ipipe.c > > @@ -119,6 +119,105 @@ static void ipipe_configure(struct iss_ipipe_device > > *ipipe)> > > } > > > > /* -- > > + * V4L2 controls > > + */ > > + > > +#define OMAP4ISS_IPIPE_CID_BASE(V4L2_CID_USER_BASE | > > 0xf000) > > Private control ranges should be reserved in uapi/linux/v4l2-controls.h. > > See e.g. V4L2_CID_USER_SAA7134_BASE. My bad, I'll fix that. > > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_MULT > > (OMAP4ISS_IPIPE_CID_BASE + 0) > > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET (OMAP4ISS_IPIPE_CID_BASE + 1) > > Can you give some information how the values are interpreted? That should > be documented anyway, but I would like to see how this compares to the > adv drivers. This is something that we might want to make available as > standard controls. I will have to think about that a bit more. Sure. http://www.ti.com/lit/pdf/swpu235, section 8.3.3.4.6, page 1863. / \ / \ / \ / \ | R_out | | gain_RR gain_GR gain_BR | | R_in | | offset_R | | G_out | = | gain_RG gain_GG gain_BG | x | G_in | + | offset_G | | B_out | | gain_RB gain_GB gain_BB | | B_in | | offset_B | \ / \ / \ / \ / The two controls correspond to the multiplication matrix and offset vector. Coefficients are stored in 16 bits each and expressed as S3.8 (-4 to +3.996) for the gains and S11 (-1024 to 1023) for the offsets. Note that the ISS IPIPE has two RGB to RGB blending matrices as shown on figure 8-132, page 1859. This patch implements support for the first one only. We should probably consider how to expose the second one as well. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] dma-buf: cleanup dma_buf_export() to make it easily extensible
On 28/01/15 06:00, Sumit Semwal wrote: > At present, dma_buf_export() takes a series of parameters, which > makes it difficult to add any new parameters for exporters, if required. > > Make it simpler by moving all these parameters into a struct, and pass > the struct * as parameter to dma_buf_export(). > > While at it, unite dma_buf_export_named() with dma_buf_export(), and > change all callers accordingly. > > Signed-off-by: Sumit Semwal > --- > v2: add macro to zero out local struct, and fill KBUILD_MODNAME by default > > drivers/dma-buf/dma-buf.c | 47 > +- > drivers/gpu/drm/armada/armada_gem.c| 10 -- > drivers/gpu/drm/drm_prime.c| 12 --- > drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 9 +++-- > drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 -- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 9 - > drivers/gpu/drm/tegra/gem.c| 10 -- > drivers/gpu/drm/ttm/ttm_object.c | 9 +++-- > drivers/gpu/drm/udl/udl_dmabuf.c | 9 - > drivers/media/v4l2-core/videobuf2-dma-contig.c | 8 - > drivers/media/v4l2-core/videobuf2-dma-sg.c | 8 - > drivers/media/v4l2-core/videobuf2-vmalloc.c| 8 - > drivers/staging/android/ion/ion.c | 9 +++-- > include/linux/dma-buf.h| 35 +++ > 14 files changed, 143 insertions(+), 50 deletions(-) > > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index 5be225c2ba98..6d3df3dd9310 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -265,7 +265,7 @@ static inline int is_dma_buf_file(struct file *file) > } > > /** > - * dma_buf_export_named - Creates a new dma_buf, and associates an anon file > + * dma_buf_export - Creates a new dma_buf, and associates an anon file > * with this buffer, so it can be exported. > * Also connect the allocator specific data and ops to the buffer. > * Additionally, provide a name string for exporter; useful in debugging. > @@ -277,31 +277,32 @@ static inline int is_dma_buf_file(struct file *file) > * @exp_name:[in]name of the exporting module - useful for > debugging. > * @resv:[in]reservation-object, NULL to allocate default one. > * > + * All the above info comes from struct dma_buf_export_info. > + * > * Returns, on success, a newly created dma_buf object, which wraps the > * supplied private data and operations for dma_buf_ops. On either missing > * ops, or error in allocating struct dma_buf, will return negative error. > * > */ > -struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops > *ops, > - size_t size, int flags, const char *exp_name, > - struct reservation_object *resv) > +struct dma_buf *dma_buf_export(struct dma_buf_export_info *exp_info) > { > struct dma_buf *dmabuf; > struct file *file; > size_t alloc_size = sizeof(struct dma_buf); > - if (!resv) > + if (!exp_info->resv) > alloc_size += sizeof(struct reservation_object); > else > /* prevent &dma_buf[1] == dma_buf->resv */ > alloc_size += 1; > > - if (WARN_ON(!priv || !ops > - || !ops->map_dma_buf > - || !ops->unmap_dma_buf > - || !ops->release > - || !ops->kmap_atomic > - || !ops->kmap > - || !ops->mmap)) { > + if (WARN_ON(!exp_info->priv > + || !exp_info->ops > + || !exp_info->ops->map_dma_buf > + || !exp_info->ops->unmap_dma_buf > + || !exp_info->ops->release > + || !exp_info->ops->kmap_atomic > + || !exp_info->ops->kmap > + || !exp_info->ops->mmap)) { > return ERR_PTR(-EINVAL); > } > > @@ -309,21 +310,22 @@ struct dma_buf *dma_buf_export_named(void *priv, const > struct dma_buf_ops *ops, > if (dmabuf == NULL) > return ERR_PTR(-ENOMEM); > > - dmabuf->priv = priv; > - dmabuf->ops = ops; > - dmabuf->size = size; > - dmabuf->exp_name = exp_name; > + dmabuf->priv = exp_info->priv; > + dmabuf->ops = exp_info->ops; > + dmabuf->size = exp_info->size; > + dmabuf->exp_name = exp_info->exp_name; > init_waitqueue_head(&dmabuf->poll); > dmabuf->cb_excl.poll = dmabuf->cb_shared.poll = &dmabuf->poll; > dmabuf->cb_excl.active = dmabuf->cb_shared.active = 0; > > - if (!resv) { > - resv = (struct reservation_object *)&dmabuf[1]; > - reservation_object_init(resv); > + if (!exp_info->resv) { > + exp_info->resv = (struct reservation_object *)&dmabuf[1]; > + reservation_object_init(e