1 / 13

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.

vance
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. 2. The greyscale works correctly, but the color was fuzzy. 3. The cleanup function was inconsistent 4. Kernel panic when unload the module

  6. Our achievements • Our device driver • is stable with the 2.6.16.14 kernel • works properly, consistently without errors( ie load module, unload module , auto-detect different devices, no kernel panic) (goal #1) • Our driver supports Video4linux (goal #2) • We improve the preview driver to support both grey scale and color cards (goal #3)

  7. Problems found in the original device driver and our solutions • When compiled and executed the hrt module was loaded, but: • No device was detected, • The major number did not show up Sol: we put a series of debugging messages to test, and we add code in the hrt_init_module, hrt_cleanup_module, hrt_load, hrt_unload. 2. The two cards were detected as grayscale cards, and give us a warning message about sysfs needed.

  8. (Cont) 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. • The pci color card was not unregistered when we unload the module(this prob panic the kernel when unloading). First found by Danny • Sol: we add lines of code to unregister the color card in the hrt_cleanup and hrt_pci_cleanup functions • Pixels mapping among user space, kernel buffer and I/O devices do not work correctly, the color display was fuzzy • Sol: pixel mapping between kernel and user buf was not correct. We changed the way the mapping was done in the grab_field function. • And set the resolution in the test file to 640 x 480.

  9. (Cont) • Missing libraries needed for Video4linux • Sol: we installed SDL libraries that was missing and modified the Makefile by adding the right location for those libraries

  10. What we have learned • Learn how to build a driver for many different cards, especially video cards, in a kernel on Linux distribution 2.6 • Learn how to dissect the long source code(>65 pages with more than 3700 lines of codes) • 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) • Use of IOCL’s • 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 The color display for different resolutions still needs to be done 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