• 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 » Embedded Software » Linux » Linux forum » DM365/mt9p031 Media framework question
Share
Linux
  • Forum
Options
  • Subscribe via RSS
Resources
  • Keystone II MCSDK (A15 Linux) Download
  • Forums

    DM365/mt9p031 Media framework question

    This question is not answered
    Jeremy Larsen
    Posted by Jeremy Larsen
    on May 29 2012 18:23 PM
    Prodigy250 points

    I am using a DM365 on a custom board.  I am using a 2.6.37 kernel from arago.org.  I am trying to convert an older application to use the new media framework.  I am getting 0 entities enumerated and I suspect it is my filesystem (maybe missing /dev nodes).  Where is the best place I can find and example of a root file system? 

      

    Here is the bootup and some ouput from a sample app called mt9p031_ccdc_prv_rsz_file:

    U-Boot 2009.08 (May 15 2012 - 10:49:54)

    I2C:   ready
    DRAM:  128 MB
    Using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Hit any key to stop autoboot:  0
    ## Booting kernel from Legacy Image at 80700000 ...
       Image Name:   Linux-2.6.37-ntouch_rcu
       Created:      2012-05-29  22:58:07 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    8077424 Bytes =  7.7 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37-ntouch_rcu (jlarsen@salmon) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #38 PREEMPT Tue May 29 16:58:01 MDT 2012
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DaVinci DM365 NTOUCH RCU
    Memory policy: ECC disabled, Data cache writeback
    DaVinci dm36x_rev1.2 variant 0x8
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    Kernel command line: console=ttyS0,115200n8 rw mem=64M vpfe-capture.interface=1 vpfe-capture.bufsize=4147200
    PID hash table entries: 256 (order: -2, 1024 bytes)
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 64MB = 64MB total
    Memory: 44928k/44928k available, 20608k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xff000000 - 0xffe00000   (  14 MB)
        vmalloc : 0xc4800000 - 0xfea00000   ( 930 MB)
        lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .init : 0xc0008000 - 0xc0025000   ( 116 kB)
          .text : 0xc0025000 - 0xc036e930   (3367 kB)
          .data : 0xc0370000 - 0xc039c0a0   ( 177 kB)
    SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptable hierarchical RCU implementation.
            RCU-based detection of stalled CPUs is disabled.
            Verbose stalled-CPUs detection is disabled.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 8 gpio irqs
    NET: Registered protocol family 16
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    vpss vpss: dm365_vpss vpss probed
    vpss vpss: dm365_vpss vpss probe success
    dm365_afew_hw_init
    DM365 IPIPE initialized in Continuous mode
    Advanced Linux Sound Architecture Driver Version 1.0.23.
    Switching to clocksource timer0_1
    musb-hdrc: version 6.0, peripheral, debug=0
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    msgmni has been set to 87
    io scheduler noop registered (default)
    Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    console [ttyS0] enabled
    serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
    brd: module loaded
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.4
    davinci_mdio davinci_mdio.0: detected phy mask fffffffc
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    console [netcon0] enabled
    netconsole: network logging started
    i2c /dev entries driver
    Linux media interface: v0.10
    lirc_dev: IR Remote Control driver registered, major 253
    IR NEC protocol handler initialized
    IR RC5(x) protocol handler initialized
    IR RC6 protocol handler initialized
    IR JVC protocol handler initialized
    IR Sony protocol handler initialized
    IR RC5 (streamzap) protocol handler initialized
    IR LIRC bridge handler initialized
    Linux video capture interface: v2.00
    vpfe_init
    vpfe-capture: vpss clock vpss_master enabled
    dm365_isif is registered with vpfe.
    imp serializer initialized
    AEW Driver initialized
    AF Driver initialized
    vpfe-capture vpfe-capture: v4l2 device registered
    mt9p031 1-0048: Detected a MT9P031 chip ID 1801
    mt9p031: mt9p031 sensor driver registered !!
    vpfe-capture vpfe-capture: v4l2 sub device mt9p031 registered
    DM365 IPIPEIF probed
    ALSA device list:
      No soundcards found.
    TCP cubic registered
    NET: Registered protocol family 17
    davinci_emac_probe: using random MAC addr: 62:21:d2:e3:67:cc
    Freeing init memory: 116K
     Enabling hot-plug          : [SUCCESS]
    [SUCCESS]
    mach: module license 'Proprietary' taints kernel.
    Disabling lock debugging due to kernel taint
    Built May 15 2012 at 10:52:34
    *** ntouch_rcu_release.sh script ***
    CMEMK module: built on May 15 2012 at 10:52:14
      Reference Linux version 2.6.37
      File /home/jlarsen/bsp_rcu_new_kernel/davinci1/open/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xc5000000 of size 0x30f8000
    CMEM Range Overlaps Kernel Physical - allowing overlap
    CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x84000000)
    cmemk initialized
    IRQK module: built on May 15 2012 at 10:52:15
      Reference Linux version 2.6.37
      File /home/jlarsen/bsp_rcu_new_kernel/davinci1/open/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
    irqk initialized
    EDMAK module: built on May 15 2012 at 10:52:14
      Reference Linux version 2.6.37
      File /home/jlarsen/bsp_rcu_new_kernel/davinci1/open/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
    cat9532: Using cat9532 16-bit LED driver at slave address 0x60
    NET: Registered protocol family 10
    modprobe: 'ext/rcu2r.ko': No such device
    *** STARTING APP ****
    app exited..rebooting RCU

    login[995]: root login on 'ttyS0'


    BusyBox v1.15.3 (2012-05-15 09:58:41 MDT) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    ******* .profile script *******
    # ./mt9p031_ccdc_prv_rsz_file
    calling cmem utilities for allocating frame buffIRQK Error: ioctl(): bad command type 0x4d (should be 0xfc)
    ers
    Allocating capture buffers :buf size = 692224
    Got 0x403b4000 from CMEM, phy = 0x87eae000
    Got 0x404f4000 IRQK Error: ioctl(): bad command type 0x4d (should be 0xfc)
    from CMEM, phy =IRQK Error: Unknown ioctl received: -1070314236.
     0x87e05000
    Got 0x40690000 from CMEM, phy = 0x87d5c000
    **********************************************
    4.enumerating media entities
    total number of entities: 0
    **********************************************
    5.enumerating links/pads for entities
    **********************************************
    6. ENABLEing link [tvp7002]----------->[ccdc]
    failed to enable link between tvp7002 and ccdc
    closing all the file descriptors. . .
    closed  media device
    Segmentation fault
    #
    #

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Prabhakar Lad
      Posted by Prabhakar Lad
      on Jul 27 2012 00:45 AM
      Genius4945 points

      Hi,

      You can take only video related from http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git this

      git tree rest all stuff you need to take from the Arago itself.

      Thx,

      --Prabhakar Lad

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Jul 31 2012 17:58 PM
      Prodigy250 points

      Is there any reason that I cant get the resizer to output semi-planar format?  I am using continuous mode.  [MT9P031]--->[CCDC]--->[PRV]--->[RSZ]--->encode (need nv12)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Aug 01 2012 15:33 PM
      Prodigy250 points

      I am now using video stuff from http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git branch mc_opensource_full and the rest of the kernel is arago linux-davinci.  I am getting resizer B output but I cannot seem to make the output from A or B be in the semi-planar format (NV12).  Does this code support this format in continuous mode?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Prabhakar Lad
      Posted by Prabhakar Lad
      on Aug 02 2012 00:02 AM
      Genius4945 points

      Hi,

      Yes it does support NV12 format in continious mode too.

      Thx,

      --Prabhakar Lad

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Aug 02 2012 10:37 AM
      Prodigy250 points

      Thanks for your response.  None of the examples produce NV12 in continuous mode.  I have tried to do it myself.  No matter what format I try and set on the resizer sink or source pad I get the same format which looks like UYVY8.    I can see where it is supported in the kernel code but this code only gets run at the very start of my program somehow.  Is does not get run when I set the resizer up.  Is there any example or description on how to get NV12, in continuous mode, while using both resizers?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Prabhakar Lad
      Posted by Prabhakar Lad
      on Aug 03 2012 00:01 AM
      Genius4945 points

      Hi,

      Please refer this post http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/190773/693090.aspx#693090

      I have attached application over there for NV12 in continuous mode.

      Thx,

      --Prabhakar Lad

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Aug 03 2012 16:05 PM
      Prodigy250 points

      Thanks I have used that application to create mine.  I have another question.  When I try to flip either vertical or horizontal in the resizer the frame freezes.  I get subsequent frames but they rotate through about three frames then start again with the same three frames.  Is this functionality supported?

      Jeremy Larsen

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Prabhakar Lad
      Posted by Prabhakar Lad
      on Aug 06 2012 07:36 AM
      Genius4945 points

      Hi,

      When I try to flip either vertical or horizontal in the resizer the frame freezes.  I get subsequent frames but they rotate through about three frames then start again with the same three frames.  Is this functionality supported?

      From the outset looks like its supported. never tested it though.

      Thx,

      --Prabhakar Lad

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Aug 10 2012 15:33 PM
      Prodigy250 points

      Prabhakar Lad,

      I am trying to upgrade from a 2.6.30 kernel, with early external video drivers (previewer, resizer, h3a,aew from TI), to a 2.6.37 kernel.  These old video drivers are working fine with resizer B and flip horizontal and vertical working.  The reason I want to upgrade is not for better video functionality.  The reason for the upgrade is for better USB support.  The USB in 2.6.30 is unstable and we have tried to find the problem at great lengths and failed.   I would like to know what your suggestion would be to get the USB code working properly.  I have tried updating video to using media controller framework and using kernel 2.6.37, but cant get video working correctly. Flip does not work and I cant get the semi-planar format  correct.   

      I have also tried just using the old (2.6.30) video code in the new kernel but there are so many dependencies between the drivers/media/video/davinci folder and the arch/arm/mach-davinci folder.  This makes it hard to use the old video code, plus there have been changes to v4l2.

      Is there an easy way to get all the benefits of the new kernel but still use my old external video drivers?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Prabhakar Lad
      Posted by Prabhakar Lad
      on Aug 13 2012 08:11 AM
      Genius4945 points

      Hi,

      I have tried updating video to using media controller framework and using kernel 2.6.37, but cant get video working correctly. Flip does not work and I cant get the semi-planar format  correct. 

      Cant get video what is that its failing ? Cant get semi planar format correct

      that is working if I am not wrong. I had posted in my earlier post, that app

      is tested and is working.

      Thx,

      --Prabhakar Lad

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeremy Larsen
      Posted by Jeremy Larsen
      on Aug 13 2012 11:26 AM
      Prodigy250 points

      I cannot get the semi-planar format correct.  I need this format because the image is then encoded.  It produces an image but the format is not correct.  I tried continuous mode.  Would I have better luck in single shot mode?

      Also, if I flip horizontal or vertical (in the resizer) the video stream continues but just cycles through the same three frames.

      My current plan is to us the 2.6.37 kernel but completely replace the video code with the 2.6.30 video code.  This becomes tricky because of the dm365.c file in /arch/arm/mach-davinci is dependent on the new video code.

      Jeremy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    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