1 / 12

A new device driver for a video frame grabber

A new device driver for a video frame grabber. Binh Tran – Lucie Ngnepieba . Term Project – Kernel Device – Summer 2006. Outline. Overview Our goals Our achievement 4. Difficulties and our solutions 5. Discovered facts and our learns 6. Future works 7. Conclusion. Overview.

maille
Download Presentation

A new device driver for a video frame grabber

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A new device driver for a video frame grabber Binh Tran – Lucie Ngnepieba Term Project – Kernel Device – Summer 2006

  2. Outline Overview Our goals Our achievement 4. Difficulties and our solutions 5. Discovered facts and our learns 6. Future works 7. Conclusion

  3. Overview ISA greyscale card PCI color card

  4. Goals To compile correctly on the Linux distribution 2.6.16 To improve the previous Video frame grabber device driver to support Video4Linux. To integrate the previous driver and make it work on both grayscale and color support. To work on the low-level operation of the frame grabber to support the new interrupt-driven I/O feature (if time permits).

  5. Previous student’s works Taken from the previous student’s journal (Atulya Mahajan, Huan Keat ("Sean") Toh): The device driver ran on Linux distribution 2.6.10 and 2.6.11 The greyscale part was running good, but the color part was not working correctly The cleanup function was inconsistent Kernel panic when unload the module

  6. Our achievements • Our HRT Frame grabber driver works well and stable with the 2.6.16.14 kernel (goal #1) • Our driver supports Video4linux (goal #2) • Our driver had improved the previous driver to work with both greyscale and color cards (goal #3) • We made our driver work properly, consistently, and non-errors for actions: load module, unload module , auto-detect different devices, no kernel panic.

  7. Difficulties encountered and our solution 1. The HRT module is loaded, but no devices are registered, no major number shows up Sol: we generated a series of debugging messages to test, and we did fix the hrt_init_module, hrt_cleanup_module, hrt_load, hrt_unload. 2. The two cards are detected as grayscale cards, and give us a warning message about sysfs needed. Sol: Switched the two cards, reboot, and load module again. It works. We diagnose the cards slots are sensitive. Moreover, sysfs is not a main issue.

  8. Difficulties encountered and our solution • The pci color card was not unregistered when we unload the module Sol: we fixed the hrt_cleanup and hrt_pci_cleanup functions 4. The color doesn’t display well, still get fuzzy Sol: pixel mapping between kernel buf and user buf is not correct. We did fix the grab_field function

  9. Difficulties encountered and our solution (cont) 5. Pixels mapping among user space, kernel buffer, and I/O devices do not work correctly, the color frames are still distorted Sol: We modified the grab_field functions, and changed the resolution in the test files as well • Missing libraries needed for Video4linux Sol: installed SDL libraries. • Issues of compiling the hrttest.c that uses the Video4linux Sol: modified the Makefile • Understand the others’s source code (>65 pages with more than 3700 lines of codes) Sol: we tried to do mapping, analysis statically, and draw links among functions

  10. Discovered facts and our learns • Learn how to read the long long source code • Learn how to debug subtle errors • Improve how to use the following techniques • Char Device driver • Memory mapped I/O • Internal mutual exclusion (spinlocks and semaphores) • Interrupt & Timer management (tasklets and kernel timer API) Learn more about Linux like making a make file, etc… • Improve knowledge about Linux

  11. Works left To work on the low-level operation of the frame grabber to support the new interrupt-driven I/O feature (if time permits)

  12. Conclusion We have achieved most of our main goals

More Related