Adjust the v4l2 framework to support both capture and v4l2m2m,
and can easily add other v4l2 features.
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
Because the ratio between API value and ISX019 register value
is 128 : 90 about HUE, some different API values become the
same register value.
So, store the value specified by application in setting,
and return the stored value in getting so that the gotten value
is the same as the setting value by application.
About IMGSENSOR_ID_EXPOSURE_AUTO, IMGSENSOR_ID_ISO_SENSITIVITY_AUTO,
and IMGSENSOR_ID_EXPOSURE_METERING, enumerations are defined.
So, control type should be not integer but integer menu.
About parameter whose register size is less than 4 bytes,
when transfer read value to API parameter, cast appropriately
to avoid the following problems.
- Read value includes garbage value
- Negative value becomes huge positive value
Modify control id definition to avoid duplication even if
the control ids belong to the same control class.
Also, not refer to control class in driver.
The Goldfish FB register should be optimized by considering the need to pass in parameters for base and irq.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
To avoid losing the first frame, the set_buf needs to excute first. At the same time, imgdata->start_capture should excuted before the imgsensor->start_capture.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
The BIT macro is widely used in NuttX,
and to achieve a unified strategy,
we have placed the implementation of the BIT macro
in bits.h to simplify code implementation.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
so the user could register fb device directly instead
go through the sequence of up_fbinitialize/up_fbgetvplane
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
forget from patch:
commit bbf5b0bb6d
Author: jianglianfang <jianglianfang@xiaomi.com>
Date: Tue Aug 15 19:47:14 2023 +0800
driver/video: adapting Goldfish FB to VSync optimized FB driver
The circbuf part is implemented by the fb driver, and goldfish needs to
delete the part related to circbuf and adapt to the interface of the fb
driver.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
When the upper layer calls goldfish_camera_data_uninit, priv->capture_cb=NULL, but when there is data transmission in goldfish_camera_thread, priv->capture_cb will be called, which will cause a crash.
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
The circbuf part is implemented by the fb driver, and goldfish needs to
delete the part related to circbuf and adapt to the interface of the fb
driver.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
refact vsync queue to support multi fb poll and overlay poll.
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
Summary
The following compilation error occurs after configuring CONFIG_DEBUG_OPTLEVEL="-O3"
CC: ping.c video/video.c: In function 'video_ioctl':
video/video.c:2347:22: error: 'control.size' may be used uninitialized [-Werror=maybe-uninitialized]
2347 | control->size,
| ^~
video/video.c:2273:28: note: 'control' declared here
2273 | struct v4l2_ext_control control;
| ^~~~~~~
Signed-off-by: wangming9 <wangming9@xiaomi.com>
vfork use waitpid hang father process,
but waitpid release child processs information by default.
So when user call wait, it return errno 10.
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
isx019 driver freezes by I2C access in the interrupt context.
This I2C access is intended to stop data output from FPGA.
Delete this I2C access for the following reasons.
- Data output from FPGA does not affect power consumption
- There are no problems in capture restart without data output stop
since restart is done by image data block first.
1. support doublebuffer swtich for overlay layer
2. Add display area ioctl to scale the active area of the overlay layer
to a specific region on the LCD through hardware.
Signed-off-by: rongyichang <rongyichang@xiaomi.com>