Thanks Tarek,
your suggestion works.
Do you run some pipelines in parallel?
I am now using just a pipeline and I put it in PAUSED and then NULL state and then I change the "location" property before PLAYING again.
Anyway if I run 2 instances of my code I run in the same problem.
q1 and q2 are two processes running in parallel, and using different portions of screen.
q1: page allocation failure: order:11, mode:0xd1
[<8003d0dc>] (unwind_backtrace+0x0/0xfc) from [<800b5c5c>] (warn_alloc_failed+0x9c/0x118)
[<800b5c5c>] (warn_alloc_failed+0x9c/0x118) from [<800b6948>] (__alloc_pages_nodemask+0x494/0x6ec)
[<800b6948>] (__alloc_pages_nodemask+0x494/0x6ec) from [<80040434>] (__dma_alloc+0xd4/0x2fc)
[<80040434>] (__dma_alloc+0xd4/0x2fc) from [<80040730>] (dma_alloc_coherent+0x54/0x60)
[<80040730>] (dma_alloc_coherent+0x54/0x60) from [<803b3ba0>] (vpu_alloc_dma_buffer+0x2c/0x64)
[<803b3ba0>] (vpu_alloc_dma_buffer+0x2c/0x64) from [<803b439c>] (vpu_ioctl+0x7c4/0x8c8)
[<803b439c>] (vpu_ioctl+0x7c4/0x8c8) from [<800f69a0>] (do_vfs_ioctl+0x80/0x5e0)
[<800f69a0>] (do_vfs_ioctl+0x80/0x5e0) from [<800f6f38>] (sys_ioctl+0x38/0x60)
[<800f6f38>] (sys_ioctl+0x38/0x60) from [<8003769c>] (__sys_trace_return+0x0/0x24)
Mem-info:
DMA per-cpu:
CPU 0: hi: 90, btch: 15 usd: 88
Normal per-cpu:
CPU 0: hi: 6, btch: 1 usd: 0
active_anon:1139 inactive_anon:9 isolated_anon:0
active_file:3 inactive_file:94 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:46144 slab_reclaimable:274 slab_unreclaimable:1563
mapped:103 shmem:14 pagetables:57 bounce:0
DMA free:160012kB min:1564kB low:1952kB high:2344kB active_anon:948kB inactive_anon:0kB active_file:0kB inactive_file:60kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:186944kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:60kB slab_unreclaimable:140kB kernel_stack:96kB pagetables:4kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:93 all_unreclaimable? yes
lowmem_reserve[]: 0 39 39 39
Normal free:24368kB min:336kB low:420kB high:504kB active_anon:3608kB inactive_anon:36kB active_file:12kB inactive_file:484kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:40384kB mlocked:0kB dirty:0kB writeback:0kB mapped:432kB shmem:56kB slab_reclaimable:1036kB slab_unreclaimable:6128kB kernel_stack:328kB pagetables:224kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 191*4kB 182*8kB 158*16kB 102*32kB 89*64kB 55*128kB 32*256kB 16*512kB 22*1024kB 13*2048kB 16*4096kB 1*8192kB 0*16384kB 0*32768kB = 160012kB
Normal: 502*4kB 581*8kB 416*16kB 207*32kB 54*64kB 5*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 24032kB
315 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
65536 pages of RAM
46031 free pages
11564 reserved pages
1283 slab pages
270 pages shared
0 pages swap cached
Physical memory allocation error!
Physical memory allocation error!
I have strace logs:
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
hwbuf allocator zone(614400) destroied.
[1;34mVS1 destroyed, force=0!
[0mhwbuf allocator zone(462848) destroied.
[INFO] Product Info: i.MX6Q/D/S
[1;32mvpudec versions :smileyhappy:
[0m) = 669
write(1, "\33[1;32m\tplugin: 3.0.5\n\33[0m", 26 [1;32m plugin: 3.0.5
[0m) = 26
write(1, "\33[1;32m\twrapper: 1.0.28(VPUWRAPP"..., 80 [1;32m wrapper: 1.0.28(VPUWRAPPER_ARM_LINUX Build on Apr 12 2013 17:28:04)
[0m) = 80
write(1, "\33[1;32m\tvpulib: 5.4.10\n\33[0m", 27 [1;32m vpulib: 5.4.10
[0m) = 27
write(1, "\33[1;32m\tfirmware: 2.1.8.34588\n\33["..., 34 [1;32m firmware: 2.1.8.34588
[0m) = 34
ioctl(3, VIDIOC_QUERYCAP or VT_OPENQRY, 0x7ec0a878) = -1 EPERM (Operation not permitted)
write(2, "Unable to set the pipeline to th"..., 49Unable to set the pipeline to the playing state.
) = 49
write(1, "[ERR]\tmem allocation failed!\n", 29[ERR] mem allocation failed!
) = 29
it seems that the ioctl VIDIOC_QUERYCAP or VT_OPENQRY fails.
When it works correctly the log is:
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
hwbuf allocator zone(614400) destroied.
[1;34mVS1 destroyed, force=0!
[0mhwbuf allocator zone(462848) destroied.
[INFO] Product Info: i.MX6Q/D/S
[1;32mvpudec versions :smileyhappy:
[0m) = 669
write(1, "\33[1;32m\tplugin: 3.0.5\n\33[0m", 26 [1;32m plugin: 3.0.5
[0m) = 26
write(1, "\33[1;32m\twrapper: 1.0.28(VPUWRAPP"..., 80 [1;32m wrapper: 1.0.28(VPUWRAPPER_ARM_LINUX Build on Apr 12 2013 17:28:04)
[0m) = 80
write(1, "\33[1;32m\tvpulib: 5.4.10\n\33[0m", 27 [1;32m vpulib: 5.4.10
[0m) = 27
write(1, "\33[1;32m\tfirmware: 2.1.8.34588\n\33["..., 34 [1;32m firmware: 2.1.8.34588
[0m) = 34
ioctl(3, VIDIOC_QUERYCAP or VT_OPENQRY, 0x7ec0a878) = 0
mmap2(NULL, 5236743, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0x19000) = 0x2b414000
SYS_288(0x1, 0x1, 0, 0x7ec0a860, 0x194c8) = 0
fcntl64(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(8, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
timer_delete(0x1) = 0
mq_notify(16, ptrace: umoven: Input/output error
{...}) = 9
mq_getsetattr(9, {mq_flags=O_RDONLY|0x10, mq_maxmsg=0, mq_msgsize=0, mq_curmsg=12}, ptrace: umoven: Input/output error
{...}) = 0
SYS_286(0x9, 0x7ec0a658, 0x7ec0a664, 0x10, 0x9) = 0
gettimeofday({265634, 766627}, NULL) = 0
SYS_290(0x9, 0x7ec0a600, 0x14, 0, 0x7ec0a614) = 20
SYS_297(0x9, 0x7ec0a5e4, 0, 0, 0x7ec0a796) = 108
SYS_297(0x9, 0x7ec0a5e4, 0, 0, 0x2) = 20
close(9) = 0
mq_notify(16, ptrace: umoven: Input/output error
{...}) = 9
mq_getsetattr(9, {mq_flags=O_RDONLY|0x10, mq_maxmsg=0, mq_msgsize=0, mq_curmsg=12}, ptrace: umoven: Input/output error
{...}) = 0
SYS_286(0x9, 0x7ec0a628, 0x7ec0a634, 0x10, 0x9) = 0
Yossi I think the interaction that fails with the VPU is ioctl(3, VIDIOC_QUERYCAP or VT_OPENQRY,
where fd 3 is /dev/mxc_vpu
lrwx------ 1 root root 64 Jan 4 02:42 3 -> /dev/mxc_vpu