summaryrefslogtreecommitdiffstats
path: root/drivers/media
AgeCommit message (Collapse)AuthorFilesLines
2018-04-03Merge tag 'media/v4.17-1' of ↵Linus Torvalds367-8919/+35452
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new CEC pin injection code for testing purposes - DVB frontend cxd2099 promoted from staging - new platform driver for Sony cxd2880 DVB devices - new sensor drivers: mt9t112, ov2685, ov5695, ov772x, tda1997x, tw9910.c - removal of unused cx18 and ivtv alsa mixers - the reneseas-ceu driver doesn't depend on soc_camera anymore and moved from staging - removed the mantis_vp3028 driver, unused since 2009 - s5p-mfc: add support for version 10 of the MSP - added a decoder for imon protocol - atomisp: lots of cleanups - imx074 and mt9t031: don't depend on soc_camera anymore, being promoted from staging - added helper functions to better support DVB I2C binding - lots of driver improvements and cleanups * tag 'media/v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (438 commits) media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd) media: fimc-capture: get rid of two warnings media: dvb-usb-v2: fix a missing dependency of I2C_MUX media: uvc: to the right check at uvc_ioctl_enum_framesizes() media: cec-core: fix a bug at cec_error_inj_write() media: tda9840: cleanup a warning media: tm6000: avoid casting just to print pointer address media: em28xx-input: improve error handling code media: zr364xx: avoid casting just to print pointer address media: vivid-radio-rx: add a cast to avoid a warning media: saa7134-alsa: don't use casts to print a buffer address media: solo6x10: get rid of an address space warning media: zoran: don't cast pointers to print them media: ir-kbd-i2c: change the if logic to avoid a warning media: ir-kbd-i2c: improve error handling code media: saa7134-input: improve error handling media: s2255drv: fix a casting warning media: ivtvfb: Cleanup some warnings media: videobuf-dma-sg: Fix a weird cast soc_camera: fix a weird cast on printk ...
2018-04-02Merge tag 'arch-removal' of ↵Linus Torvalds8-2279/+1
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pul removal of obsolete architecture ports from Arnd Bergmann: "This removes the entire architecture code for blackfin, cris, frv, m32r, metag, mn10300, score, and tile, including the associated device drivers. I have been working with the (former) maintainers for each one to ensure that my interpretation was right and the code is definitely unused in mainline kernels. Many had fond memories of working on the respective ports to start with and getting them included in upstream, but also saw no point in keeping the port alive without any users. In the end, it seems that while the eight architectures are extremely different, they all suffered the same fate: There was one company in charge of an SoC line, a CPU microarchitecture and a software ecosystem, which was more costly than licensing newer off-the-shelf CPU cores from a third party (typically ARM, MIPS, or RISC-V). It seems that all the SoC product lines are still around, but have not used the custom CPU architectures for several years at this point. In contrast, CPU instruction sets that remain popular and have actively maintained kernel ports tend to all be used across multiple licensees. [ See the new nds32 port merged in the previous commit for the next generation of "one company in charge of an SoC line, a CPU microarchitecture and a software ecosystem" - Linus ] The removal came out of a discussion that is now documented at https://lwn.net/Articles/748074/. Unlike the original plans, I'm not marking any ports as deprecated but remove them all at once after I made sure that they are all unused. Some architectures (notably tile, mn10300, and blackfin) are still being shipped in products with old kernels, but those products will never be updated to newer kernel releases. After this series, we still have a few architectures without mainline gcc support: - unicore32 and hexagon both have very outdated gcc releases, but the maintainers promised to work on providing something newer. At least in case of hexagon, this will only be llvm, not gcc. - openrisc, risc-v and nds32 are still in the process of finishing their support or getting it added to mainline gcc in the first place. They all have patched gcc-7.3 ports that work to some degree, but complete upstream support won't happen before gcc-8.1. Csky posted their first kernel patch set last week, their situation will be similar [ Palmer Dabbelt points out that RISC-V support is in mainline gcc since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]" This really says it all: 2498 files changed, 95 insertions(+), 467668 deletions(-) * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits) MAINTAINERS: UNICORE32: Change email account staging: iio: remove iio-trig-bfin-timer driver tty: hvc: remove tile driver tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers serial: remove tile uart driver serial: remove m32r_sio driver serial: remove blackfin drivers serial: remove cris/etrax uart drivers usb: Remove Blackfin references in USB support usb: isp1362: remove blackfin arch glue usb: musb: remove blackfin port usb: host: remove tilegx platform glue pwm: remove pwm-bfin driver i2c: remove bfin-twi driver spi: remove blackfin related host drivers watchdog: remove bfin_wdt driver can: remove bfin_can driver mmc: remove bfin_sdh driver input: misc: remove blackfin rotary driver input: keyboard: remove bf54x driver ...
2018-04-02Merge branch 'sched-wait-for-linus' of ↵Linus Torvalds1-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull wait_var_event updates from Ingo Molnar: "This introduces the new wait_var_event() API, which is a more flexible waiting primitive than wait_on_atomic_t(). All wait_on_atomic_t() users are migrated over to the new API and wait_on_atomic_t() is removed. The migration fixes one bug and should result in no functional changes for the other usecases" * 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/wait: Improve __var_waitqueue() code generation sched/wait: Remove the wait_on_atomic_t() API sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API sched/wait: Introduce wait_var_event()
2018-03-26media: platform: remove m32r specific arv driverArnd Bergmann3-906/+0
The m32r architecture is getting removed, so this one is no longer needed. Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26media: platform: remove blackfin capture driverArnd Bergmann6-1372/+0
The blackfin architecture is getting removed, so the video capture driver is also obsolete. Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Aaron Wu <aaron.wu@analog.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26media: v4l2-ioctl: rename a temp var that stores _IOC_SIZE(cmd)Mauro Carvalho Chehab1-8/+8
Instead of just calling it as "size", let's name it as "ioc_size", as it reflects better its contents. As this is constant along the function, also mark it as const. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: fimc-capture: get rid of two warningsMauro Carvalho Chehab1-2/+5
Smatch produces two warnings when building this file: ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue On some asm instructions. I suspect that those asm instructions might not be producing the right code, so, better to use two intermediate vars, get rid of the warnings and of the risk of producing a wrong code. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: dvb-usb-v2: fix a missing dependency of I2C_MUXMauro Carvalho Chehab1-1/+1
Now that af9015 requires I2C_MUX, all drivers that select it should also depend on it. drivers/media/dvb-frontends/af9013.o: In function `af9013_remove': >> drivers/media/dvb-frontends/af9013.c:1560: undefined reference to `i2c_mux_del_adapters' drivers/media/dvb-frontends/af9013.o: In function `af9013_probe': >> drivers/media/dvb-frontends/af9013.c:1488: undefined reference to `i2c_mux_alloc' >> drivers/media/dvb-frontends/af9013.c:1495: undefined reference to `i2c_mux_add_adapter' drivers/media/dvb-frontends/af9013.c:1544: undefined reference to `i2c_mux_del_adapters' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: uvc: to the right check at uvc_ioctl_enum_framesizes()Mauro Carvalho Chehab1-2/+2
While the logic there is correct, it tricks both humans and machines, a the check if "i" var is not zero is actually to validate if the "frames" var was initialized when the loop ran for the first time. That produces the following warning: drivers/media/usb/uvc/uvc_v4l2.c:1192 uvc_ioctl_enum_framesizes() error: potentially dereferencing uninitialized 'frame'. Change the logic to do the right test instead. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: cec-core: fix a bug at cec_error_inj_write()Mauro Carvalho Chehab1-3/+3
If the adapter doesn't have error_inj_parse_line() ops, the write() logic won't return -EINVAL, but, instead, it will keep looping, because "count" is a non-negative number. Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: tda9840: cleanup a warningMauro Carvalho Chehab1-1/+5
There's a false positive warning there: drivers/media/i2c/tda9840.c:79 tda9840_status() error: uninitialized symbol 'byte'. Change the code to match our coding style, in order to fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: tm6000: avoid casting just to print pointer addressMauro Carvalho Chehab1-3/+2
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: em28xx-input: improve error handling codeMauro Carvalho Chehab1-1/+6
The current I2C error handling logic makes static analyzers confused: drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'. Change it to match the coding style we're using elsewhere. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: zr364xx: avoid casting just to print pointer addressMauro Carvalho Chehab1-3/+2
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: vivid-radio-rx: add a cast to avoid a warningMauro Carvalho Chehab1-1/+1
The logic at vivid_radio_rx_g_tuner() is producint an overflow warning: drivers/media/platform/vivid/vivid-radio-rx.c:250 vivid_radio_rx_g_tuner() warn: potential negative subtraction from max '65535 - (__builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , , __builtin_choose_expr( == , , (0))))))) * 65535) / delta' Add a cast to prevent that. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: saa7134-alsa: don't use casts to print a buffer addressMauro Carvalho Chehab1-3/+2
Change the logic there to avoid casting, solving this warning: drivers/media/pci/saa7134/saa7134-alsa.c:276 saa7134_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: solo6x10: get rid of an address space warningMauro Carvalho Chehab1-15/+24
Instead of using an ancillary function to avoid duplicating a small portion of code that copies data either to kernelspace or between userspace-kernelspace, duplicate the code, as it prevents static analyzers to complain about it: drivers/media/pci/solo6x10/solo6x10-g723.c:260:46: warning: cast removes address space of expression The hole idea of using __user is to make sure that the code is doing the right thing with address space, so there's no sense on use casting. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: zoran: don't cast pointers to print themMauro Carvalho Chehab1-2/+2
drivers/media/pci/zoran/zoran_driver.c:242 v4l_fbuffer_alloc() warn: argument 5 to %lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: ir-kbd-i2c: change the if logic to avoid a warningMauro Carvalho Chehab1-1/+1
While the code is correct, it produces this warning: drivers/media/i2c/ir-kbd-i2c.c:593 zilog_ir_format() error: buffer overflow 'code_block->codes' 61 <= 173 As static analyzers may be tricked by arithmetic expressions on comparisions. So, change the order, in order to shut up this false-positive warning. That also makes easier for humans to understand that it won't be trying to go past buffer size. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: ir-kbd-i2c: improve error handling codeMauro Carvalho Chehab1-3/+15
The current I2C error handling logic makes static analyzers confused, and it doesn't follow the coding style we're using: drivers/media/i2c/ir-kbd-i2c.c:180 get_key_pixelview() error: uninitialized symbol 'b'. drivers/media/i2c/ir-kbd-i2c.c:224 get_key_knc1() error: uninitialized symbol 'b'. drivers/media/i2c/ir-kbd-i2c.c:226 get_key_knc1() error: uninitialized symbol 'b'. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: saa7134-input: improve error handlingMauro Carvalho Chehab1-9/+37
Currently, the code produces those false-positives: drivers/media/pci/saa7134/saa7134-input.c:203 get_key_msi_tvanywhere_plus() error: uninitialized symbol 'b'. drivers/media/pci/saa7134/saa7134-input.c:251 get_key_kworld_pc150u() error: uninitialized symbol 'b'. drivers/media/pci/saa7134/saa7134-input.c:275 get_key_purpletv() error: uninitialized symbol 'b'. Improve the error handling code, making it to look like our coding style. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: s2255drv: fix a casting warningMauro Carvalho Chehab1-2/+2
drivers/media/usb/s2255/s2255drv.c:651 s2255_fillbuff() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: ivtvfb: Cleanup some warningsMauro Carvalho Chehab1-7/+5
drivers/media/pci/ivtv/ivtvfb.c:349 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:360 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:363 ivtvfb_prep_frame() warn: argument 4 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: videobuf-dma-sg: Fix a weird castMauro Carvalho Chehab1-3/+2
Just use %p. Fixes this warning: drivers/media/v4l2-core/videobuf-dma-sg.c:247 videobuf_dma_init_kernel() warn: argument 2 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23soc_camera: fix a weird cast on printkMauro Carvalho Chehab1-1/+1
drivers/media/platform/soc_camera/soc_camera.c:790 soc_camera_mmap() warn: argument 4 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: cx23885: fix a warningMauro Carvalho Chehab1-3/+2
drivers/media/pci/cx23885/cx23885-alsa.c:92 cx23885_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: cx88: fix two warningsMauro Carvalho Chehab1-4/+4
drivers/media/pci/cx88/cx88-alsa.c:295 cx88_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/cx88/cx88-alsa.c:669 snd_cx88_wm8775_volume_put() warn: potential negative subtraction from max '65535 - (32768 * left) / right' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: solo6x10: simplify the logic at solo_p2m_dma_desc()Mauro Carvalho Chehab1-5/+2
The logic with gets a p2m_id is more complex than needed, causing false positives with static analyzers: drivers/media/pci/solo6x10/solo6x10-p2m.c:81 solo_p2m_dma_desc() error: buffer overflow 'solo_dev->p2m_dev' 4 <= s32max Make it simpler and use unsigned int. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: bttv-input: better handle errors at I2C transferMauro Carvalho Chehab1-1/+5
The error handling logic at get_key_pv951() is a little bit akward, with produces this false positive warning: drivers/media/pci/bt8xx/bttv-input.c:344 get_key_pv951() error: uninitialized symbol 'b'. Do a cleanup. As a side effect, it also improves its coding style. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: tvaudio: improve error handlingMauro Carvalho Chehab1-20/+72
The error handling logic at tvaudio is broken on several ways, as it doesn't really check right when an error occurs. Change it to return the proper error code from read/write routines and fix the errors on reads. Shuts up the following warnings: drivers/media/i2c/tvaudio.c:222 chip_read() error: uninitialized symbol 'buffer'. drivers/media/i2c/tvaudio.c:223 chip_read() error: uninitialized symbol 'buffer'. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: sp887x: fix a warningMauro Carvalho Chehab1-3/+3
drivers/media/dvb-frontends/sp887x.c:179 sp887x_initial_setup() error: memcpy() '&buf[2]' too small (30 vs 16384) This is actually a false alarm, but reverting the check order makes not only for humans to review the code, but also cleans the warning. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: v4l2-ioctl: fix some "too small" warningsMauro Carvalho Chehab1-7/+8
While the code there is right, it produces three false positives: drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383) drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383) drivers/media/v4l2-core/v4l2-ioctl.c:2876 video_usercopy() error: memset() 'parg' too small (128 vs 16383) Store the ioctl size on a cache var, in order to suppress those. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: v4l2-tpg-core: avoid buffer overflowsMauro Carvalho Chehab1-2/+2
Fix the following warnings: drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1146 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1152 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: ov5670: get rid of a series of __be warningsMauro Carvalho Chehab1-4/+5
There are some troubles on this driver with respect to the usage of __be16 and __b32 macros: drivers/media/i2c/ov5670.c:1857:27: warning: incorrect type in initializer (different base types) drivers/media/i2c/ov5670.c:1857:27: expected unsigned short [unsigned] [usertype] reg_addr_be drivers/media/i2c/ov5670.c:1857:27: got restricted __be16 [usertype] <noident> drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32 drivers/media/i2c/ov5670.c:1901:13: warning: incorrect type in assignment (different base types) drivers/media/i2c/ov5670.c:1901:13: expected unsigned int [unsigned] [usertype] val drivers/media/i2c/ov5670.c:1901:13: got restricted __be32 [usertype] <noident> Fix them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: rca: declare formats var as staticMauro Carvalho Chehab1-1/+1
As warned: drivers/media/platform/rockchip/rga/rga.c:210:16: warning: symbol 'formats' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-23media: vpss: fix annotations for vpss_regs_base2Mauro Carvalho Chehab1-1/+1
Fix those warnings: drivers/media/platform/davinci/vpss.c:510:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/davinci/vpss.c:510:25: expected void volatile [noderef] <asn:2>*addr drivers/media/platform/davinci/vpss.c:510:25: got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 drivers/media/platform/davinci/vpss.c:520:34: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/vpss.c:520:34: expected unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 drivers/media/platform/davinci/vpss.c:520:34: got void [noderef] <asn:2>* drivers/media/platform/davinci/vpss.c:522:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/davinci/vpss.c:522:54: expected void volatile [noderef] <asn:2>*addr drivers/media/platform/davinci/vpss.c:522:54: got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2 Weird enough, vpss_regs_base0 and vpss_regs_base1 were properly annotated. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: dvb_frontend: add proper __user annotationsMauro Carvalho Chehab1-2/+2
Solves those warnings: drivers/media/dvb-core/dvb_frontend.c:2297:39: warning: incorrect type in argument 1 (different address spaces) drivers/media/dvb-core/dvb_frontend.c:2297:39: expected void const [noderef] <asn:1>*<noident> drivers/media/dvb-core/dvb_frontend.c:2297:39: got struct dtv_property *props drivers/media/dvb-core/dvb_frontend.c:2331:39: warning: incorrect type in argument 1 (different address spaces) drivers/media/dvb-core/dvb_frontend.c:2331:39: expected void const [noderef] <asn:1>*<noident> drivers/media/dvb-core/dvb_frontend.c:2331:39: got struct dtv_property *props No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: dvbdev: handle ENOMEM error at dvb_module_probe()Mauro Carvalho Chehab1-0/+2
If allocation of struct board_info fails, return NULL from dvb_module_probe(). Fix this warning: drivers/media/dvb-core/dvbdev.c:958 dvb_module_probe() error: potential null dereference 'board_info'. (kzalloc returns null) Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec: improve CEC pin event handlingHans Verkuil4-18/+39
It turns out that the struct cec_fh event buffer size of 64 events (64 for CEC_EVENT_PIN_CEC_LOW and 64 for _HIGH) is too small. It's about 160 ms worth of events and if the Raspberry Pi is busy, then it might take too long for the application to be scheduled so that it can drain the pending events. Increase these buffers to 800 events which is at least 2 seconds worth of events. There is also a FIFO in between the interrupt and the cec-pin thread. The thread passes the events on to the CEC core. It is important that should this FIFO fill up the cec core will be informed that events have been lost so this can be communicated to the user by setting CEC_EVENT_FL_DROPPED_EVENTS. It is very hard to debug CEC problems if events were lost without informing the user of that fact. If events were dropped due to the FIFO filling up, then the debugfs status file will let you know how many events were dropped. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec-pin: improve status logHans Verkuil2-3/+68
Keep track of the number of short or long start bits, the number of short or long data bits and the number of initiated or detected low drive conditions. Show this information in the status debugfs log. Helpful when debugging, particularly when doing error injection as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec-pin: add error injection supportHans Verkuil2-59/+527
Implement all the error injection commands. The state machine gets new states for the various error situations, helper functions are added to detect whether an error injection is active and the actual error injections are implemented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec-pin-error-inj: parse/show error injectionHans Verkuil5-0/+429
Add support to the CEC Pin framework to parse error injection commands and to show them. The next patch will do the actual implementation of this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec-pin: create cec_pin_start_timer() functionHans Verkuil2-8/+15
This function will be needed for injecting a custom pulse. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: cec: add core error injection supportHans Verkuil1-0/+58
Add two new ops (error_inj_show and error_inj_parse_line) to support error injection functionality for CEC adapters. If both are present, then the core will add a new error-inj debugfs file that can be used to see the current error injection commands and to set error injection commands. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p_mfc_enc: get rid of new warningsMauro Carvalho Chehab1-1/+1
The values of enc_y_addr and enc_c_addr are initialized by s5p_mfc_hw_call(), but, in thesis, this macro might be doing nothing, if the get_enc_frame_buffer() is not declared. That causes those GCC warnings: drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1242 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1243 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1256 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1257 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. Change the logic by initializing those constants to zero, with should hopefully do the right thing. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p-mfc: Amend initial min, max values of HEVC hierarchical coding QP ↵Sylwester Nawrocki1-14/+14
controls Valid range for those controls is specified in documentation as [0, 51], so initialize the controls to such range rather than [INT_MIN, INT_MAX]. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p-mfc: Ensure HEVC QP controls range is properly updatedSylwester Nawrocki1-0/+40
When value of V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP or V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP controls is changed we should update range of a set of HEVC quantization parameter v4l2 controls as specified in the HEVC controls documentation. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p-mfc: Use real device for request_firmware() callMarek Szyprowski1-1/+1
Provide proper (real) struct device to request_firmware() call. This fixes following error messages: (NULL device *): Direct firmware load for s5p-mfc-v6-v2.fw failed with error -2 (NULL device *): Direct firmware load for s5p-mfc-v6.fw failed with error -2 into a bit more meaningful ones: s5p-mfc 11000000.codec: Direct firmware load for s5p-mfc-v6-v2.fw failed with error -2 s5p-mfc 11000000.codec: Direct firmware load for s5p-mfc-v6.fw failed with error -2 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p-mfc: Add support for HEVC encoderSmitha T Murthy8-2/+818
Add HEVC encoder support and necessary registers, V4L2 CIDs, and hevc encoder parameters Signed-off-by: Smitha T Murthy <smitha.t@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-22media: s5p-mfc: Add VP9 decoder supportSmitha T Murthy6-0/+45
Add support for codec definition and corresponding buffer requirements for VP9 decoder. Signed-off-by: Smitha T Murthy <smitha.t@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>