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

Slides:



Advertisements
Similar presentations
Introduction to Linux Recap Installing programs Introduction to Video Editing with Linux.
Advertisements

Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
DEVICE DRIVER VINOD KAMATH CS691X PROJECT WORK. Introduction How to write/install device drivers Systems, Kernel Programming Character, Block and Network.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
CSCC69: Operating Systems
Using VMX within Linux We explore the feasibility of executing ROM-BIOS code within the Linux x86_64 kernel.
E-Glue Application Merging executables in WIN32 environment By : Gil Arbeli, Ran Didi Instructor : Gal Badishi Softlab – June 2006.
YOUR LOGO HERE YOUR LOGO HERE Amy Brink Comparing caTissue Plus to caTissue 1.3.6A Amy Brink March 5 th, 2014.
 2005 Pearson Education, Inc. All rights reserved Introduction.
© 2004, D. J. Foreman 1 O/S Organization. © 2004, D. J. Foreman 2 Topics  Basic functions of an OS ■ Dev mgmt ■ Process & resource mgmt ■ Memory mgmt.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
CPSC 4650 Operating Systems Chapter 6 Deadlock and Starvation
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
A. Frank - P. Weisberg Operating Systems Introduction to Cooperating Processes.
PRASHANTHI NARAYAN NETTEM.
Efficient Protection of Kernel Data Structures via Object Partitioning Abhinav Srivastava, Jonathon Giffin AT&T Labs-Research, HP Fortify ACSAC 2012.
An Introduction to Device Drivers Sarah Diesburg COP 5641 / CIS 4930.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Operating System Program 5 I/O System DMA Device Driver.
Operating System Overview
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Lecture 12 Page 1 CS 111 Online Device Drivers and the Kernel Drivers are usually systems code But they’re not kernel code Most drivers are optional –
02/2008 MATRIX VISION GmbH 1 Presentation The intelligent camera and Image processing sensor.
SLAC Particle Physics & Astrophysics Tutorial on Programmer’s Development Cycle RCE Training Workshop Jim Panetta, 16 June, 2009.
Beagle Board Fast Boot Hui Chen Keji Ren Dec 10 th, 2009 EE382N-4 Project.
Kernel Modules Giving your Linux more pop since 1995.
FotoGazmic Software (From left to right: Chad Zbinden, Josey Baker, Rob Mills, Myra Bergman, Tinate Dejtiranukul)
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Challenges in KeyStone Workshop Getting Ready for Hawking, Moonshot and Edison.
1 The Guardian Kernel Module Sarah Diesburg, Louis Brooks June 5, 2006.
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
Washington WASHINGTON UNIVERSITY IN ST LOUIS CP and Full MSR Test Status.
An Introduction to Device Drivers Ted Baker  Andy Wang COP 5641 / CIS 4930.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Class Presentation Pete Bohman, Adam Kunk, Erik Shaw (ONL)
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1 Operating System Overview Chapter 2. 2 Operating System A program that controls the execution of application programs An interface between applications.
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Software tools for digital LLRF system integration at CERN 04/11/2015 LLRF15, Software tools2 Andy Butterworth Tom Levens, Andrey Pashnin, Anthony Rey.
OPERATING SYSTEMS (OS) By the end of this lesson you will be able to explain: 1. What an OS is 2. The relationship between the OS & application programs.
Computer System Structures
Input/Output (I/O) Important OS function – control I/O
Software 12/1/2008.
Kernel Design & Implementation
Linux Kernel Module Programming
pycuda Jin Kwon Kim May 25, 2017 Hi my name is jin kwon kim.
CSE451 I/O Systems and the Full I/O Path Autumn 2002
OPNFV: Support for HA Guest APIs: Introduction
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
An Introduction to Device Drivers
Video Gala Frame Grabber device driver
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Operating Systems Lecture 3.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
System Calls System calls are the user API to the OS
CS703 - Advanced Operating Systems
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

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

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

Overview ISA greyscale card PCI color card

Goals To compile correctly on the Linux distribution To compile correctly on the Linux distribution To improve the previous Video frame grabber device driver to support Video4Linux. 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 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).To work on the low-level operation of the frame grabber to support the new interrupt-driven I/O feature (if time permits).

Previous student’s works Taken from the previous student’s journal (Atulya Mahajan, Huan Keat ("Sean") Toh): Atulya Mahajan, Huan Keat ("Sean") TohAtulya Mahajan, Huan Keat ("Sean") Toh 1.The device driver ran on Linux distribution and The greyscale works correctly, but the color was fuzzy. 3. The cleanup function was inconsistent 4. Kernel panic when unload the module

Our achievements Our device driverOur device driver – is stable with the 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)Our driver supports Video4linux (goal #2) We improve the preview driver to support both grey scale and color cards (goal #3)We improve the preview driver to support both grey scale and color cards (goal #3)

Problems found in the original device driver and our solutions 1.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. 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.

(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. 3.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 4.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.

(Cont) 5.Missing libraries needed for Video4linux –Sol : we installed SDL libraries that was missing and m odified the Makefile by adding the right location for those libraries

What we have learned Learn how to build a driver for many different cards, especially video cards, in a kernel on Linux distribution 2.6Learn 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 dissect the long source code(>65 pages with more than 3700 lines of codes) Learn how to debug subtle errorsLearn how to debug subtle errors Improve how to use the following techniquesImprove how to use the following techniques Char Device driverChar Device driver Memory mapped I/OMemory mapped I/O Internal mutual exclusion (spinlocks and semaphores)Internal mutual exclusion (spinlocks and semaphores) Use of IOCL’sUse of IOCL’s Interrupt & Timer management (tasklets and kernel timer API) Learn more about Linux like making a make file, etc…Interrupt & Timer management (tasklets and kernel timer API) Learn more about Linux like making a make file, etc… Improve knowledge about LinuxImprove knowledge about Linux

Works left The color display for different resolutions still needs to be doneThe 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)To work on the low-level operation of the frame grabber to support the new interrupt-driven I/O feature (if time permits)

Conclusion We have achieved most of our main goals