linux.git
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20194-1: CSI: Coverity: fix potential dereferencing null pointer
Guoniu.Zhou [Thu, 20 Dec 2018 03:25:19 +0000 (11:25 +0800)]
MLK-20194-1: CSI: Coverity: fix potential dereferencing null pointer

fix potential dereferencing null pointer

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20595-2: camera: check camera's running state before suspend
Guoniu.Zhou [Mon, 17 Dec 2018 02:16:55 +0000 (10:16 +0800)]
MLK-20595-2: camera: check camera's running state before suspend

Check camera's running state before suspend for imx8qm/qxp
and don't support suspend when camera's running

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20123-1: camera: add automatic selection mode for mipi ov5640
Guoniu.Zhou [Tue, 30 Oct 2018 06:58:48 +0000 (14:58 +0800)]
MLK-20123-1: camera: add automatic selection mode for mipi ov5640

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for mipi interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)

6 years agoMLK-19107: ov10635: add "720P, WVGA, VGA, CIF, QVGA" support for ov10635
Guoniu.Zhou [Tue, 31 Jul 2018 06:06:01 +0000 (14:06 +0800)]
MLK-19107: ov10635: add "720P, WVGA, VGA, CIF, QVGA" support for ov10635

Add 30fps "720P, WVGA, VGA, CIF, QVGA" support for ov10635

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-2: CSI: simplified mipi and parallel csi suspend/resume implementation
Guoniu.Zhou [Fri, 29 Jun 2018 03:12:01 +0000 (11:12 +0800)]
MLK-18517-2: CSI: simplified mipi and parallel csi suspend/resume implementation

1. Delete power state maintenance of mipi and parallel csi.
This can simplified driver's resume/suspend implementation.

2. parallel_csi_power_control is a helper function which is
used to turn on/ff power domain of CI_PI. CI_PI will restore
its default parent clock for pixel clock after system resume
and can't be changed when its power is on. This issue is fixed
in scfw, more detail, please refer to "SCF-76". So remove it
in driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18053: camera: Refine VIDIOC_DBG_G_CHIP_IDENT ioctl
Guoniu.Zhou [Tue, 17 Apr 2018 06:48:13 +0000 (14:48 +0800)]
MLK-18053: camera: Refine VIDIOC_DBG_G_CHIP_IDENT ioctl

Driver only return camera name for max9286 before, but
the driver is now supporting ov5640. So refine this ioctl
implement and remove max9286 camera driver private data

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17741-2: media: add ov5640 mipi driver
Guoniu.Zhou [Fri, 9 Mar 2018 08:19:37 +0000 (16:19 +0800)]
MLK-17741-2: media: add ov5640 mipi driver

Add driver for ov5640 mipi csi interface.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 860dab368735dcbf248da7b74163ce6048a57514)

6 years agoMLK-17230-12: camera: fixed enum frame interval issue
Guoniu.Zhou [Tue, 6 Feb 2018 03:34:13 +0000 (11:34 +0800)]
MLK-17230-12: camera: fixed enum frame interval issue

when enum frame interval, kernel will be panic. It caused by
an null pointer, so correct the subdev data structure pointer.

ov5640 only support 15fps when mode is 1080P, so add this info
when user enum frame interval.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4089120ce5fbcb253728a23102a62c849b71c88b)

6 years agoMLK-17230-10: mipi_csi: add some subdev ops for compatibility
Guoniu.Zhou [Mon, 5 Feb 2018 08:58:52 +0000 (16:58 +0800)]
MLK-17230-10: mipi_csi: add some subdev ops for compatibility

In order to use the same unit test for both mipi csi and parallel
csi, add pad and video subdev ops in mipi csi driver.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit db9ba4cf63351453fb820270b7ece4d597c49072)

6 years agoMLK-17208-4: mipi csi: Add rxhs_settle calculate function
Sandor Yu [Thu, 14 Dec 2017 03:18:30 +0000 (11:18 +0800)]
MLK-17208-4: mipi csi: Add rxhs_settle calculate function

