This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

capture image from v4l capture driver for DM8127 IPNC

Hi,

i try to capture image using V4L2 capture driver. i insert the module below order.

insmod ti81xxfb.ko vram=0:40M,1:1M,2:1M

insmod ti81xxvo.ko

insmod ti81xxvin.ko.

when i insert the ti81xxfb.ko i am getting error below

ti81xxfb ti81xxfb: failed to allocate framebuffer
ti81xxfb ti81xxfb: failed to allocate fb memory.
ti81xxfb: probe of ti81xxfb failed with error -12

when i insert the ti81xxvo.ko i getting error below

insmod: page allocation failure. order:10, mode:0xd1
Backtrace:
[<c0046ba0>] (dump_backtrace+0x0/0x110) from [<c0356468>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:000000d1 r5:00000001 r4:00000000
[<c0356450>] (dump_stack+0x0/0x1c) from [<c00a2740>] (__alloc_pages_nodemask+0x4c8/0x51c)
[<c00a2278>] (__alloc_pages_nodemask+0x0/0x51c) from [<c00a27ac>] (__get_free_pages+0x18/0x30)
[<c00a2794>] (__get_free_pages+0x0/0x30) from [<bf1b5f88>] (ti81xx_vidout_alloc_buffer+0x40/0xac [ti81xxvo])
[<bf1b5f48>] (ti81xx_vidout_alloc_buffer+0x0/0xac [ti81xxvo]) from [<bf1b80f0>] (ti81xx_vidout_probe+0x35c/0x52c [ti81xxvo])
 r5:c2275400 r4:c2275408
[<bf1b7d94>] (ti81xx_vidout_probe+0x0/0x52c [ti81xxvo]) from [<c020f21c>] (platform_drv_probe+0x20/0x24)
[<c020f1fc>] (platform_drv_probe+0x0/0x24) from [<c020e188>] (driver_probe_device+0xd0/0x190)
[<c020e0b8>] (driver_probe_device+0x0/0x190) from [<c020e2b0>] (__driver_attach+0x68/0x8c)
 r7:c227e400 r6:bf1b9450 r5:c0484bb4 r4:c0484b80
[<c020e248>] (__driver_attach+0x0/0x8c) from [<c020d934>] (bus_for_each_dev+0x50/0x84)
 r7:c227e400 r6:bf1b9450 r5:c020e248 r4:00000000
[<c020d8e4>] (bus_for_each_dev+0x0/0x84) from [<c020dfac>] (driver_attach+0x20/0x28)
 r6:bf1b9450 r5:bf1b94b4 r4:00000000
[<c020df8c>] (driver_attach+0x0/0x28) from [<c020d20c>] (bus_add_driver+0xb4/0x234)
[<c020d158>] (bus_add_driver+0x0/0x234) from [<c020e5e8>] (driver_register+0xb0/0x13c)
[<c020e538>] (driver_register+0x0/0x13c) from [<c020f6c0>] (platform_driver_register+0x4c/0x60)
 r9:c228a000 r8:bf1bd000 r7:00012018 r6:00012008 r5:bf1b94b4
r4:00000000
[<c020f674>] (platform_driver_register+0x0/0x60) from [<bf1bd014>] (ti81xx_vidout_init+0x14/0x34 [ti81xxvo])
[<bf1bd000>] (ti81xx_vidout_init+0x0/0x34 [ti81xxvo]) from [<c003842c>] (do_one_initcall+0xd0/0x1a4)
[<c003835c>] (do_one_initcall+0x0/0x1a4) from [<c009515c>] (sys_init_module+0x9c/0x1bc)
[<c00950c0>] (sys_init_module+0x0/0x1bc) from [<c0042e00>] (ret_fast_syscall+0x0/0x30)
 r7:00000080 r6:00012018 r5:00010000 r4:00000000
Mem-info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:   0
active_anon:846 inactive_anon:25 isolated_anon:0
 active_file:8510 inactive_file:922 isolated_file:32
 unevictable:0 dirty:0 writeback:0 unstable:0
 free:1404 slab_reclaimable:498 slab_unreclaimable:793
 mapped:803 shmem:36 pagetables:409 bounce:0
Normal free:5616kB min:1108kB low:1384kB high:1660kB active_anon:3384kB inactive_anon:100kB active_file:34040kB inactive_file:3688kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:77184kB mlocked:0kB dirty:0kB writeback:0kB mapped:3212kB shmem:144kB slab_reclaimable:1992kB slab_unreclaimable:3172kB kernel_stack:744kB pagetables:1636kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Normal: 8*4kB 12*8kB 3*16kB 4*32kB 3*64kB 4*128kB 4*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 5616kB
9500 total pagecache pages
20480 pages of RAM
1569 free pages
4474 reserved pages
1103 slab pages
3750 pages shared
0 pages swap cached
t81xx_vidout: probe of t81xx_vidout failed with error -12

actually i followed the psp doc TI81XX Video Capture Driver User Guide

please help me to recover this problem

my aim is to capture image and store (temp.jpg) inside ipnc camera through minicom command line

i want to capture image without gui (internet explorer or DCC setup).is it possible?

Thanks and Regards

        Raj M

  • Hi Raj,

     

    I could not get why you want 40MB for FB0. Did you check if you have allocated enough memory in vram so that you could allocate 40MB fro FB0.

     

    insmod ti81xxfb.ko vram=0:40M,1:1M,2:1M

    Regards,

    Brijesh

  • Hi Brijesh,

    Thank u for your response

    when i insert without specify memory also showing the same error

    root@DM8127_IPNC:/opt/ipnc/kermod# insmod ti81xxfb.ko
    root@DM8127_IPNC:/opt/ipnc/kermod# dmesg
    FB: no memory to allocate
    ti81xxfb ti81xxfb: failed to allocate framebuffer
    ti81xxfb ti81xxfb: failed to allocate fb memory.
    ti81xxfb: probe of ti81xxfb failed with error -12

    Regards

      RAJ M

  • Raj,

     

    Can you share your bootargs?

     

    Rgds,

    Brijesh

  • Hi Brijesh,

    This is my bootargs

    setenv bootcmd 'ipnc_ff_init 1;nboot 0x81000000 0 0x280000; bootm';saveenv
    setenv bootargs 'console=ttyO0,115200n8 root=/dev/nfs rw mem=80M vram=4M notifyk.vpssm3_sva=0xBFD00000 rootdelay=3 nfsroot=192.168.1.5:/home/sesha/Projects/install_IPNC_new/Source/ipnc_rdk/target/filesys,nolock eth=00:0C:0C:02:39:1B ip=192.168.1.168 cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk';saveenv

    Regards

      RAJ M

  • Hi Raj,

     

    You have set the vram to 4M, it is just 4MB. can you try increasing it? or remove these setting from the bootargs?

     

    Rgds,

    Brijesh

  • Hi Brijiesh,

    This my new bootargs

    setenv bootargs 'root=/dev/nfs console=ttyO0,115200n8 mem=80M rw notifyk.vpssm3_sva=0xBFD00000 nfsroot=192.168.1.5:/home/sesha/Projects/install_IPNC_new/Source/ipnc_rdk/target/filesys,nolock,tcp ip=192.168.1.168 eth=00:0C:0C:02:39:1B cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk';saveenv

    Still i'm getting the same error

    Regards

      RAJ M

  • Hi Raj,

     

    By default, FB will try to allocate 48MB for the frame buffers, so it is not available, it will fail. Can you add vram=20Mb in bootargs and use only 8MB for the Fb0 while inserting vpss.ko.

     

    Rgds,

    Brijesh

  • Hi Brijesh

    For inserting vpss.ko is it correct?

    before:

    /* load module fb */
        system("insmod ./kermod/vpss.ko  mode=hdmi:1080p-60 sbufaddr=0xbfb00000");

    after:

    /* load module fb */
        system("insmod ./kermod/vpss.ko vram=0:8M,1:1M,2:1M mode=hdmi:1080p-60 sbufaddr=0xbfb00000");

    bootargs:

    setenv bootargs 'console=ttyO0,115200n8 root=/dev/nfs rw mem=80M vram=20M notifyk.vpssm3_sva=0xBFD00000 nfsroot=192.168.1.109:/home/sesha/Projects/Balaji/Source/ipnc_rdk/target/filesys,nolock eth=00:0C:0C:02:39:1B ip=192.168.1.168 cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk';saveenv

    error:

    Unknown parameter `vram'

    insmod: error inserting './kermod/vpss.ko': -1 Unknown symbol in module

    Regards

     RAJ M