imx8mm, how to change image sensor resolution without v4l2 re-setup?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8mm, how to change image sensor resolution without v4l2 re-setup?

ソリューションへジャンプ
1,375件の閲覧回数
bhgu
Contributor II

Hello,

i'm testing ov5640 sensor on imx8mm (mini) evk board with test code 'mx6s_v4l2_capture.c

i do v4l2 setup and close repeatedly in loop to change resolution.

when i did it many times, 

this log [cma: cma_alloc: alloc failed, req-size: 150 pages, ret: -12] happened at a time

and then finally system is not working at a time.

i guess cma is related because CmaFree is decreased when v4l2 re-setup.

 

can anyone help me

1. how to change resolution without v4l2 re-setup?

2. how to prevent cma size decreasing?

3. any help to solve this problem? ( what i only need is to keep changing resolution.) 

attached log file.

thank you for your help in advance

0 件の賞賛
返信
1 解決策
1,362件の閲覧回数
bhgu
Contributor II

i added munmap function after stream off and it's solved.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,363件の閲覧回数
bhgu
Contributor II

i added munmap function after stream off and it's solved.

0 件の賞賛
返信
1,365件の閲覧回数
bhgu
Contributor II

I have found why cma free size decrease when I re-setup v4l2.

do return before free of previous alloc at refcount_dec_and_test(func) - vb2_dc_put(func) in videobuf2-dma-contig.c

now I change in ignored refcount_dec_and_test(func) and could prevent decreasing cma size.

can I ignore refcount_dec_and_test function?

what side effect can I expect?

I would like to clear this issue

0 件の賞賛
返信