• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM64x DaVinci Video Processor Forum » [solved]whereabouts of FVID functions -as a wrapper on top of GIO class driver
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

[solved]whereabouts of FVID functions -as a wrapper on top of GIO class driver

This question is not answered
Elric
Posted by Elric
on Oct 30 2008 06:05 AM
Expert1030 points

Hi,

I have some problems tracing/examining the VPBE driver source codes.

 

-I have been examining the source codes of VPBE driver that resides in "C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\vpbe\src".

-My reference example is in "C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm\src\video\sample\vpbe\", the VPBE example which comes with PSP.

-The example uses FVID layer functions, which is implemented as a wrapper on top of GIO class driver. For instance, FVID_create() is called for creating a channel or FVID_enqueue() is called to enqueue a frame buffer to driver. In fvid.h, the defines for these functions are located: #define FVID_create(..) GIO_create(..) for example.

But, my problem is, that I can not find neither FVID_create nor GIO_create in source codes. I need to trace the code to understand it, see what happens in FVID_create or GIO_create step by step. (FVID_create is just a example, I need to trace all FVID functions indeed)

I hope I stated my problem clear.

I will be appreciated for any help.

Thanks in advance,

A. Erman Kulunyar

 

 

Da Vinci dm6437 FVID
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Bernie Thompson TI
    Posted by Bernie Thompson TI
    on Oct 30 2008 12:16 PM
    Mastermind41680 points

    This is a good question, and something that often proves confusing when trying to trace through BIOS drivers. The problem is that not all of the source code is available, particularly BIOS source code, so there is a gap that you cannot see between where GIO_create is called and the actual code within C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\vpbe\src is executed. I think the document that would help to explain this best is SPRU616, it goes into some detail on BIOS device drivers and what actually happens behind the scenes.

    To answer your question on FVID_create more directly the calling sequence goes something like: FVID_create -> GIO_create (BIOS binary) -> VPBE_mdCreateChan -> subsequent driver specific init functions. You can find the source to VPBE_mdCreateChan within C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\vpbe\src\dda_vpbeIom.c. If you want to do some debugging and step through this driver code all you have to do is add the dda_vpbeIom.c file to your project (CCS will utilize C files in your project in place of the same symbols in a library). If you then set a breakpoint at the beginning of VPBE_mdCreateChan you should see it get hit as soon as you call FVID_create. You can follow this through with other FVID functions as well, any FVID function you call in your application maps to a function somewhere within the source code of C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\vpbe\src, SPRU616 describes how this mapping is made.

    DaVinci dm6437 drivers BIOS
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elric
    Posted by Elric
    on Oct 30 2008 14:22 PM
    Expert1030 points

    Thank you for answering.

    I wonder if the BIOS source codes are permanently closed, or if they are just not included in dvsdk. Is it possible to retrieve these codes from TI? I am asking this because as I mentioned before, I am not permitted to use any not-open source code. Also I think it is possible to use mini-driver functions without using a wrapper class like GIO, hence GIO can be subtracted from the code, if there are no source codes that I can retrieve, am I right?

    I am less familiar with SPRU616, though I intend to read at least related parts. (Some of them which I had already read.) Function mapping that you mentioned is, I think, related with the interface table of type IOM_Fxns,as an example:

    IOM_Fxns DSK5402_MCBSP_AD50_FXNS = {
    mdBindDev,
    IOM_UNBINDDEVNOTIMPL,
    mdControlChan,
    mdCreateChan,
    mdDeleteChan,
    mdSubmitChan
    };

    A configuration is done in .tci file, table name given, and device name given as "\VPBE0". Although I don't understand how the interaction is done with IOM at my current level, with just giving table name and the device name. I mean, there is no visible code in the application that this device name is used, for example.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernie Thompson TI
    Posted by Bernie Thompson TI
    on Oct 30 2008 14:53 PM
    Mastermind41680 points

    Unfortunately the BIOS code is not open source, usually this is only a problem for high saftey applications (aerospace and medical), in which cases an alternate OS or a third party like Validated Software would be involved. If you really do need the BIOS source this is the type of question you would want to take to your local TI contact, as BIOS is not typically available in source this would have to be a special exception. You could take the drivers and extract out the GIO portion but that would take significant effort, also note that you would have to do this for any other BIOS drivers and any BIOS structures you may be using, such as tasks.

    There is a table in dda_vpbeIom.c that maps in the various mdXxxxChan functions (line 71) to GIO_xxx functions, and you should be able to map the FVID functions to GIO functions using the header file as you had found previously.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elric
    Posted by Elric
    on Oct 30 2008 17:16 PM
    Expert1030 points

    Bernie Thompson
    You could take the drivers and extract out the GIO portion but that would take significant effort, also note that you would have to do this for any other BIOS drivers and any BIOS structures you may be using, such as tasks.

     

    Actually what I had in mind by "subtracting GIO" is, that I may use direct calls to IOM, just without using the GIO API for VPBE IOM. But at this current level, I don't know if this would be possible.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernie Thompson TI
    Posted by Bernie Thompson TI
    on Oct 30 2008 17:21 PM
    Mastermind41680 points

    It certainly was not designed to be used that way, and I have not tried it, but it may work. For the most part GIO should be a pass through my concern would be if some of the functions which may block the task utilize GIO level code.

    Of course in the big picture the driver does make calls that block the task that the calls are made from for sure, which means it is making calls into BIOS code for which source is not available anyway, so to use the driver without using BIOS is a bigger project than just calling the internal driver functions directly.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elric
    Posted by Elric
    on Oct 30 2008 17:54 PM
    Expert1030 points

    Thanks Bernie. I will look and decide what I can do, maybe ask for the source codes; at least I have some info now that I can present to my primes.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elric
    Posted by Elric
    on Oct 31 2008 05:07 AM
    Expert1030 points

    By the way, this morning I got a response from TI knowledge base, from Mr. Giancarlo Parodi, telling the source codes for GIO API are not included, since it is a DSP BIOS API. He told me to look into "C:\CCStudio_v3.3\bios_5_31_07\packages\ti\bios\include" for header files of bios. But I discovered that "C:\CCStudio_v3.3\bios_5_31_07\packages\ti\bios\src" folder has the source codes I need. All the GIO API source code is included in this folder. Is this a normal thing? (that's a weird question I think :)...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernie Thompson TI
    Posted by Bernie Thompson TI
    on Oct 31 2008 09:59 AM
    Mastermind41680 points

    You got me on that one, it does appear that the GIO API is in fact included in source, I apologize for the confusion. What you are seeing is normal, I checked back several releases of BIOS and this folder was still in there, I just had never come across it as the general rule for BIOS is that source is not included.

    I can say for sure that much of BIOS is not provided in source though, so if you need source to the entire project than you still have a problem, for example if you do a search in the BIOS folder for files that contain the string SEM_pend, it shows up in several library files, documents, header files, and examples, but the actual source is not in there. Also note that the source to functions being called within the GIO API source is not all there, for example the call to MEM_calloc can be traced back a few function calls from MEM_calloc -> MEM_vallocJ -> MEM_vallocPtr within mem.h though the actual source to this does not appear to be present after searching the BIOS directory.

     

    DaVinci BIOS
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elric
    Posted by Elric
    on Oct 31 2008 10:36 AM
    Expert1030 points

    No need to apologize, in fact I need to thank again. I see all the source code is not included, besides we decided not to use Bios since we already have our own operating system. Now I am searching how can I achieve using LLC level functions for our needs, with a little portion of VPBE driver codes included. That's a new start I think. Thanks again.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use