/*(DEBLOBBED)*/


TODO
====

1. Items which MUST be fixed before the driver can be moved out of staging:

* The atomisp ov2680 and ov5693 sensor drivers bind to the same hw-ids as
  the standard ov2680 and ov5693 drivers under drivers/media/i2c, which
  conflicts. Drop the atomisp private ov2680 and ov5693 drivers:
  * Port various ov2680 improvements from atomisp_ov2680.c to regular ov2680.c
    and switch to regular ov2680 driver
  * Make atomisp work with the regular ov5693 driver and drop atomisp_ov5693

* Fix atomisp causing the whole machine to hang in its probe() error-exit
  path taken in the firmware missing case

* Remove/disable private IOCTLs

* Remove/disable custom v4l2-ctrls

* Remove custom sysfs files created by atomisp_drvfs.c

* Remove abuse of priv field in various v4l2 userspace API structs

* Without a 3A library the capture behaviour is not very good. To take a good
  picture, the exposure/gain needs to be tuned using v4l2-ctl on the sensor
  subdev. To fix this, support for the atomisp needs to be added to libcamera.

  This MUST be done before moving the driver out of staging so that we can
  still make changes to e.g. the mediactl topology if necessary for
  libcamera integration. Since this would be a userspace API break, this
  means that at least proof-of-concept libcamera integration needs to be
  ready before moving the driver out of staging.


2. Items which SHOULD also be fixed eventually:

* The driver is intended to drive the PCI exposed versions of the device.
  It will not detect those devices enumerated via ACPI as a field of the
  i915 GPU driver (only a problem on BYT).

  There are some patches adding i915 GPU support floating at the Yocto's
  Aero repository (so far, untested upstream).

* Ensure that the driver will pass v4l2-compliance tests

* Fix not all v4l2 apps working, e.g. cheese does not work

* Get manufacturer's authorization to redistribute the binaries for
  the firmware files

* The atomisp code still has a lot of cruft which needs cleaning up


Testing
=======

Since libcamera support is not available yet, the easiest way to test for
now is using v4l2-ctl to select the input and gstreamer for streaming.

To select the input run:

v4l2-ctl -i <input>

Where <input> is 0 (front cam) or 1 (back cam).

The simplest gstreamer pipeline for testing running the sensor
at its max resolution is:

gst-launch-1.0 v4l2src ! videoconvert ! xvimagesink sync=false

To select e.g 640x480 as resolution use:

gst-launch-1.0 v4l2src ! video/x-raw,format=YV12,width=640,height=480 ! \
               videoconvert ! xvimagesink sync=false

And to show fps use:

gst-launch-1.0 v4l2src ! video/x-raw,format=YV12,width=640,height=480 ! \
               videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false

Often the image will be over / under exposed. This can be fixed by using
v4l2-ctl on the sensor subdev to tweak the exposure ctrl; or by using a GUI
app for v4l2-controls which also supports subdev such as the Fedora patched
gtk-v4l tool.