Add rxhs_settle calculate function according mipi csi phy
clock rate.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-16823-1: mipi_csi: Add runtime suspend/resume
Guoniu.Zhou [Wed, 15 Nov 2017 11:10:38 +0000 (19:10 +0800)]
MLK-16823-1: mipi_csi: Add runtime suspend/resume

Add runtime suspend/resume features support for mipi csi.
For saving power, the mipi_csi turn off it's power domain
and clock after probe.

In order to share code with system pm suspend/resume, I
change system suspend/resume in this patch.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit f88f4ac99b23e03b1cc1d87209875d6001dbbbe5)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ
Robby Cai [Tue, 21 Nov 2017 20:59:06 +0000 (04:59 +0800)]
MLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ

Add a new version (yet another version) driver for MIPI CSI2.
The reason we use a separate version is that PHY setting is quit different,
and the existing MIPI CSI2 driver uses new Media Framework, while the camera
and CSI driver not yet. After convert all drivers to new Media Framework,
consider combine these two versions.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-16695-3: mipi_csi: Change printk to dev_dbg
Guoniu.Zhou [Fri, 10 Nov 2017 03:09:21 +0000 (11:09 +0800)]
MLK-16695-3: mipi_csi: Change printk to dev_dbg

Messages in ISI irq handler are for debugging, so
change printk to dev_dbg for this purpose.

The width and height of image information need output
in debug process.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e254c8408f69eca9b668af58d911f27a4fefc121)

6 years agoMLK-16695-1: mipi_csi: Add pm suspend and resume
Guoniu.Zhou [Fri, 10 Nov 2017 01:58:20 +0000 (09:58 +0800)]
MLK-16695-1: mipi_csi: Add pm suspend and resume

Add mipi_csi power manager suspend and resume support.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected...
Guoniu.Zhou [Thu, 6 Dec 2018 05:34:55 +0000 (13:34 +0800)]
MLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected is less than the required in dtb

1. create links between entities when the number of sensors
connected is less than the required in dtb
2. unregister the video device which sensors are not connected

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 33234cc31362b5ee23be34ce2a00947e0dc96acb)

6 years agoMLK-19514-3: ISI: reorder video device register for m2m
Guoniu.Zhou [Mon, 10 Sep 2018 08:55:41 +0000 (16:55 +0800)]
MLK-19514-3: ISI: reorder video device register for m2m

Register m2m video device after all camera devices

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20616: ISI: Coverity: fix unsigned compared against zero
Guoniu.Zhou [Thu, 20 Dec 2018 02:14:32 +0000 (10:14 +0800)]
MLK-20616: ISI: Coverity: fix unsigned compared against zero

fix unsigned compared against zero, it will no effect

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected...
Guoniu.Zhou [Thu, 6 Dec 2018 05:34:55 +0000 (13:34 +0800)]
MLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected is less than the required in dtb

1. create links between entities when the number of sensors
connected is less than the required in dtb
2. unregister the video device which sensors are not connected

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 33234cc31362b5ee23be34ce2a00947e0dc96acb)

6 years agoMLK-19514-3: ISI: reorder video device register for m2m
Guoniu.Zhou [Mon, 10 Sep 2018 08:55:41 +0000 (16:55 +0800)]
MLK-19514-3: ISI: reorder video device register for m2m

Register m2m video device after all camera devices

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17741-2: media: add ov5640 mipi driver
Guoniu.Zhou [Fri, 9 Mar 2018 08:19:37 +0000 (16:19 +0800)]
MLK-17741-2: media: add ov5640 mipi driver

Add driver for ov5640 mipi csi interface.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 860dab368735dcbf248da7b74163ce6048a57514)

6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19957-1: ISI: clean isi status before enable interrupt
Guoniu.Zhou [Wed, 17 Oct 2018 02:16:08 +0000 (10:16 +0800)]
MLK-19957-1: ISI: clean isi status before enable interrupt

