History

media: v4l: uapi: ccs: Add controls for analogue gain constants

Add V4L2 controls for analogue gain constants required to control analogue gain. The values are device specific and thus need to be obtained from the driver.

Sakari Ailus committed 6 years ago

Commit a8a2d751 parent db08f693 files · +40 −0Browse files

Unified · Split

3 files
  1. Documentation/userspace-api/media/drivers/ccs.rst +25 −0
  2. MAINTAINERS +1 −0
  3. include/uapi/linux/ccs.h +14 −0
Documentation/userspace-api/media/drivers/ccs.rst+25−0
@@ -56,4 +56,29 @@ analogue data is never read from the pixel matrix that are outside the · 55 unmodified lines
5656 configured selection rectangle that designates crop. The difference has an
5757 effect in device timing and likely also in power consumption.
5858
59+Private controls
60+----------------
61+
62+The MIPI CCS driver implements a number of private controls under
63+``V4L2_CID_USER_BASE_CCS`` to control the MIPI CCS compliant camera sensors.
64+
65+Analogue gain model
66+~~~~~~~~~~~~~~~~~~~
67+
68+The CCS defines an analogue gain model where the gain can be calculated using
69+the following formula:
70+
71+ gain = m0 * x + c0 / (m1 * x + c1)
72+
73+Either m0 or c0 will be zero. The constants that are device specific, can be
74+obtained from the following controls:
75+
76+ V4L2_CID_CCS_ANALOGUE_GAIN_M0
77+ V4L2_CID_CCS_ANALOGUE_GAIN_M1
78+ V4L2_CID_CCS_ANALOGUE_GAIN_C0
79+ V4L2_CID_CCS_ANALOGUE_GAIN_C1
80+
81+The analogue gain (``x`` in the formula) is controlled through
82+``V4L2_CID_ANALOGUE_GAIN`` in this case.
83+
5984 **Copyright** |copy| 2020 Intel Corporation
MAINTAINERS+1−0
@@ -11840,6 +11840,7 @@ F: Documentation/userspace-api/media/drivers/ccs.rst · 11839 unmodified lines
1184011840 F: drivers/media/i2c/ccs-pll.c
1184111841 F: drivers/media/i2c/ccs-pll.h
1184211842 F: drivers/media/i2c/ccs/
11843+F: include/uapi/linux/ccs.h
1184311844 F: include/uapi/linux/smiapp.h
1184411845
1184511846 MIPS
include/uapi/linux/ccs.h+14−0
@@ -0,0 +1,14 @@
1+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2+/* Copyright (C) 2020 Intel Corporation */
3+
4+#ifndef __UAPI_CCS_H__
5+#define __UAPI_CCS_H__
6+
7+#include <linux/v4l2-controls.h>
8+
9+#define V4L2_CID_CCS_ANALOGUE_GAIN_M0 (V4L2_CID_USER_CCS_BASE + 1)
10+#define V4L2_CID_CCS_ANALOGUE_GAIN_C0 (V4L2_CID_USER_CCS_BASE + 2)
11+#define V4L2_CID_CCS_ANALOGUE_GAIN_M1 (V4L2_CID_USER_CCS_BASE + 3)
12+#define V4L2_CID_CCS_ANALOGUE_GAIN_C1 (V4L2_CID_USER_CCS_BASE + 4)
13+
14+#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t