shizhenghui
aa451d3740
video/v4l2_cap: fix use after free
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
shizhenghui
47905c9132
video/v4l2_cap: fix dereference before null check
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
shizhenghui
33b539a07d
video/v4l2_cap: fix type overflow
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
yangsen5
33b5e1414c
arch/sim_encoder: g_bufsize initialization error in g_sim_encoder_ops structure
...
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-05-15 22:03:18 +08:00
shizhenghui
ed1ad1be65
Add v4l2m2m & sim decoder
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-05-15 22:03:18 +08:00
jianglianfang
a7961a3d48
driver/vnc:fix vnc kbd assert cause by wrong data conversion
...
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-05-13 18:12:48 +08:00
simbit18
792b99473c
fix nxstyle
...
corrected comments in C89 style
2024-05-09 23:44:40 +08:00
Yanfeng Liu
9d6e2b97fb
video/fb: add munmap support
...
This adds support to user-space munmap() requests in kernel build.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
041ef1d9ea
video/fb: kernel build framebuffer support
...
This supports running fb demo app in kernel build with new
config `rv-virt/kfb64`. The demo shows colored rectangles
in graphic window with the following console logs:
```
nsh> cat /proc/version
NuttX version 12.4.0 1ea10ddacc-dirty May 3 2024 07:03:59 rv-virt/kfb64
nsh> fb
VideoInfo:
fmt: 13
xres: 640
yres: 480
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0x80218010
fblen: 1228800
stride: 2560
display: 0
bpp: 32
Mapped FB: 0xc2000010
0: ( 0, 0) (640,480)
1: ( 58, 43) (524,394)
2: (116, 86) (408,308)
3: (174,129) (292,222)
4: (232,172) (176,136)
5: (290,215) ( 60, 50)
Test finished
```
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Xiang Xiao
81c8f902b6
video: Move video_format_s from video.h to v4l2_cap.c
...
since it is only used in v4l2_cap.c.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-14 12:08:30 -03:00
jianglianfang
62a4799409
video/vnc: add vnc_fb_register
...
To optimize the initialization of vnc, change it to vnc_fb_register.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-04-12 17:42:49 +08:00
SPRESENSE
d5c654914e
drivers/video/isx019: Fix default_value of 3A status
...
Fix default_value of ioctl(VIDIOC_QUERYCTRL)(id=V4L2_CID_3A_STATUS)
to AE operating and AWB operating, because both AE and AWB are
automatical adjustment mode by default.
2024-03-29 16:05:37 +08:00
SPRESENSE
33485cfe7c
drivers/video/isx019: Fix the default_value of some parameters
...
Because the exposure time and ISO sensitivity are adjusted automatically
by default, the default value can not be defined.
So, return the value out of range as the default_value of
ioctl(VIDIOC_QUERYCTRL).
2024-03-26 20:52:28 +08:00
Xiang Xiao
79f834dcbb
video: Make v4l2_ops_s to support the mutilple context
...
which is useful in the m2m usage scenario, by replacing the first
argument of callback from "struct v4l2_ops_s *" to "struct file *"
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
c6821c741d
video_framebuff: Replace critical section with spinlock
...
to avoid th global big lock and improve the performance.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
0db82210fd
video_framebuff: Hold mutex in video_framebuff_realloc_container
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
efee5f86e8
video_framebuff: Remove the unnecessary vbuf_curr field
...
since vbuf_curr is always equal to vbuf_next
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
25e7d9e43e
video: add video buffer overflow warning info.
...
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
shizhenghui
fa1b55d297
v4l2-cap: Add FAR to pointer
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
f03a1a14f3
video: move user define mem_ops into imgdata_ops.
...
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
64aecbcc5c
video: add user define memory ops for v4l2 frame buffers.
...
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
SPRESENSE
1d2fcc81f4
drivers/video/isx012: Make the I2C access more efficient
...
Store the i2c configuration in power on
because they are not changed permanently.
2024-03-26 07:41:21 +01:00
SPRESENSE
d9f9c0143c
drivers/video/isx019: Make the I2C access more efficient
...
Store the length of address and the frequency in power on
because they are not changed permanently.
2024-03-26 07:41:21 +01:00
shizhenghui
3afd26bcd1
Add ioctl interface used in v4l2m2m
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-21 19:23:53 +08:00
shizhenghui
255090d594
Refactor nuttx v4l2
...
Adjust the v4l2 framework to support both capture and v4l2m2m,
and can easily add other v4l2 features.
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-13 09:51:08 +08:00
yaojingwei
c3a3f79741
video: extend imgsensor_s interface for getting sensor device params.
...
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-13 09:51:08 +08:00
SPRESENSE
bac0228825
drivers/video/isx012: Fix buffer overrun of isx012_putreg()
...
The maximum size of ISX012 register is 4 bytes.
So, extend temporary buffer size.
Detected by CodeSonar 141893
2024-03-11 15:44:39 +01:00
SPRESENSE
3419f018a4
drivers/video/isx019: Delete unnecessary code
...
Because of misunderstanding spec, unnecessary codes exist.
Delete them.
2024-03-11 15:44:39 +01:00
SPRESENSE
baa2dc5cad
drivers/video/isx019: Store initial gamma value
...
Set initial gamma value to enable application to get
the correct initial gamma value.
2024-03-11 15:44:39 +01:00
SPRESENSE
2b04210b16
drivers/video/isx019: Fix default ISO sensitivity
...
ISX019's ISO sensitivity is in auto adjustment mode by default.
Then, default ISO sensitivity value should be auto adjusted value.
2024-03-11 15:44:39 +01:00
SPRESENSE
ae970a8ed3
drivers/video: Fix bug that can not use scene mode
...
Because the mode is set in scene parameter table,
All scene modes was recognized as disabled.
2024-03-11 15:44:39 +01:00
SPRESENSE
8f0ed67339
drivers/video/isx019: Fix mismatch bug of HUE value
...
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.
2024-03-11 15:44:39 +01:00
SPRESENSE
de3bee313e
drivers/video/isx019: Fix control type about some parameters
...
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.
2024-03-11 15:44:39 +01:00
SPRESENSE
865c88e34b
drivers/video: Add elems setting
...
Add elems setting to ioctl(VIDIOC_QUERY_EXT_CTRL)
for V4L2 compatibility.
2024-03-11 15:44:39 +01:00
SPRESENSE
fd5c2d4922
drivers/video/isx019: Fix bug that read value is not correct
...
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
2024-03-11 15:44:39 +01:00
SPRESENSE
33f7923d72
drivers/video/isx019: Fix bug that initial exposure time is not correct
...
Because exposure time calculation needs the cxd56xx clock value,
get the cxd56xx clock value before saving initial value.
2024-03-11 15:44:39 +01:00
SPRESENSE
76e91a69f7
drivers/video/isx019: Fix maximum value of exposure time
...
Modify maximum value of exposure time from 102000 to 2740
according to hardware specification.
2024-03-11 15:44:39 +01:00
SPRESENSE
dc82022769
drivers/video/isx019: Fix control type of some parameters
...
Fix control type of some parameters according to specification.
2024-03-11 15:44:39 +01:00
SPRESENSE
fdf9f00952
drivers/video/isx012: Fix control type of some parameters
...
Fix control type of some parameters according to specification.
2024-03-11 15:44:39 +01:00
SPRESENSE
f1bc6aada3
drivers/video/isx019: Fix supported ISO sensitivity
...
Support not continuous values but discrete values.
2024-03-11 15:44:39 +01:00
SPRESENSE
75a0a08a4d
drivers/video: Modify control id definition
...
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.
2024-03-11 15:44:39 +01:00
jianglianfang
2a92748c42
drivers/goldfish_fb: optimize goldfish fb register
...
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>
2023-12-18 09:08:32 -08:00
shizhenghui
49398d32aa
move userspace interface from video.h to sys/videoio.h
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-12-02 19:44:39 -08:00
yaojingwei
a57e3f365a
video.c: modify set_buf call seqence in start_capture function.
...
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>
2023-11-29 02:01:34 -08:00
jianglianfang
817e02c0c8
video/fb: move wdog from fb_chardev_s to fb_paninfo_s
...
every pan_info should have it own wdog
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-11-22 02:01:20 -08:00
jianglianfang
10991cf5f4
video/fb: wait when the vsync queue is full in FBIO_WAITFORVSYNC
...
In FBIO_WAITFORVSYNC mode, if vsync queue is full it should wait
until fb_sem_post.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-11-22 02:01:20 -08:00
Xiang Xiao
eddd90de78
poll: pollsetup should notify only one fd passd by caller
...
since it's redundant to iterate the whole fds array in setup
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-21 09:07:17 +01:00
raiden00pl
5b87fdfb9d
Documentation: remove all migrated READMEs
2023-10-29 21:03:54 -03:00
hujun5
061be5f18e
refine: move BIT Macro to nuttx/bits.h
...
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>
2023-10-12 14:52:56 +08:00
Xiang Xiao
28dee592a3
video/fb: Add fb_register_device
...
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>
2023-10-09 13:18:36 +03:00