linux/drivers/staging/media/atomisp/TODO

TODO
====

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

* Remove/disable private IOCTLs

* Remove/disable custom v4l2-ctrls

* Remove custom sysfs files created by atomisp_drvfs.c

* Remove unnecessary/unwanted module parameters

* 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

* 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.