Skip to content

Commit f5aa791

Browse files
widgetiiclaude
andauthored
hisilicon-ev200 / goke-gk7205v200: IMX307 high-fps presets (#2093)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 15811b3 commit f5aa791

9 files changed

Lines changed: 304 additions & 121 deletions

File tree

Lines changed: 27 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,38 @@
1+
; IMX307 720p sub-readout @ 60 fps (WINMODE=1h). Hardware sub-sample
2+
; from the 1944x1097 active area, not VPSS downscale — sensor outputs
3+
; 1280x720 natively at 594 Mbps/lane. Encoder fits 60 fps wire at
4+
; h.265 4 Mbps. Selected by Isp_SnsMode=1 (sony_imx307_2L driver).
5+
;
6+
; To enable:
7+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_1280x720_60fps.ini
8+
; cli -s .video0.size 1280x720
9+
; cli -s .video0.fps 60
10+
; killall -HUP majestic
111
[sensor]
2-
Sensor_type =stSnsImx307_2l_Obj ;sensor name
3-
Mode =0 ;WDR_MODE_NONE = 0
4-
;WDR_MODE_BUILT_IN = 1
5-
;WDR_MODE_QUDRA = 2
6-
;WDR_MODE_2To1_LINE = 3
7-
;WDR_MODE_2To1_FRAME = 4
8-
;WDR_MODE_2To1_FRAME_FULL_RATE = 5
9-
;WDR_MODE_3To1_LINE = 6
10-
;WDR_MODE_3To1_FRAME = 7
11-
;WDR_MODE_3To1_FRAME_FULL_RATE = 8
12-
;WDR_MODE_4To1_LINE = 9
13-
;WDR_MODE_4To1_FRAME = 10
14-
;WDR_MODE_4To1_FRAME_FULL_RATE = 11
15-
DllFile = /usr/lib/sensors/libsns_imx307_2l.so ;sensor lib path
16-
12+
Sensor_type=stSnsImx307_2l_Obj
13+
Mode=WDR_MODE_NONE
14+
DllFile=libsns_imx307_2l.so
1715

1816
[mode]
19-
input_mode =0 ;INPUT_MODE_MIPI = 0
20-
;INPUT_MODE_SUBLVDS = 1
21-
;INPUT_MODE_LVDS = 2 ...etc
22-
23-
raw_bitness = 10
17+
input_mode=INPUT_MODE_MIPI
18+
raw_bitness=10
19+
clock=37.125MHz
2420

2521
[mipi]
26-
;----------only for mipi_dev---------
27-
data_type = DATA_TYPE_RAW_10BIT
28-
lane_id = 0|2|-1|-1|-1|-1|-1|-1| ;lane_id: -1 - disable
22+
data_type=DATA_TYPE_RAW_10BIT
23+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
2924

3025
[isp_image]
31-
Isp_x =0
32-
Isp_y =0
33-
Isp_W =1280
34-
Isp_H =720
3526
Isp_FrameRate=60
36-
Isp_Bayer =0 ;BAYER_RGGB=0, BAYER_GRBG=1, BAYER_GBRG=2, BAYER_BGGR=3
27+
Isp_Bayer=BAYER_RGGB
28+
Isp_SnsMode=1
29+
Isp_W=1280
30+
Isp_H=720
3731

3832
[vi_dev]
39-
Input_mod = 6
40-
; VI_MODE_BT656 = 0, /* ITU-R BT.656 YUV4:2:2 */
41-
; VI_MODE_BT656_PACKED_YUV, /* ITU-R BT.656 packed YUV4:2:2 */
42-
; VI_MODE_BT601, /* ITU-R BT.601 YUV4:2:2 */
43-
; VI_MODE_DIGITAL_CAMERA, /* digatal camera mode */
44-
; VI_MODE_BT1120_STANDARD, /* BT.1120 progressive mode */
45-
; VI_MODE_BT1120_INTERLEAVED, /* BT.1120 interstage mode */
46-
; VI_MODE_MIPI, /* MIPI RAW mode */
47-
; VI_MODE_MIPI_YUV420_NORMAL, /* MIPI YUV420 normal mode */
48-
; VI_MODE_MIPI_YUV420_LEGACY, /* MIPI YUV420 legacy mode */
49-
; VI_MODE_MIPI_YUV422, /* MIPI YUV422 mode */
50-
; VI_MODE_LVDS, /* LVDS mode */
51-
; VI_MODE_HISPI, /* HiSPi mode */
52-
; VI_MODE_SLVS, /* SLVS mode */
53-
Work_mod =0 ;VI_WORK_MODE_1Multiplex = 0
54-
;VI_WORK_MODE_2Multiplex,
55-
;VI_WORK_MODE_4Multiplex
56-
Combine_mode =0 ;Y/C composite or separation mode
57-
;VI_COMBINE_COMPOSITE = 0 /*Composite mode */
58-
;VI_COMBINE_SEPARATE, /*Separate mode */
59-
Comp_mode =0 ;Component mode (single-component or dual-component)
60-
;VI_COMP_MODE_SINGLE = 0, /*single component mode */
61-
;VI_COMP_MODE_DOUBLE = 1, /*double component mode */
62-
Clock_edge =1 ;Clock edge mode (sampling on the rising or falling edge)
63-
;VI_CLK_EDGE_SINGLE_UP=0, /*rising edge */
64-
;VI_CLK_EDGE_SINGLE_DOWN, /*falling edge */
65-
Mask_num =2 ;Component mask
66-
Mask_0 =0xFFF00000
67-
Mask_1 =0x0
68-
Scan_mode = 1;VI_SCAN_INTERLACED = 0
69-
;VI_SCAN_PROGRESSIVE,
70-
Data_seq =2 ;data sequence (ONLY for YUV format)
71-
;----2th component U/V sequence in bt1120
72-
; VI_INPUT_DATA_VUVU = 0,
73-
; VI_INPUT_DATA_UVUV,
74-
;----input sequence for yuv
75-
; VI_INPUT_DATA_UYVY = 0,
76-
; VI_INPUT_DATA_VYUY,
77-
; VI_INPUT_DATA_YUYV,
78-
; VI_INPUT_DATA_YVYU
79-
80-
Vsync =1 ; vertical synchronization signal
81-
;VI_VSYNC_FIELD = 0,
82-
;VI_VSYNC_PULSE,
83-
VsyncNeg=1 ;Polarity of the vertical synchronization signal
84-
;VI_VSYNC_NEG_HIGH = 0,
85-
;VI_VSYNC_NEG_LOW /*if VIU_VSYNC_E
86-
Hsync =0 ;Attribute of the horizontal synchronization signal
87-
;VI_HSYNC_VALID_SINGNAL = 0,
88-
;VI_HSYNC_PULSE,
89-
HsyncNeg =0 ;Polarity of the horizontal synchronization signal
90-
;VI_HSYNC_NEG_HIGH = 0,
91-
;VI_HSYNC_NEG_LOW
92-
VsyncValid =1 ;Attribute of the valid vertical synchronization signal
93-
;VI_VSYNC_NORM_PULSE = 0,
94-
;VI_VSYNC_VALID_SINGAL,
95-
VsyncValidNeg =0;Polarity of the valid vertical synchronization signal
96-
;VI_VSYNC_VALID_NEG_HIGH = 0,
97-
;VI_VSYNC_VALID_NEG_LOW
98-
Timingblank_HsyncHfb =0 ;Horizontal front blanking width
99-
Timingblank_HsyncAct =1280 ;Horizontal effetive width
100-
Timingblank_HsyncHbb =0 ;Horizontal back blanking width
101-
Timingblank_VsyncVfb =0 ;Vertical front blanking height
102-
Timingblank_VsyncVact =720 ;Vertical effetive width
103-
Timingblank_VsyncVbb=0 ;Vertical back blanking height
104-
Timingblank_VsyncVbfb =0 ;Even-field vertical front blanking height(interlace, invalid progressive)
105-
Timingblank_VsyncVbact=0 ;Even-field vertical effetive width(interlace, invalid progressive)
106-
Timingblank_VsyncVbbb =0 ;Even-field vertical back blanking height(interlace, invalid progressive)
107-
108-
;----- only for bt656 ----------
109-
FixCode =0 ;BT656_FIXCODE_1 = 0,
110-
;BT656_FIXCODE_0
111-
FieldPolar=0 ;BT656_FIELD_POLAR_STD = 0
112-
;BT656_FIELD_POLAR_NSTD
113-
DataPath =1 ;ISP enable or bypass
114-
;VI_PATH_BYPASS = 0,/* ISP bypass */
115-
;VI_PATH_ISP = 1,/* ISP enable */
116-
;VI_PATH_RAW = 2,/* Capture raw data, for debug */
117-
InputDataType=1 ;VI_DATA_TYPE_YUV = 0,VI_DATA_TYPE_RGB = 1,
118-
DataRev =FALSE ;Data reverse. FALSE = 0; TRUE = 1
119-
DevRect_x=200 ;
120-
DevRect_y=20 ;
121-
DevRect_w=1280 ;
122-
DevRect_h=720 ;
33+
Input_mod=VI_MODE_MIPI
34+
DevRect_w=1280
35+
DevRect_h=720
36+
DevRect_x=0
37+
DevRect_y=0
12338
FullLinesStd=750
124-
125-
[vi_chn]
126-
CapRect_X =0
127-
CapRect_Y =0
128-
CapRect_Width=1280
129-
CapRect_Height=720
130-
DestSize_Width=1280
131-
DestSize_Height=720
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
; IMX307 boost-rate full-frame 1080p mode at 60 fps internally.
2+
; Auto-promoted by Isp_FrameRate > 30 (cmos_set_image_mode dispatch
3+
; in sony_imx307_2L driver). Wire fps is encoder-bound at ~44 fps
4+
; for h.265 4 Mbps 1080p; the value of this preset is **latency**,
5+
; not wire fps — sensor readout drops from ~33 ms to ~16.7 ms,
6+
; and the encoder picks frames from a 60 fps stream instead of 30.
7+
;
8+
; To enable:
9+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_1920x1080_60fps.ini
10+
; cli -s .video0.size 1920x1080
11+
; cli -s .video0.fps 60
12+
; cli -s .video0.codec h265 ; h264 regresses to ~20 fps wire at 1080p60
13+
; killall -HUP majestic
14+
;
15+
; Requires majestic with widgetii/majestic#77 merged (V200 chip_id fps
16+
; clamp removed) and openhisilicon with the IMX307 high-fps modes.
17+
[sensor]
18+
Sensor_type=stSnsImx307_2l_Obj
19+
Mode=WDR_MODE_NONE
20+
DllFile=libsns_imx307_2l.so
21+
22+
[mode]
23+
input_mode=INPUT_MODE_MIPI
24+
raw_bitness=10
25+
clock=37.125MHz
26+
27+
[mipi]
28+
data_type=DATA_TYPE_RAW_10BIT
29+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
30+
31+
[isp_image]
32+
Isp_FrameRate=60
33+
Isp_Bayer=BAYER_RGGB
34+
Isp_W=1920
35+
Isp_H=1080
36+
37+
[vi_dev]
38+
Input_mod=VI_MODE_MIPI
39+
DevRect_w=1920
40+
DevRect_h=1080
41+
DevRect_x=0
42+
DevRect_y=0
43+
FullLinesStd=1125
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
; IMX307 flex window-crop @ 368x304 (smallest crop dimensions allowed
2+
; by datasheet — WINWH >= 368 mult-of-4, WINWV >= 304). Sensor and
3+
; encoder deliver 200 fps wire at h.265 4 Mbps; encoder ceiling
4+
; band is ~200-219 fps (sweep saturated at 200 in our test).
5+
; Selected by Isp_SnsMode=4 (sony_imx307_2L driver).
6+
;
7+
; To enable:
8+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_368x304_200fps.ini
9+
; cli -s .video0.size 368x304
10+
; cli -s .video0.fps 200
11+
; killall -HUP majestic
12+
[sensor]
13+
Sensor_type=stSnsImx307_2l_Obj
14+
Mode=WDR_MODE_NONE
15+
DllFile=libsns_imx307_2l.so
16+
17+
[mode]
18+
input_mode=INPUT_MODE_MIPI
19+
raw_bitness=10
20+
clock=37.125MHz
21+
22+
[mipi]
23+
data_type=DATA_TYPE_RAW_10BIT
24+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
25+
26+
[isp_image]
27+
Isp_FrameRate=200
28+
Isp_Bayer=BAYER_RGGB
29+
Isp_SnsMode=4
30+
Isp_W=368
31+
Isp_H=304
32+
33+
[vi_dev]
34+
Input_mod=VI_MODE_MIPI
35+
DevRect_w=368
36+
DevRect_h=304
37+
DevRect_x=0
38+
DevRect_y=0
39+
FullLinesStd=340
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
; IMX307 flex window-crop @ VGA 640x480 (WINMODE=4h). Sensor and
2+
; encoder both deliver 130 fps wire at h.265 4 Mbps. The crop window
3+
; is centred in the 1944x1097 active area, programmed via WINPH/WINPV/
4+
; WINWH/WINWV from Isp_W/Isp_H. Selected by Isp_SnsMode=4
5+
; (sony_imx307_2L driver).
6+
;
7+
; To enable:
8+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_640x480_130fps.ini
9+
; cli -s .video0.size 640x480
10+
; cli -s .video0.fps 130
11+
; killall -HUP majestic
12+
[sensor]
13+
Sensor_type=stSnsImx307_2l_Obj
14+
Mode=WDR_MODE_NONE
15+
DllFile=libsns_imx307_2l.so
16+
17+
[mode]
18+
input_mode=INPUT_MODE_MIPI
19+
raw_bitness=10
20+
clock=37.125MHz
21+
22+
[mipi]
23+
data_type=DATA_TYPE_RAW_10BIT
24+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
25+
26+
[isp_image]
27+
Isp_FrameRate=130
28+
Isp_Bayer=BAYER_RGGB
29+
Isp_SnsMode=4
30+
Isp_W=640
31+
Isp_H=480
32+
33+
[vi_dev]
34+
Input_mod=VI_MODE_MIPI
35+
DevRect_w=640
36+
DevRect_h=480
37+
DevRect_x=0
38+
DevRect_y=0
39+
FullLinesStd=520