Because ISI can't restore to default state after software
reset, the status value of exit will be maintained. If not
cleared, ISI will triggle fake interrupt after enableing irq,
but there is not ready for data.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 932af3df1745f5afb0b9433d3355b2e24b177f4e)

6 years agoMLK-19510: ISI: fix isi cann't restore to original size after resize
Guoniu.Zhou [Mon, 17 Sep 2018 03:33:22 +0000 (11:33 +0800)]
MLK-19510: ISI: fix isi cann't restore to original size after resize

1. add CHNL_SCL_IMG_CFG register that is new added in QXP/QM B0
2. according to isi owner's comments, CHNL_SCL_IMG_CFG need to
equal to CHNL_IMG_CFG when scaling disabled and equal to scaled
image size when scaling enabled, so add configuration for this
register.
3. Becuse isi software reset can't reset isi register to default
, so it need to manual clear if there is no scaling.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-16046: mx8 imaging SS: Fix build warning
Sandor Yu [Fri, 21 Jul 2017 04:07:44 +0000 (12:07 +0800)]
MLK-16046: mx8 imaging SS: Fix build warning

Fix build warning:
warning: missing braces around initializer [-Wmissing-braces]

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20923: ISI: improve ISI memory to memory performance
Guoniu.Zhou [Wed, 13 Feb 2019 10:50:39 +0000 (18:50 +0800)]
MLK-20923: ISI: improve ISI memory to memory performance

Refer to ISI validataion code, there is no need to enable ISI
mem2mem read done interrupt and driver can handle buffers in
frame received interrupt service

Remove 50ms delay when enable ISI AXI read, it will improve
performance obviously

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit bdabe035cd5c57d713f824e61f120213ed9357ba)
(cherry picked from commit 7dd4c6affaaceefd80e6b4a033c21f6b26303902)

6 years agoMLK-20724: m2m: add RGBA to exend V4L2 standard format for android usage
Guoniu.Zhou [Mon, 14 Jan 2019 06:23:03 +0000 (14:23 +0800)]
MLK-20724: m2m: add RGBA to exend V4L2 standard format for android usage

Android has RGBA format output but V4L2 framework do not have this format
.In order to support this in our mem2mem driver, we need to extend V4L2
format.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20192-3: m2m: Coverity: fix overwriting to previous value
Guoniu.Zhou [Thu, 20 Dec 2018 02:45:32 +0000 (10:45 +0800)]
MLK-20192-3: m2m: Coverity: fix overwriting to previous value

fix overwriting to previous value

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-4: ISI: enable alpha insertion for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:57:32 +0000 (18:57 +0800)]
MLK-20326-4: ISI: enable alpha insertion for mem2mem

Enable global alpha insertion for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-3: ISI: enable alpha insertion feature for camera
Guoniu.Zhou [Fri, 9 Nov 2018 10:52:46 +0000 (18:52 +0800)]
MLK-20326-3: ISI: enable alpha insertion feature for camera

Enable global alpha insertion feature for camera

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:48:13 +0000 (18:48 +0800)]
MLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem

Eanble horizonal and vertical flip for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-1: ISI: enable horizonal and vertical flip for camera
Guoniu.Zhou [Fri, 9 Nov 2018 10:37:09 +0000 (18:37 +0800)]
MLK-20326-1: ISI: enable horizonal and vertical flip for camera

Enable horizonal and vertical flip for camera image

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19291: ISI: correct color mapping between V4L2 and ISI
Guoniu.Zhou [Thu, 8 Nov 2018 11:25:44 +0000 (19:25 +0800)]
MLK-19291: ISI: correct color mapping between V4L2 and ISI

Correct color mapping between V4L2 and ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20046-2: ISI: add YUV444M format support
Guoniu.Zhou [Thu, 25 Oct 2018 03:14:52 +0000 (11:14 +0800)]
MLK-20046-2: ISI: add YUV444M format support

