summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-08-20media: cec: fix remote control passthroughHans Verkuil3-5/+69
The 'Press and Hold' operation was not correctly implemented, in particular the requirement that the repeat doesn't start until the second identical keypress arrives. The REP_DELAY value also had to be adjusted (see the comment in the code) to achieve the desired behavior. The 'enabled_protocols' field was also never set, fix that too. Since CEC is a fixed protocol the driver has to set this field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: per-protocol repeat periodSean Young1-73/+65
CEC needs a keypress timeout of 550ms, which is too high for the IR protocols. Also fill in known repeat times, with 50ms error margin. Also, combine all protocol data into one structure. Signed-off-by: Sean Young <sean@mess.org> Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: saa7134: raw decoder can support any protocolSean Young1-1/+3
Any protocol for which we have a software decoder, can be enabled. Without this only the loaded protocol decoders can be selected. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: ensure we do not read out of boundsSean Young1-1/+4
If rc_validate_filter() is called for CEC or XMP, then we would read beyond the end of the array. Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: simplify ir_raw_event_store_edge()Sean Young6-44/+10
Since commit 12749b198fa4 ("[media] rc: saa7134: add trailing space for timely decoding"), the workaround of inserting reset events is no longer needed. Note that the initial reset is not needed either; other rc-core drivers that don't use ir_raw_event_store_edge() never call this at all. Verified on a HVR-1150 and Raspberry Pi. Fixes: 3f5c4c73322e ("[media] rc: fix ghost keypresses with certain hw") Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: saa7134: add trailing space for timely decodingSean Young3-22/+21
The gpio-ir-recv driver adds timeouts which the saa7134 lacks; this causes keypress not to arrive, and to only arrive once more IR is received. This is what the commit below calls "ghost keypresses", and that commit does not solve the issue completely. This makes the IR on the HVR-1150 much more reliable and responsive. Fixes: 3f5c4c73322e ("[media] rc: fix ghost keypresses with certain hw") Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc-core: improve ir_raw_store_edge() handlingSean Young3-25/+18
The gpio-ir-recv driver does many wakeups (once per edge); the saa7134 driver has special handling to only wakeup 15ms after the first edge. Make this part of rc-core so gpio-ir-recv also benefits from this (so a rc-5 keypress now causes 3 wakeups rather than 24). Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: winbond-cir: buffer overrun during transmitSean Young1-1/+1
We're reading beyond the buffer before checking its length. BUG: KASAN: slab-out-of-bounds in wbcir_irq_tx Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: mceusb: do not read data parameters unless requiredSean Young1-19/+17
This causes out-of-bounds read on device probe. BUG: KASAN: slab-out-of-bounds in mceusb_dev_printdata+0xdc/0x830 [mceusb] Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: lirc_zilog: driver only sends LIRCCODESean Young1-4/+4
This driver cannot send pulse, it only accepts driver-dependent codes. Cc: <stable@vger.kernel.org> # v3.2 Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: add zx-irdec remote control driverShawn Guo6-1/+277
It adds the remote control driver and corresponding keymap file for IRDEC block found on ZTE ZX family SoCs. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: dt-bindings: add bindings document for zx-irdecShawn Guo1-0/+14
It adds the dt-bindings document for ZTE ZX IRDEC remote control block. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: ir-nec-decoder: move scancode composing code into a shared functionShawn Guo2-29/+34
The NEC scancode composing and protocol type detection in ir_nec_decode() is generic enough to be a shared function. Let's create an inline function in rc-core.h, so that other remote control drivers can reuse this function to save some code. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: sunxi-cir: explicitly request exclusive reset controlPhilipp Zabel1-1/+1
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: st-rc: explicitly request exclusive reset controlPhilipp Zabel1-1/+1
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: nuvoton: remove rudimentary transmit functionalityHeiner Kallweit2-135/+3
Transmit support in this driver was never tested and based on the code it can't work. Just one example: The buffer provided to nvt_tx_ir holds unsigned int values in micro seconds: First value is for a pulse, second for a pause, etc. Bytes in this buffer are copied as-is to the chip FIFO what can't work as the chip-internal format is totally different. See also conversion done in nvt_process_rx_ir_data. Even if we would try to fix this we have the issue that we can't test it. There seems to be no device on the market using IR transmit with one of the chips supported by this driver. To facilitate maintenance of the driver I'd propose to remove the rudimentary transmit support. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: lirc_zilog: Clean up lirc zilog error codesYves Lemée1-5/+5
According the coding style guidelines, the ENOSYS error code must be returned in case of a non existent system call. This code has been replaced with the ENOTTY error code indicating a missing functionality. Signed-off-by: Yves Lemée <yves.lemee.kernel@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: dt-bindings: gpio-ir-tx: add support for GPIO IR TransmitterSean Young1-0/+14
Document the device tree bindings for the GPIO IR Bit Banging Transmitter. Signed-off-by: Sean Young <sean@mess.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: dt-bindings: pwm-ir-tx: Add support for PWM IR TransmitterSean Young1-0/+13
Document the device tree bindings for the PWM IR Transmitter. Signed-off-by: Sean Young <sean@mess.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: pwm-ir-tx: add new driverSean Young4-0/+157
This is new driver which uses pwm, so it is more power-efficient than the bit banging gpio-ir-tx driver. Signed-off-by: Sean Young <sean@mess.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Tested-by: Matthias Reichl <hias@horus.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: gpio-ir-tx: add new driverSean Young4-0/+192
This is a simple bit-banging GPIO IR TX driver. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: mce kbd decoder not needed for IR TX driversSean Young1-0/+6
Without this patch, an input device is created which is not necessary. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc-core: rename input_name to device_nameSean Young47-62/+62
When an ir-spi is registered, you get this message. rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 "Unspecified device" refers to input_name, which makes no sense for IR TX only devices. So, rename to device_name. Also make driver_name const char* so that no casts are needed anywhere. Now ir-spi reports: rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: constify attribute_group structuresArvind Yadav1-3/+3
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 11605 880 20 12505 30d9 drivers/media/rc/rc-main.o File size After adding 'const': text data bss dec hex filename 11797 720 20 12537 30f9 drivers/media/rc/rc-main.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: imon: constify attribute_group structuresArvind Yadav1-2/+2
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 18551 2256 77 20884 5194 drivers/media/rc/imon.o File size After adding 'const': text data bss dec hex filename 18679 2160 77 20916 51b4 drivers/media/rc/imon.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: sir_ir: remove unnecessary static in sir_interrupt()Gustavo A. R. Silva1-1/+1
Remove unnecessary static on local variable delt. Such variable is initialized before being used, on every execution path throughout the function. The static has no benefit and, removing it reduces the code size. This issue was detected using Coccinelle and the following semantic patch: @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; In the following log you can see the difference in the code size. Also, there is a significant difference in the bss segment. This log is the output of the size command, before and after the code change: before: text data bss dec hex filename 5009 3456 576 9041 2351 drivers/media/rc/sir_ir.o after: text data bss dec hex filename 4988 3400 512 8900 22c4 drivers/media/rc/sir_ir.o Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc-core: do not depend on MEDIA_SUPPORTSean Young6-22/+22
There is no dependency between the two, so remove the dependency in Kconfig files. Signed-off-by: Sean Young <sean@mess.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: mtk-cir: add MAINTAINERS entry for MediaTek CIR driverSean Wang1-0/+5
I work for MediaTek on maintaining the MediaTek CIR driver for the existing SoCs and adding support for the following SoCs. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: mtk-cir: add support for MediaTek MT7622 SoCSean Wang1-0/+21
This patch adds driver for CIR controller on MT7622 SoC. It has similar handling logic as the previously MT7623 does, but there are some differences in the register and field definition. So for ease portability and maintenance, those differences all are being kept inside the platform data as other drivers usually do. Currently testing successfully on NEC and SONY remote controller. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: mtk-cir: add platform data to adapt into various hardwareSean Wang1-56/+165
This patch is the preparation patch in order to adapt into various hardware through adding platform data which holds specific characteristics and differences among MediaTek supported CIR devices instead of the old way defining those data in the static way as macro has. And the existing logic would be slightly changed to operate on those data which the actual device depends on. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: dt-bindings: media: mtk-cir: Add support for MT7622 SoCSean Wang1-2/+6
Document the devicetree bindings for CIR on MediaTek MT7622 SoC. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc-core: consistent use of rc_repeat()David Härdeman3-17/+9
The NEC decoder and the Sanyo decoders check if dev->keypressed is true before calling rc_repeat (without holding dev->keylock). Meanwhile, the XMP and JVC decoders do no such checks. This patch makes sure all users of rc_repeat() do so consistently by removing extra checks in NEC/Sanyo and modifying the check a bit in rc_repeat() so that no input event is generated if the key isn't pressed. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Allow entities to participate in the partition algorithmKieran Bingham8-33/+166
The configuration of the pipeline and entities directly affects the inputs required to each entity for the partition algorithm. Thus it makes sense to involve those entities in the decision making process. Extend the entity ops API to provide an optional .partition() operation. This allows entities that affect the partition window to adapt the window based on their configuration. Entities implementing this operation must update the window parameter in place, which will then be passed up the pipeline. This creates a process whereby each entity describes what is required to satisfy the required output to its predecessor in the pipeline. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Provide UDS register updatesKieran Bingham1-0/+14
Provide register definitions required for UDS phase and partition algorithm support. The registers and bits defined here are available on Gen3 hardware only. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Move partition rectangles to struct and operate directlyKieran Bingham5-43/+51
As we develop the partition algorithm, we need to store more information per partition to describe the phase and other parameters. To keep this data together, further abstract the existing v4l2_rect into a partition specific structure. As partitions only have horizontal coordinates, store the left and width values only. When generating the partition windows, operate directly on the partition struct rather than copying and duplicating the processed data Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Remove redundant context variablesKieran Bingham2-18/+7
The vsp1_pipe object context variables for div_size and current_partition allowed state to be maintained through processing the partitions during processing. Now that the partition tables are calculated during stream on, there is no requirement to store these variables in the pipe object. Utilise local variables for the processing as required. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Calculate partition sizes at stream startKieran Bingham2-13/+34
Previously the active window and partition sizes for each partition were calculated for each partition every frame. This data is constant and only needs to be calculated once at the start of the stream. Extend the vsp1_pipe object to dynamically store the number of partitions required and pre-calculate the partition sizes into this table. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Move vsp1_video_pipeline_setup_partitions() functionKieran Bingham1-37/+37
Separate the code change from the function move so that code changes can be clearly identified. This commit has no functional change. The partition algorithm functions will be changed, and vsp1_video_pipeline_setup_partitions() will call vsp1_video_partition(). To prepare for that, move the function without any code change. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: vsp1: Release buffers in start_streaming error pathKieran Bingham1-8/+16
Presently any received buffers are only released back to vb2 if vsp1_video_stop_streaming() is called. If vsp1_video_start_streaming() encounters an error, we will be warned by the vb2 handlers that buffers have not been returned. Move the buffer cleanup code to its own function to prevent duplication and call from both vsp1_video_stop_streaming() and the error path in vsp1_video_start_streaming(). Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: ov13858: Limit vblank to permissible rangeChiranjeevi Rapolu1-12/+23
Previously, vblank range given to user was too big, falling outside of permissible range for a given resolution. Sometimes, too low vblank resulted in errors. Now, limit vblank to only permissible range for a given resolution. This change limits lower-bounds of vblank, doesn't affect upper bounds. Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: ov5670: Limit vblank to permissible rangeChiranjeevi Rapolu1-14/+26
Previously, vblank range given to user was too big, falling outside of permissible range for a given resolution. Sometimes, too low vblank resulted in errors. Now, limit vblank to only permissible range for a given resolution. This change limits lower-bounds of vblank, doesn't affect upper bounds. Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: et8ek8: Decrease stack usageSakari Ailus1-9/+17
The et8ek8 driver combines I²C register writes to a single array that it passes to i2c_transfer(). The maximum number of writes is 48 at once, decrease it to 8 and make more transfers if needed. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: mt9m111: constify video_subdev structuresJulia Lawall1-3/+3
The v4l2_subdev_ops structure is only passed as the third argument of v4l2_i2c_subdev_init, which is const, so the v4l2_subdev_ops structure can be const as well. The other structures are only stored in the v4l2_subdev_ops structure, all the fields of which are const, so these structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: v4l: mt9t001: constify video_subdev structuresJulia Lawall1-4/+4
The v4l2_subdev_ops structure is only passed as the third argument of v4l2_i2c_subdev_init, which is const, so the v4l2_subdev_ops structure can be const as well. The other structures are only stored in the v4l2_subdev_ops structure, all the fields of which are const, so these structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: ov5670: Fix incorrect frame timing reported to userChiranjeevi Rapolu1-22/+23
Previously, pixel-rate/(pixels-per-line * lines-per-frame) was yielding incorrect frame timing for the user. OV sensor is using internal timing and this requires conversion (internal timing -> PPL) for correct HBLANK calculation. Now, change pixels-per-line domain from internal sensor clock to pixels domain. Set HBLANK read-only because fixed PPL is used for all resolutions. And, use more accurate link-frequency 422.4MHz instead of rounding down to 420MHz. Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: usb: rainshadow-cec: constify serio_device_idArvind Yadav1-1/+1
serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by <linux/serio.h> work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: usb: pulse8-cec: constify serio_device_idArvind Yadav1-1/+1
serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by <linux/serio.h> work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: coda/imx-vdoa: Check for platform_get_resource() errorFabio Estevam1-0/+2
platform_get_resource() may fail and in this case a NULL dereference will occur. Prevent this from happening by returning an error on platform_get_resource() failure. Fixes: b0444f18e0b18abce ("[media] coda: add i.MX6 VDOA driver") Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: ivtv: Fix incompatible type for argument errorBhumika Goyal1-1/+1
The first argument of function snd_ctl_new1 is of type const struct snd_kcontrol_new * but in this file the variable is passed by value to this function. This generated ""incompatible type for argument" error. So, pass the variable by reference. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: cx18: Fix incompatible type for argument errorBhumika Goyal1-1/+1
The first argument of function snd_ctl_new1 is of type const struct snd_kcontrol_new * but in this file the variable is passed by value to this function. This generated ""incompatible type for argument" error. So, pass the variable by reference. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>