general/package/hisilicon-opensdk/hisilicon-opensdk.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
################################################################################
66

77
HISILICON_OPENSDK_SITE = $(call github,openipc,openhisilicon,$(HISILICON_OPENSDK_VERSION))
8-
HISILICON_OPENSDK_VERSION = 8b5e47f
8+
HISILICON_OPENSDK_VERSION = 5b1aa42
99

1010
HISILICON_OPENSDK_LICENSE = GPL-3.0
1111
HISILICON_OPENSDK_LICENSE_FILES = LICENSE
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
; IMX307 720p sub-readout @ 60 fps (WINMODE=1h). Hardware sub-sample
2+
; from the 1944x1097 active area, not VPSS downscale — sensor outputs
3+
; 1280x720 natively at 594 Mbps/lane. Encoder fits 60 fps wire at
4+
; h.265 4 Mbps. Selected by Isp_SnsMode=1 (sony_imx307_2L driver).
5+
;
6+
; To enable:
7+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_1280x720_60fps.ini
8+
; cli -s .video0.size 1280x720
9+
; cli -s .video0.fps 60
10+
; killall -HUP majestic
11+
[sensor]
12+
Sensor_type=stSnsImx307_2l_Obj
13+
Mode=WDR_MODE_NONE
14+
DllFile=libsns_imx307_2l.so
15+
16+
[mode]
17+
input_mode=INPUT_MODE_MIPI
18+
raw_bitness=10
19+
20+
[mipi]
21+
data_type=DATA_TYPE_RAW_10BIT
22+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
23+
24+
[isp_image]
25+
Isp_FrameRate=60
26+
Isp_Bayer=BAYER_RGGB
27+
Isp_SnsMode=1
28+
Isp_W=1280
29+
Isp_H=720
30+
31+
[vi_dev]
32+
Input_mod=VI_MODE_MIPI
33+
DevRect_w=1280
34+
DevRect_h=720
35+
DevRect_x=0
36+
DevRect_y=0
37+
FullLinesStd=750
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
; IMX307 boost-rate full-frame 1080p mode at 60 fps internally.
2+
; Auto-promoted by Isp_FrameRate > 30 (cmos_set_image_mode dispatch
3+
; in sony_imx307_2L driver). Wire fps is encoder-bound at ~44 fps
4+
; for h.265 4 Mbps 1080p; the value of this preset is **latency**,
5+
; not wire fps — sensor readout drops from ~33 ms to ~16.7 ms,
6+
; and the encoder picks frames from a 60 fps stream instead of 30.
7+
;
8+
; To enable:
9+
; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx307_1920x1080_60fps.ini
10+
; cli -s .video0.size 1920x1080
11+
; cli -s .video0.fps 60
12+
; cli -s .video0.codec h265 ; h264 regresses to ~20 fps wire at 1080p60
13+
; killall -HUP majestic
14+
;
15+
; Requires majestic with widgetii/majestic#77 merged (V200 chip_id fps
16+
; clamp removed) and openhisilicon with the IMX307 high-fps modes.
17+
[sensor]
18+
Sensor_type=stSnsImx307_2l_Obj
19+
Mode=WDR_MODE_NONE
20+
DllFile=libsns_imx307_2l.so
21+
22+
[mode]
23+
input_mode=INPUT_MODE_MIPI
24+
raw_bitness=10
25+
26+
[mipi]
27+
data_type=DATA_TYPE_RAW_10BIT
28+
lane_id=0|2|-1|-1|-1|-1|-1|-1|
29+
30+
[isp_image]
31+
Isp_FrameRate=60
32+
Isp_Bayer=BAYER_RGGB
33+
Isp_W=1920
34+
Isp_H=1080
35+
36+
[vi_dev]
37+
Input_mod=VI_MODE_MIPI
38+
DevRect_w=1920
39+
DevRect_h=1080
40+
DevRect_x=0
41+
DevRect_y=0
42+
FullLinesStd=1125

0 commit comments

Comments
 (0)