add YUV444M format support

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e424d16926d0320b31850bdd293e77c164a80661)

6 years agoMLK-20014: ISI: initialize SCL_IMG_CFG to source image width and height
Guoniu.Zhou [Mon, 22 Oct 2018 08:49:39 +0000 (16:49 +0800)]
MLK-20014: ISI: initialize SCL_IMG_CFG to source image width and height

Initialize SCL_IMG_CFG to source image width and height when
scale disabled

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 506b32bb9ad6a3f596510e401b0e8fa16ca8b659)

6 years agoMLK-19957-2: ISI: remove hardware reset for isi
Guoniu.Zhou [Wed, 17 Oct 2018 04:01:36 +0000 (12:01 +0800)]
MLK-19957-2: ISI: remove hardware reset for isi

Power off some resource of ISI can't really hardware reset
ISI, because all eight ISI channels share one hardware reset.
For example, if we enable ISI channel 0 and 1 in dts and only
power off and on channel0 domain, it will not really reset and
the value of channel0 register will not change.

Hardware reset was introduced for fixing ISI can't receive data
from CI_PI after system boot in QXP A0 and this is fixed in new
version QXP B0, so remove HW reset in driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit df9da83f82c94ca578303b45c60fb17da2d9d1aa)

6 years agoMLK-19957-1: ISI: clean isi status before enable interrupt
Guoniu.Zhou [Wed, 17 Oct 2018 02:16:08 +0000 (10:16 +0800)]
MLK-19957-1: ISI: clean isi status before enable interrupt

Because ISI can't restore to default state after software
reset, the status value of exit will be maintained. If not
cleared, ISI will triggle fake interrupt after enableing irq,
but there is not ready for data.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 932af3df1745f5afb0b9433d3355b2e24b177f4e)

6 years agoMLK-19772: ISI: fill ISI out buffer address before enabling ISI channel
Guoniu.Zhou [Sat, 29 Sep 2018 03:54:03 +0000 (11:54 +0800)]
MLK-19772: ISI: fill ISI out buffer address before enabling ISI channel

1. Before enabling ISI channel, driver need to fill its out buffer
address, so correct this sequence

2. Because ISI use ping-pong buffer and write data to memory with
BUF1->BUF2->BUF1... sequence. If it finish with BUF1 and user start
a new capture process, it will start with BUF2. This will lead the
buffer ready for being read is not equal to buffer written by ISI.So
HW reset ISI, in order to confirm it start with BUF1.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 794ce0cb7d7f129fb46f5d6f38e82cc1e7f2a367)

6 years agoMLK-19730: ISI: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32
Guoniu.Zhou [Wed, 26 Sep 2018 05:50:43 +0000 (13:50 +0800)]
MLK-19730: ISI: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32

Because V4L2_PIX_FMT_RGB32 is deprecated and must not
be used by new drivers. V4L2_PIX_FMT_XRGB32 is used to
replace it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit a6780d01aa9219c6a720177bb85af755ba09a24a)

6 years agoMLK-19510: ISI: fix isi cann't restore to original size after resize
Guoniu.Zhou [Mon, 17 Sep 2018 03:33:22 +0000 (11:33 +0800)]
MLK-19510: ISI: fix isi cann't restore to original size after resize

1. add CHNL_SCL_IMG_CFG register that is new added in QXP/QM B0
2. according to isi owner's comments, CHNL_SCL_IMG_CFG need to
equal to CHNL_IMG_CFG when scaling disabled and equal to scaled
image size when scaling enabled, so add configuration for this
register.
3. Becuse isi software reset can't reset isi register to default
, so it need to manual clear if there is no scaling.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19514-2: ISI: use ping-pong buffer of ISI
Guoniu.Zhou [Tue, 4 Sep 2018 10:05:38 +0000 (18:05 +0800)]
MLK-19514-2: ISI: use ping-pong buffer of ISI

