summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2017-06-13[media] s5p-mfc: fix spelling mistake: "destionation" -> "destination"Colin Ian King2-2/+2
Trivial fix to spelling mistake in mfc_err error messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-13[media] s5p-jpeg: fix recursive spinlock acquisitionAlexandre Courbot1-3/+9
v4l2_m2m_job_finish(), which is called from the interrupt handler with slock acquired, can call the device_run() hook immediately if another context was in the queue. This hook also acquires slock, resulting in a deadlock for this scenario. Fix this by releasing slock right before calling v4l2_m2m_job_finish(). This is safe to do as the state of the hardware cannot change before v4l2_m2m_job_finish() is called anyway. Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-13[media] rc-core: cleanup rc_register_device pt2David Härdeman1-57/+10
Now that rc_register_device() is reorganised, the dev->initialized hack can be removed. Any driver which calls rc_register_device() must be prepared for the device to go live immediately. The dev->initialized commits that are relevant are commit c73bbaa4ec3e ("[media] rc-core: don't lock device at rc_register_device()") and commit 08aeb7c9a42a ("[media] rc: add locking to fix register/show race"). The original problem was that show_protocols() would access dev->rc_map.* and various other bits which are now properly initialized before device_add() is called. At the same time, remove the bogus "device is being removed" check. 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-06-13[media] rc-core: cleanup rc_register_deviceDavid Härdeman3-39/+74
The device core infrastructure is based on the presumption that once a driver calls device_add(), it must be ready to accept userspace interaction. This requires splitting rc_setup_rx_device() into two functions and reorganizing rc_register_device() so that as much work as possible is performed before calling device_add(). 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-06-13[media] sir_ir: annotate hardware config module parametersSean Young1-2/+2
This module was merged after commit 5a8fc6a3cebb ("Annotate hardware config module parameters in drivers/media/"), so add add the missing hardware annotations. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-13[media] cec: add STM32 cec driverBenjamin Gaignard4-0/+377
This patch add cec driver for STM32 platforms. cec hardware block isn't not always used with hdmi so cec notifier is not implemented. That will be done later when STM32 DSI driver will be available. Driver compliance has been tested with cec-ctl and cec-compliance tools. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Yannick Fertre <yannick.fertre@st.com> [hans.verkuil@cisco.com: modified platform/Makefile to use obj-y] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] vb2: Move buffer cache synchronisation to prepare from queueSakari Ailus1-8/+12
The buffer cache should be synchronised in buffer preparation, not when the buffer is queued to the device. Fix this. Mmap buffers do not need cache synchronisation since they are always coherent. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] vb2: Rename confusingly named internal buffer preparation functionsSakari Ailus1-9/+9
Rename __qbuf_*() functions which are specific to a buffer type as __prepare_*() which matches with what they do. The naming was there for historical reasons; the purpose of the functions was changed without renaming them. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] atomisp: use correct dialect to disable warningsMauro Carvalho Chehab3-6/+12
There's a Macro that checks if gcc supports a warning before disabling it. Use it, in order to avoid warnings when building with older gcc versions. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] staging: css2400/Makefile: don't include non-existing filesMauro Carvalho Chehab1-2/+0
The atomisp css2400/Makefile includes a Makefile.common: include $(srctree)/$(src)/../Makefile.common Well, this file doesn't exist at the Kernel tree :-) So, don't include it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] v4l: rcar_fdp1: use proper name for the R-Car SoCWolfram Sang1-1/+1
It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] ad5820: unregister async sub-deviceSakari Ailus1-1/+1
The async sub-device was not unregistered in ad5820_remove() as it should have been; do it now. Also remove the now-redundant v4l2_device_unregister_subdev(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] platform/Makefile: don't depend on arch to include dirsMauro Carvalho Chehab1-2/+2
Depending on arch configs to include dirs is evil, and makes harder to change drivers to work with COMPILE_TEST. Replace them by obj-y. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] davinci: Switch from V4L2 OF to V4L2 fwnodeSakari Ailus2-9/+13
The DaVinci VPIF capture driver V4L2 OF support was added after the V4L2 OF framework got removed. Switch VPIF capture driver to V4L2 fwnode. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2017-06-07[media] pvrusb2: remove redundant check on cnt > 8Colin Ian King1-1/+1
The 2nd check of cnt > 8 is redundant as cnt is already checked and thresholded to a maximum of 8 a few statements earlier. Remove this redundant 2nd check. Detected by CoverityScan, CID#114281 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] dvb_ca_en50221: Fix wrong EXPORT_SYMBOL orderJasmin Jessich1-7/+6
Some EXPORT_SYMBOL() on this file don't match the name of functions that preceeds them. Also, some kernel-doc markups also have a wrong name. Fix it. Signed-off-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] dvb_ca_en50221: use foo *bar, instead of foo * barJasmin Jessich1-10/+16
Make checkpatch happier by fixing this warning: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Fix endless recursion in hmm_initHans de Goede1-1/+5
hmm_init calls hmm_alloc to set dummy_ptr, hmm_alloc calls hmm_init when dummy_ptr is not yet set, which is the case in the call from hmm_init, so it calls hmm_init again, this continues until we have a stack overflow due to the recursion. This commit fixes this by adding a separate flag for tracking if hmm_init has been called. Not pretty, but it gets the job done, eventually we should be able to remove the hmm_init call from hmm_alloc. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: lm3554: fix sparse warnings(was not declared. ↵Chen Guanqiao1-2/+2
Should it be static?) Fix "symbol 'xxxxxxx' was not declared. Should it be static?" sparse warnings. Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Make ov2680 driver less chattyHans de Goede1-5/+2
There is no reason for all this printk spamming and certainly not at an error log level. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Ignore errors from second gpio in ov2680 driverHans de Goede1-3/+4
As the existing comment in the driver indicates the sensor has only 1 pin, but some boards may have 2 gpios defined and we toggle both as we we don't know which one is the right one. However if the ACPI resources table defines only 1 gpio (as expected) the gpio1_ctrl call will always fail, causing the probing of the driver to file. This commit ignore the return value of the gpio1_ctrl call, fixing this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Add OVTI2680 ACPI id to ov2680 driverHans de Goede1-0/+1
Add OVTI2680 ACPI id to ov2680 driver Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Add INT0310 ACPI id to gc0310 driverHans de Goede1-0/+1
Add INT0310 ACPI id to gc0310 driver Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Set step to 0 for mt9m114 menu controlHans de Goede1-1/+1
menu controls are not allowed to have a step size, set step to 0 to fix an oops from the WARN_ON in v4l2_ctrl_new_custom() triggering because of this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Do not call dev_warn with a NULL deviceHans de Goede1-1/+1
Do not call dev_warn with a NULL device, this silence the following 2 warnings: [ 14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO [ 14.392257] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO We could switch to using pr_warn for dev == NULL instead, but as comments in the source indicate, the check for these 2 special gmin variables with a NULL device is a workaround for 2 specific evaluation boards, so completely silencing the missing warning for these actually is a good thing. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: atomisp: Fix calling efivar_entry_get() with unaligned ↵Hans de Goede1-8/+9
arguments efivar_entry_get has certain alignment requirements and the atomisp platform code was not honoring these, causing an oops by triggering the WARN_ON in arch/x86/platform/efi/efi_64.c: virt_to_phys_or_null_size(). This commit fixes this by using the members of the efivar struct embedded in the efivar_entry struct we kzalloc as arguments to efivar_entry_get(), which is how all the other callers of efivar_entry_get() do this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: de-duplicate sh_css_mmu_set_page_table_base_indexAlan Cox3-31/+1
Between the ISP2400 and ISP2401 code base this function moved file. The merge of the drivers left us with two version in ifdefs. Resolve this down to a single copy. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: remove sh_css_irq - it contains nothingAlan Cox2-17/+0
We won't be adding abstractions or moving them here so kill it. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: Unify lut free logicAlan Cox2-21/+0
ISP2401 introduced a helper for this which we can use just as well on the ISP2400 and remove some more noise differences. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: Unify load_preview_binaries for the most partAlan Cox1-39/+1
ISP2401 introduced a rather sensible change to cut through the structure spaghetti. Adopt that for the ISP2400 as well. It makes no difference to the actual code other than readability. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: unify sh_css_hmm_buffer_record_acquireAlan Cox1-37/+3
The ISP2401 version of this function returns a pointer to the buffer, whilst the ISP2400 version returns a boolean if a slot is found. We can trivially unify the code to use the ISP2401 version. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: eliminate dead code under HAS_RES_MGRAlan Cox4-103/+0
This define is never set and these code paths are never used so they can go away. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp2: off by one in atomisp_s_input()Dan Carpenter1-1/+1
The isp->inputs[] array has isp->input_cnt elements which have been initialized so this > should be >=. This bug is harmless. The check against ATOM_ISP_MAX_INPUTS prevents us from reading beyond the end of the array. The uninitialized elements are zeroed out so we will end up returning -EINVAL a few lines later because the .camera pointer is NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp2: tidy up confused ifdefsAlan Cox1-21/+5
The two drivers were machine merged and in this case the machine output was to say the least not optimal. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp2: remove HRT_UNSCHEDAlan Cox4-27/+3
HRT_UNSCHED is never defined or set in the driver, so this is dead code that can be retired, simplifying the code a bit further. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: remove NUM_OF_BLSAlan Cox1-5/+5
With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an invariant zero. So let's get rid of it. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atompisp: HAS_BL is never defined so lose itAlan Cox3-126/+1
Kill off the HAS_BL define and the code and includes it brackets. We never define HAS_BL or use that functionality. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: media: atomisp: fix non static symbol warningsJuan Antonio Pedreira Martos1-2/+2
Fix a couple of sparse warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:59:14: warning: symbol 'repool_pgnr' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:387:6: warning: symbol 'punit_ddr_dvfs_enable' was not declared. Should it be static? Mark these symbols as static, so they are no longer incorrectly exported. Signed-off-by: Juan Antonio Pedreira Martos <juanpm1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] atomisp: use NULL instead of 0 for pointersPaolo Cretaro5-6/+6
Fix warning issued by sparse: Using plain integer as NULL pointer Signed-off-by: Paolo Cretaro <melko@frugalware.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] staging: media: cxd2099: Fix checkpatch issuesChristoph Fanelsa1-3/+3
Fix checkpatch warnings of prefered using '%s..", __func__' as function name in a string Signed-off-by: Christoph Fanelsa <eddi1983@gmx.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] mtk-vcodec: Show mtk driver error without DEBUG definitionHirokazu Honda1-11/+9
A driver error message is shown without DEBUG definition to find an error and debug easily. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] media: mtk-mdp: Fix mdp device treeDaniel Kurtz1-2/+10
If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree. Although it fixes iommu assignment issue, it also break compatibility with old device tree. So, the patch in driver is needed to iterate over sibling mdp device nodes, not child ones, to keep driver work properly. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] coda: copy headers in front of every I-framePhilipp Zabel1-4/+5
That way we don't have to rely on userspace to inject the headers on IDR requests, and there is always enough information to start decoding at an I-frame. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] coda: implement forced key framesPhilipp Zabel3-4/+12
Implement the V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME control to force IDR frames. This is useful to implement VFU (Video Fast Update) on RTP transmissions. We already force an IDR frame at the beginning of each GOP to work around a firmware bug on i.MX27, use the same mechanism to service IDR requests from userspace. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] cx18: Fix a sleep-in-atomic bug in snd_cx18_pcm_hw_freeJia-Ju Bai1-1/+3
The driver may sleep under a spin lock, and the function call path is: snd_cx18_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> [hans.verkuil@cisco.com: removed unnecessary 'if (dma_area)'] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] ivtv: Fix a sleep-in-atomic bug in snd_ivtv_pcm_hw_freeJia-Ju Bai1-1/+3
The driver may sleep under a spin lock, and the function call path is: snd_ivtv_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfree through the temporary value outside the lock holding. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> [hans.verkuil@cisco.com: removed unnecessary 'if (dma_area)'] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] davinci: vpif_capture: cleanup raw camera supportKevin Hilman1-2/+80
The current driver has a handful of hard-coded assumptions based on its primary use for capture of video signals. Cleanup those assumptions, and also query the subdev for format information and use that if available. Tested with 10-bit raw bayer input (SGRBG10) using the aptina,mt9v032 sensor, and also tested that composite video input still works from ti,tvp514x decoder. Both tests done on the da850-evm board with the add-on UI board. NOTE: Will need further testing for other sensors with different bus formats. Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] davinci: vpif_capture: get subdevs from DT when availableKevin Hilman2-2/+129
Enable getting of subdevs from DT ports and endpoints. The _get_pdata() function was larely inspired by (i.e. stolen from) am437x-vpfe.c Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] davinci: vpif_capture: drop compliance hackKevin Hilman1-15/+0
Capture driver silently overrides pixel format with a hack (according to the comments) to pass v4l2 compliance tests. This isn't needed for normal functionality, and works for composite video and raw camera capture without. In addition, the hack assumes that it only supports raw capture with a single format (SBGGR8) which isn't true. VPIF can also capture 10- and 12-bit raw formats as well. Forthcoming patches will enable VPIF input with raw-camera support and has been tested with 10-bit format from the aptina,mt9v032 sensor. Any compliance failures should be fixed with a real fix. Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07[media] ir-spi: Fix issues with lirc APIAnton Blanchard1-3/+6
The ir-spi driver has 2 issues which prevents it from working with lirc: 1. The ir-spi driver uses 16 bits of SPI data to create one cycle of the waveform. As such our SPI clock needs to be 16x faster than the carrier frequency. The driver is inconsistent in how it currently handles this. It initializes it to the carrier frequency: But the commit message has some example code which initialises it to 16x the carrier frequency: val = 608000; ret = ioctl(fd, LIRC_SET_SEND_CARRIER, &val); To maintain compatibility with lirc, always do the frequency adjustment in the driver. 2. lirc presents pulses in microseconds, but the ir-spi driver treats them as cycles of the carrier. Similar to other lirc drivers, do the conversion with DIV_ROUND_CLOSEST(). Fixes: fe052da49201 ("[media] rc: add support for IR LEDs driven through SPI") Cc: stable@vger.kernel.org Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>