File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,19 @@ config VIDEO_BUFFER_POOL_ALIGN
35
35
int "Alignment of the video pool’s buffer"
36
36
default 64
37
37
38
+ config VIDEO_BUFFER_ZEPHYR_REGION
39
+ bool "Place video pool in a Zephyr memory-region"
40
+ help
41
+ Place the video pool in a section, automatically
42
+ creating from a 'zephyr,memory-region' compatible node,
43
+ whose name is specified in VIDEO_BUFFER_ZEPHYR_REGION_NAME.
44
+
45
+ config VIDEO_BUFFER_ZEPHYR_REGION_NAME
46
+ string "Name of the zephyr memory-region for video pool"
47
+ depends on VIDEO_BUFFER_ZEPHYR_REGION
48
+ help
49
+ Name of the Zephyr memory-region where video pool is placed.
50
+
38
51
config VIDEO_BUFFER_USE_SHARED_MULTI_HEAP
39
52
bool "Use shared multi heap for video buffer"
40
53
default n
Original file line number Diff line number Diff line change @@ -27,8 +27,14 @@ LOG_MODULE_REGISTER(video_common, CONFIG_VIDEO_LOG_LEVEL);
27
27
shared_multi_heap_aligned_alloc(CONFIG_VIDEO_BUFFER_SMH_ATTRIBUTE, align, size)
28
28
#define VIDEO_COMMON_FREE (block ) shared_multi_heap_free(block)
29
29
#else
30
+ #if defined(CONFIG_VIDEO_BUFFER_ZEPHYR_REGION )
31
+ Z_HEAP_DEFINE_IN_SECT (video_buffer_pool ,
32
+ CONFIG_VIDEO_BUFFER_POOL_SZ_MAX * CONFIG_VIDEO_BUFFER_POOL_NUM_MAX ,
33
+ Z_GENERIC_SECTION (CONFIG_VIDEO_BUFFER_ZEPHYR_REGION_NAME ));
34
+ #else
30
35
K_HEAP_DEFINE (video_buffer_pool ,
31
- CONFIG_VIDEO_BUFFER_POOL_SZ_MAX * CONFIG_VIDEO_BUFFER_POOL_NUM_MAX );
36
+ CONFIG_VIDEO_BUFFER_POOL_SZ_MAX * CONFIG_VIDEO_BUFFER_POOL_NUM_MAX );
37
+ #endif
32
38
#define VIDEO_COMMON_HEAP_ALLOC (align , size , timeout ) \
33
39
k_heap_aligned_alloc(&video_buffer_pool, align, size, timeout);
34
40
#define VIDEO_COMMON_FREE (block ) k_heap_free(&video_buffer_pool, block)
You can’t perform that action at this time.
0 commit comments