1. Use ping-pong buffer of isi.
2. Add multi-plane support for m2m out queue. When
V4L2 m2m device support multi-plane, it should be
applied for both input and output, so add it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18772: ISI: correct isi RGB to YUV conversion coefficients
Guoniu.Zhou [Thu, 9 Aug 2018 09:44:35 +0000 (17:44 +0800)]
MLK-18772: ISI: correct isi RGB to YUV conversion coefficients

Correct RGB to YUV conversion coefficients and change csc mode
to RGB to YCbCr

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-19007-1: camera: add "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support
Guoniu.Zhou [Wed, 25 Jul 2018 02:46:00 +0000 (10:46 +0800)]
MLK-19007-1: camera: add "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support

1. add resolution "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support for
parallel camera sensor driver

2. enable ISI channel line buffer chain when image having higher
than 2048 horizontal resolution

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18439: ISI: fix image tearing issue
Guoniu.Zhou [Mon, 16 Jul 2018 01:03:19 +0000 (09:03 +0800)]
MLK-18439: ISI: fix image tearing issue

When there is no free buffer in driver as isi output, isi
will still write buffer which has been dequeue to userspace
and the buffer maybe is being scanning out by DC. So add a
temporary buffer as its output when the case happen

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-1: ISI: fix system reboot stress test from nfs fail
Guoniu.Zhou [Thu, 28 Jun 2018 01:47:54 +0000 (09:47 +0800)]
MLK-18517-1: ISI: fix system reboot stress test from nfs fail

1. System will dump painc message and hang when do system
reboot stress test. It caused by ISI HW reset function. When
user open the video device, it will get the device and driver
will turn on ISI power domain, but after that, ISI HW reset
will first turn off and then turn on it's power. During this
time, the process which open ISI channel 0 maybe sleep and
the other process which open other ISI channel will active but
the other channel power domain depend on channel 0. It leads to
system panic. So change msleep to udelay and move HW reset to
other place.

2. Refine ISI system and runtime suspend/resume.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17885-2: camera: add nv12 output format support
Guoniu.Zhou [Thu, 22 Mar 2018 02:42:44 +0000 (10:42 +0800)]
MLK-17885-2: camera: add nv12 output format support

Add NV12 output format support. Because nv12 is multi
planes format, so driver need add device for every planes

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-16046: mx8 imaging SS: Fix build warning
Sandor Yu [Fri, 21 Jul 2017 04:07:44 +0000 (12:07 +0800)]
MLK-16046: mx8 imaging SS: Fix build warning

Fix build warning:
warning: missing braces around initializer [-Wmissing-braces]

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20694: media: m2m: add control for querying minimum buffer for capture and output
Guoniu.Zhou [Tue, 19 Mar 2019 09:29:01 +0000 (17:29 +0800)]
MLK-20694: media: m2m: add control for querying minimum buffer for capture and output

Add V4L2_CID_MIN_BUFFERS_FOR_CAPTURE and V4L2_CID_MIN_BUFFERS_FOR_OUTPUT control
ID for querying minimum buffer for capture and output

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20923: ISI: improve ISI memory to memory performance
Guoniu.Zhou [Wed, 13 Feb 2019 10:50:39 +0000 (18:50 +0800)]
MLK-20923: ISI: improve ISI memory to memory performance

Refer to ISI validataion code, there is no need to enable ISI
mem2mem read done interrupt and driver can handle buffers in
frame received interrupt service

Remove 50ms delay when enable ISI AXI read, it will improve
performance obviously

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit bdabe035cd5c57d713f824e61f120213ed9357ba)
(cherry picked from commit 7dd4c6affaaceefd80e6b4a033c21f6b26303902)

6 years agoMLK-20595-2: camera: check camera's running state before suspend
Guoniu.Zhou [Mon, 17 Dec 2018 02:16:55 +0000 (10:16 +0800)]
MLK-20595-2: camera: check camera's running state before suspend

