mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
media: Documentation: dw100: Add user documentation for the DW100 driver
Add user documentation for the DW100 driver. while at it, replace spaces with tab on drivers list. Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
f1739ec4c7
commit
bdbb016da6
2 changed files with 70 additions and 0 deletions
69
Documentation/userspace-api/media/drivers/dw100.rst
Normal file
69
Documentation/userspace-api/media/drivers/dw100.rst
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
DW100 dewarp driver
|
||||||
|
===================
|
||||||
|
|
||||||
|
The Vivante DW100 Dewarp Processor IP core found on i.MX8MP SoC applies a
|
||||||
|
programmable geometrical transformation on the input image to correct distortion
|
||||||
|
introduced by lenses.
|
||||||
|
|
||||||
|
The transformation function is exposed by the hardware as a grid map with 16x16
|
||||||
|
pixel macroblocks indexed using X, Y vertex coordinates.
|
||||||
|
::
|
||||||
|
|
||||||
|
Image width
|
||||||
|
<--------------------------------------->
|
||||||
|
|
||||||
|
^ .-------.-------.-------.-------.-------.
|
||||||
|
| | 16x16 | | | | |
|
||||||
|
I | | pixel | | | | |
|
||||||
|
m | | block | | | | |
|
||||||
|
a | .-------.-------.-------.-------.-------.
|
||||||
|
g | | | | | | |
|
||||||
|
e | | | | | | |
|
||||||
|
| | | | | | |
|
||||||
|
h | .-------.-------.-------.-------.-------.
|
||||||
|
e | | | | | | |
|
||||||
|
i | | | | | | |
|
||||||
|
g | | | | | | |
|
||||||
|
h | .-------.-------.-------.-------.-------.
|
||||||
|
t | | | | | | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | | |
|
||||||
|
v '-------'-------'-------'-------'-------'
|
||||||
|
|
||||||
|
Grid of Image Blocks for Dewarping Map
|
||||||
|
|
||||||
|
|
||||||
|
Each x, y coordinate register uses 16 bits to record the coordinate address in
|
||||||
|
an unsigned 12.4 fixed point format (UQ12.4).
|
||||||
|
::
|
||||||
|
|
||||||
|
.----------------------.--------..----------------------.--------.
|
||||||
|
| 31~20 | 19~16 || 15~4 | 3~0 |
|
||||||
|
| (integer) | (frac) || (integer) | (frac) |
|
||||||
|
'----------------------'--------''----------------------'--------'
|
||||||
|
<-------------------------------><------------------------------->
|
||||||
|
Y coordinate X coordinate
|
||||||
|
|
||||||
|
Remap Register Layout
|
||||||
|
|
||||||
|
The dewarping map is set from applications using the
|
||||||
|
V4L2_CID_DW100_DEWARPING_16x16_VERTEX_MAP control. The control contains
|
||||||
|
an array of u32 values storing (x, y) destination coordinates for each
|
||||||
|
vertex of the grid. The x coordinate is stored in the 16 LSBs and the y
|
||||||
|
coordinate in the 16 MSBs.
|
||||||
|
|
||||||
|
The number of elements in the array must match the image size:
|
||||||
|
|
||||||
|
.. code-block:: C
|
||||||
|
|
||||||
|
elems = (DIV_ROUND_UP(width, 16) + 1) * (DIV_ROUND_UP(height, 16) + 1);
|
||||||
|
|
||||||
|
If the control has not been set by the application, the driver uses an identity
|
||||||
|
map.
|
||||||
|
|
||||||
|
More details on the DW100 hardware operations can be found in
|
||||||
|
*chapter 13.15 DeWarp* of IMX8MP_ reference manual.
|
||||||
|
|
||||||
|
.. _IMX8MP: https://www.nxp.com/webapp/Download?colCode=IMX8MPRM
|
|
@ -33,6 +33,7 @@ For more details see the file COPYING in the source distribution of Linux.
|
||||||
|
|
||||||
ccs
|
ccs
|
||||||
cx2341x-uapi
|
cx2341x-uapi
|
||||||
|
dw100
|
||||||
imx-uapi
|
imx-uapi
|
||||||
max2175
|
max2175
|
||||||
meye-uapi
|
meye-uapi
|
||||||
|
|
Loading…
Reference in a new issue