Re: [問題] 關於LDD driver read write 過慢問題

看板LinuxDev作者 (鼠 尾 草 *~)時間16年前 (2008/10/13 17:38), 編輯推噓0(008)
留言8則, 3人參與, 最新討論串3/3 (看更多)
我有個很頭大的問題~ 就是在我的應用程式中加入大量影響處理運算後 While(1) { Read Image from camera; Image processing,資料搬移等 Write Image to display; } 會發生螢幕每個FRAME可能會有出現黑線或殘影 如果將Image processing拿掉就不會有黑線或殘影產生 今天如果在read and write這兩個system call中做image processing,而跟write to display的image毫無關係, 還是會發生同樣問題 !! 或是 While(1) { Read Image from camera; Write Image to display; Image processing,資料搬移等 } 這樣沒影響到display資料,但是還是會發生黑線 可見應用程式中,那些影像處理和其所locate space和資料的搬移會直接影響到display, 可以麻煩先進提供個意見 !! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.125.35.232

10/13 23:01, , 1F
如果你只有一個framebuffer 這個問題似乎因CPU太慢無解
10/13 23:01, 1F

10/13 23:02, , 2F
如果硬體支援double framebuffer buffer 就有解
10/13 23:02, 2F

10/13 23:04, , 3F
要自己寫fb driver...
10/13 23:04, 3F

10/14 10:19, , 4F
硬體有支援double framebuffer
10/14 10:19, 4F

10/14 10:20, , 5F
可以麻煩您詳細說明一下嗎
10/14 10:20, 5F

10/15 18:17, , 6F
read data from camera 不能省 但是 write 可以用 mmap取代
10/15 18:17, 6F

10/15 18:18, , 7F
mmap 可以省下 user space <--> kernel space 的時間
10/15 18:18, 7F

10/15 18:19, , 8F
另外 V4L2 也可以參考一下 可以找到現成的作法
10/15 18:19, 8F
文章代碼(AID): #18ynSGCx (LinuxDev)
文章代碼(AID): #18ynSGCx (LinuxDev)