Check camera's running state before suspend for imx8qm/qxp
and don't support suspend when camera's running

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected...
Guoniu.Zhou [Thu, 6 Dec 2018 05:34:55 +0000 (13:34 +0800)]
MLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected is less than the required in dtb

1. create links between entities when the number of sensors
connected is less than the required in dtb
2. unregister the video device which sensors are not connected

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 33234cc31362b5ee23be34ce2a00947e0dc96acb)

6 years agoMLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:48:13 +0000 (18:48 +0800)]
MLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem

Eanble horizonal and vertical flip for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19514-2: ISI: use ping-pong buffer of ISI
Guoniu.Zhou [Tue, 4 Sep 2018 10:05:38 +0000 (18:05 +0800)]
MLK-19514-2: ISI: use ping-pong buffer of ISI

1. Use ping-pong buffer of isi.
2. Add multi-plane support for m2m out queue. When
V4L2 m2m device support multi-plane, it should be
applied for both input and output, so add it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-19108: ISI: fix isi hang issue when open it many times
Guoniu.Zhou [Tue, 31 Jul 2018 07:58:41 +0000 (15:58 +0800)]
MLK-19108: ISI: fix isi hang issue when open it many times

When one ISI channel is receiving data, if an other process
just open it at the same time and then close, it will lead
to this channel hang. The reason is soft reset in release
callback, so it make the channel stop work. Add an counter
for open isi channel and really soft reset the channel when
the counter equal to zero.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18439: ISI: fix image tearing issue
Guoniu.Zhou [Mon, 16 Jul 2018 01:03:19 +0000 (09:03 +0800)]
MLK-18439: ISI: fix image tearing issue

When there is no free buffer in driver as isi output, isi
will still write buffer which has been dequeue to userspace
and the buffer maybe is being scanning out by DC. So add a
temporary buffer as its output when the case happen

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-1: ISI: fix system reboot stress test from nfs fail
Guoniu.Zhou [Thu, 28 Jun 2018 01:47:54 +0000 (09:47 +0800)]
MLK-18517-1: ISI: fix system reboot stress test from nfs fail

1. System will dump painc message and hang when do system
reboot stress test. It caused by ISI HW reset function. When
user open the video device, it will get the device and driver
will turn on ISI power domain, but after that, ISI HW reset
will first turn off and then turn on it's power. During this
time, the process which open ISI channel 0 maybe sleep and
the other process which open other ISI channel will active but
the other channel power domain depend on channel 0. It leads to
system panic. So change msleep to udelay and move HW reset to
other place.

2. Refine ISI system and runtime suspend/resume.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-16823-2: mipi_csi: Add runtime suspend/resume
Guoniu.Zhou [Wed, 15 Nov 2017 12:13:30 +0000 (20:13 +0800)]
MLK-16823-2: mipi_csi: Add runtime suspend/resume

Add runtime suspend/resume support for ISI. For saving
power, the ISI turn off it's power domain after probe.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d0cf6f32660c5b03fda5083fee578579f22c4d3b)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-16695-2: mipi_csi: Add pm suspend and resume support
Guoniu.Zhou [Fri, 10 Nov 2017 03:01:46 +0000 (11:01 +0800)]
MLK-16695-2: mipi_csi: Add pm suspend and resume support

Add power manager suspend and resume support for ISI

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20192-2: ISI: Coverity: remove the dead code
Guoniu.Zhou [Thu, 20 Dec 2018 02:28:42 +0000 (10:28 +0800)]
MLK-20192-2: ISI: Coverity: remove the dead code

Because the address of an object is never null and the if
statement will never true so remove the dead code

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20595-2: camera: check camera's running state before suspend
Guoniu.Zhou [Mon, 17 Dec 2018 02:16:55 +0000 (10:16 +0800)]
MLK-20595-2: camera: check camera's running state before suspend

