503ebad4 | 07-Jul-2020 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
sun4i-csi: call _vb2_fop_release instead of v4l2_fh_release
This driver didn't call _vb2_fop_release in the sun4i_csi_release function. Without that call the vb2 queue is not properly canceled and b
sun4i-csi: call _vb2_fop_release instead of v4l2_fh_release
This driver didn't call _vb2_fop_release in the sun4i_csi_release function. Without that call the vb2 queue is not properly canceled and buffers may not be freed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
71ecc535 | 07-Jul-2020 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
sun4i-csi: drop read/write, enable VB2_DMABUF
For no obvious reason VB2_DMABUF was not enabled. Add this.
Also both read and write file ops were set, but this was not enabled in the vb2 io_modes or
sun4i-csi: drop read/write, enable VB2_DMABUF
For no obvious reason VB2_DMABUF was not enabled. Add this.
Also both read and write file ops were set, but this was not enabled in the vb2 io_modes or in the device_caps capabilities. Drop this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
32a363d0 | 25-Mar-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: Kconfig files: use select for V4L2 subdevs and MC
There are lots of drivers that only work when the media controller and/or the V4L2 subdev APIs are present.
Right now, someone need to first
media: Kconfig files: use select for V4L2 subdevs and MC
There are lots of drivers that only work when the media controller and/or the V4L2 subdev APIs are present.
Right now, someone need to first enable those APIs before using those drivers.
Well, ideally, drivers, should, instead *optionally* depend on it, in order for PC camera drivers to be able to use them, but nowadays most drivers are UVC cameras, with don't require a sensor driver.
So, be it.
Let's instead make them select the MEDIA_CONTROLLER and the SUBDEV API, in order to make easier for people to be able of enabling them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
51e40a0d | 03-Jan-2020 |
Chen-Yu Tsai <wens@csie.org> |
media: sun4i-csi: Add support for A10 CSI1 camera sensor interface
The A10/A20 Allwinner SoCs have two camera sensor interface blocks, named CSI0 and CSI1. The two have the same register layouts wit
media: sun4i-csi: Add support for A10 CSI1 camera sensor interface
The A10/A20 Allwinner SoCs have two camera sensor interface blocks, named CSI0 and CSI1. The two have the same register layouts with slightly different features:
- CSI0 has an image signal processor (ISP); CSI1 doesn't
- CSI0 can support up to four separate channels under CCIR656; CSI1 can only support one
- CSI0 can support up to 16-bit wide bus with YUV422; CSI1 can support up to 24-bit wide bus with YUV444
For now the driver doesn't support wide busses, nor CCIR656. So the only relevant difference is whether a clock needs to be taken and enabled for the ISP.
Add structs to record the differences, tie them to the compatible strings, and deal with the ISP clock. Support for the new CSI1 hardware block is added as well.
Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
249b2861 | 15-Dec-2019 |
Chen-Yu Tsai <wens@csie.org> |
media: sun4i-csi: Deal with DRAM offset
On Allwinner SoCs, some high memory bandwidth devices do DMA directly over the memory bus (called MBUS), instead of the system bus. These devices include the
media: sun4i-csi: Deal with DRAM offset
On Allwinner SoCs, some high memory bandwidth devices do DMA directly over the memory bus (called MBUS), instead of the system bus. These devices include the CSI camera sensor interface, video (codec) engine, display subsystem, etc.. The memory bus has a different addressing scheme without the DRAM starting offset.
Deal with this using the "interconnects" property from the device tree, or if that is not available, set dev->dma_pfn_offset to PHYS_PFN_OFFSET.
Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
1948dcf0 | 15-Dec-2019 |
Chen-Yu Tsai <wens@csie.org> |
media: sun4i-csi: Fix [HV]sync polarity handling
The Allwinner camera sensor interface has a different definition of [HV]sync. While the timing diagram uses the names HSYNC and VSYNC, the note follo
media: sun4i-csi: Fix [HV]sync polarity handling
The Allwinner camera sensor interface has a different definition of [HV]sync. While the timing diagram uses the names HSYNC and VSYNC, the note following the diagram and register names use HREF and VREF. Combined they imply the hardware uses either [HV]REF or inverted [HV]SYNC. There are also registers to set horizontal skip lengths in pixels and vertical skip lengths in lines, also known as back porches.
Fix the polarity handling by using the opposite polarity flag for the checks. Also rename `[hv]sync_pol` to `[hv]ref_pol` to better match the hardware register description.
Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|