Check camera's running state before suspend for imx8qm/qxp
and don't support suspend when camera's running

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected...
Guoniu.Zhou [Thu, 6 Dec 2018 05:34:55 +0000 (13:34 +0800)]
MLK-20529-1: camera: remove V4L2 limitation when the number of sensors connected is less than the required in dtb

1. create links between entities when the number of sensors
connected is less than the required in dtb
2. unregister the video device which sensors are not connected

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 33234cc31362b5ee23be34ce2a00947e0dc96acb)

6 years agoMLK-20325: ISI: fix reference count error when camera is not connected
Guoniu.Zhou [Mon, 12 Nov 2018 08:17:44 +0000 (16:17 +0800)]
MLK-20325: ISI: fix reference count error when camera is not connected

If camera is not connected and user try to use mem2mem function,
driver will return error but isi channel0 reference counter is
still increased by one. This will lead to mem2mem driver return
EBUSY error when user open mem2mem device, so correct this bug
in this patch.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-3: ISI: enable alpha insertion feature for camera
Guoniu.Zhou [Fri, 9 Nov 2018 10:52:46 +0000 (18:52 +0800)]
MLK-20326-3: ISI: enable alpha insertion feature for camera

Enable global alpha insertion feature for camera

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-1: ISI: enable horizonal and vertical flip for camera
Guoniu.Zhou [Fri, 9 Nov 2018 10:37:09 +0000 (18:37 +0800)]
MLK-20326-1: ISI: enable horizonal and vertical flip for camera

Enable horizonal and vertical flip for camera image

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19291: ISI: correct color mapping between V4L2 and ISI
Guoniu.Zhou [Thu, 8 Nov 2018 11:25:44 +0000 (19:25 +0800)]
MLK-19291: ISI: correct color mapping between V4L2 and ISI

Correct color mapping between V4L2 and ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20123-1: camera: add automatic selection mode for mipi ov5640
Guoniu.Zhou [Tue, 30 Oct 2018 06:58:48 +0000 (14:58 +0800)]
MLK-20123-1: camera: add automatic selection mode for mipi ov5640

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for mipi interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)

6 years agoMLK-20046-2: ISI: add YUV444M format support
Guoniu.Zhou [Thu, 25 Oct 2018 03:14:52 +0000 (11:14 +0800)]
MLK-20046-2: ISI: add YUV444M format support

add YUV444M format support

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e424d16926d0320b31850bdd293e77c164a80661)

6 years agoMLK-20046-1: ISI: correct RGB24 and BGR24 format configuration
Guoniu.Zhou [Wed, 24 Oct 2018 07:26:20 +0000 (15:26 +0800)]
MLK-20046-1: ISI: correct RGB24 and BGR24 format configuration

According to V4L2 doc, RGB24 and BGR24 should have three bytes
for each pixel rather than four, so correct it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 3694f7ffe2443d86ae740f12393edc007c997a98)

6 years agoMMFMWK-8296: ISI: return error code when user try to do upscale
Guoniu.Zhou [Mon, 22 Oct 2018 07:48:00 +0000 (15:48 +0800)]
MMFMWK-8296: ISI: return error code when user try to do upscale

Return error code when user try to do upscale since isi don't support.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 59949e29dcd996c50cae43bc5ff3f89907761c1b)

6 years agoMMFMWK-8297: ISI: return error when ISI chan0 is busy
Guoniu.Zhou [Mon, 22 Oct 2018 07:19:27 +0000 (15:19 +0800)]
MMFMWK-8297: ISI: return error when ISI chan0 is busy

When ISI channel0 is used to recevice camera data, it can
not be used to mem2mem. So return -EBUSY error code when
user try to use them at the same time.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit c6d5bf866819deaaf4900ae47d575c5a36d30a66)

6 years agoMLK-19772: ISI: fill ISI out buffer address before enabling ISI channel
Guoniu.Zhou [Sat, 29 Sep 2018 03:54:03 +0000 (11:54 +0800)]
MLK-19772: ISI: fill ISI out buffer address before enabling ISI channel

1. Before enabling ISI channel, driver need to fill its out buffer
address, so correct this sequence

2. Because ISI use ping-pong buffer and write data to memory with
BUF1->BUF2->BUF1... sequence. If it finish with BUF1 and user start
a new capture process, it will start with BUF2. This will lead the
buffer ready for being read is not equal to buffer written by ISI.So
HW reset ISI, in order to confirm it start with BUF1.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 794ce0cb7d7f129fb46f5d6f38e82cc1e7f2a367)

6 years agoMLK-19730: ISI: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32
Guoniu.Zhou [Wed, 26 Sep 2018 05:50:43 +0000 (13:50 +0800)]
MLK-19730: ISI: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32

Because V4L2_PIX_FMT_RGB32 is deprecated and must not
be used by new drivers. V4L2_PIX_FMT_XRGB32 is used to
replace it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit a6780d01aa9219c6a720177bb85af755ba09a24a)

6 years agoMLK-19514-3: ISI: reorder video device register for m2m
Guoniu.Zhou [Mon, 10 Sep 2018 08:55:41 +0000 (16:55 +0800)]
MLK-19514-3: ISI: reorder video device register for m2m

Register m2m video device after all camera devices

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-19108: ISI: fix isi hang issue when open it many times
Guoniu.Zhou [Tue, 31 Jul 2018 07:58:41 +0000 (15:58 +0800)]
MLK-19108: ISI: fix isi hang issue when open it many times

When one ISI channel is receiving data, if an other process
just open it at the same time and then close, it will lead
to this channel hang. The reason is soft reset in release
callback, so it make the channel stop work. Add an counter
for open isi channel and really soft reset the channel when
the counter equal to zero.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18439: ISI: fix image tearing issue
Guoniu.Zhou [Mon, 16 Jul 2018 01:03:19 +0000 (09:03 +0800)]
MLK-18439: ISI: fix image tearing issue

When there is no free buffer in driver as isi output, isi
will still write buffer which has been dequeue to userspace
and the buffer maybe is being scanning out by DC. So add a
temporary buffer as its output when the case happen

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-2: CSI: simplified mipi and parallel csi suspend/resume implementation
Guoniu.Zhou [Fri, 29 Jun 2018 03:12:01 +0000 (11:12 +0800)]
MLK-18517-2: CSI: simplified mipi and parallel csi suspend/resume implementation

1. Delete power state maintenance of mipi and parallel csi.
This can simplified driver's resume/suspend implementation.

2. parallel_csi_power_control is a helper function which is
used to turn on/ff power domain of CI_PI. CI_PI will restore
its default parent clock for pixel clock after system resume
and can't be changed when its power is on. This issue is fixed
in scfw, more detail, please refer to "SCF-76". So remove it
in driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-1: ISI: fix system reboot stress test from nfs fail
Guoniu.Zhou [Thu, 28 Jun 2018 01:47:54 +0000 (09:47 +0800)]
MLK-18517-1: ISI: fix system reboot stress test from nfs fail

1. System will dump painc message and hang when do system
reboot stress test. It caused by ISI HW reset function. When
user open the video device, it will get the device and driver
will turn on ISI power domain, but after that, ISI HW reset
will first turn off and then turn on it's power. During this
time, the process which open ISI channel 0 maybe sleep and
the other process which open other ISI channel will active but
the other channel power domain depend on channel 0. It leads to
system panic. So change msleep to udelay and move HW reset to
other place.

2. Refine ISI system and runtime suspend/resume.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17885-2: camera: add nv12 output format support
Guoniu.Zhou [Thu, 22 Mar 2018 02:42:44 +0000 (10:42 +0800)]
MLK-17885-2: camera: add nv12 output format support

Add NV12 output format support. Because nv12 is multi
planes format, so driver need add device for every planes

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>