Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems while playing 1920x1080 videos on mplayer with libvdpau-sunxi #266

Closed
navjotsingh07 opened this issue Jul 5, 2016 · 1 comment

Comments

@navjotsingh07
Copy link

navjotsingh07 commented Jul 5, 2016

Hi
I am working on Olimex A20 Olinuxino-Micro based board and trying to play 1920x1080 video through a serial console command line. I am using mplayer to play the video and debian wheezy 3.4.90+ kernel version; I also installed libvdpau-sunxi and the required libraries, and configured my board to play hardware accelerated videos through cedarx.
The command used to play video is: (Video media info: 20 Mbps, 1920x1080 at 29.970 fps)
mplayer TestVideo1.mp4
The mplayer config file is already been updated to:
vo=vdpau,
vc=ffmpeg12vdpau,ffh264vdpau,ffwmv3vdpau,ffvc1vdpau,

but when I am trying to play the video on my hardware, it shows skipping/jitters in various frames and the playback is not smooth. I am enclosing the link for the video that I tested and shows skipping/jitters. You can easily observe the skipping/jitters at 6-7th seconds and 12-13th seconds of the video:
Link:
http://sendvid.com/zuarix67

Can anyone suggest me what could be the possible reason for this behaviour? or is there any other driver or library needs to be installed? I am new to this kind of development, so need a kick start to find my way.
If you need any other information about my build, I can provide that too.

thanks in advance
Nav

@rellla
Copy link
Member

rellla commented Jul 5, 2016

Nav, this is no linux-sunxi kernel related issue and won't be solved here. Please answer my comment in libvdpau-sunxi issue tracker and provide a log, where the mentioned lines appear.
rellla

@rellla rellla closed this as completed Jul 5, 2016
wens pushed a commit that referenced this issue Jun 8, 2017
split __bpf_prog_run() interpreter into stack allocation and execution parts.
The code section shrinks which helps interpreter performance in some cases.
   text	   data	    bss	    dec	    hex	filename
  26350	  10328	    624	  37302	   91b6	kernel/bpf/core.o.before
  25777	  10328	    624	  36729	   8f79	kernel/bpf/core.o.after

Very short programs got slower (due to extra function call):
Before:
test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 7 PASS
test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 8 PASS
test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 7 PASS
test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 11 PASS
test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 7 PASS
After:
test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 11 PASS
test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 11 PASS
test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 11 PASS
test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 14 PASS
test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 10 PASS

Longer programs got faster:
Before:
test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 20286 20513 PASS
test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 31853 31768 PASS
test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9815 PASS
test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 6 PASS
test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13959 PASS
test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 210 PASS
test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 21724 PASS
test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19118 PASS
After:
test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 19008 18827 PASS
test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 29238 28450 PASS
test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9485 PASS
test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 12 PASS
test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13257 PASS
test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 213 PASS
test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 19389 PASS
test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19583 PASS

For real world production programs the difference is noise.

This patch is first step towards reducing interpreter stack consumption.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
repojohnray pushed a commit to repojohnray/linux-sunxi-4.7.y that referenced this issue Aug 26, 2022
[ Upstream commit 4a2c5b7 ]

There is issue as follows when test f2fs atomic write:
F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th superblock
F2FS-fs (loop0): invalid crc_offset: 0
F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix.
F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix.
==================================================================
BUG: KASAN: null-ptr-deref in f2fs_get_dnode_of_data+0xac/0x16d0
Read of size 8 at addr 0000000000000028 by task rep/1990

CPU: 4 PID: 1990 Comm: rep Not tainted 5.19.0-rc6-next-20220715 linux-sunxi#266
Call Trace:
 <TASK>
 dump_stack_lvl+0x6e/0x91
 print_report.cold+0x49a/0x6bb
 kasan_report+0xa8/0x130
 f2fs_get_dnode_of_data+0xac/0x16d0
 f2fs_do_write_data_page+0x2a5/0x1030
 move_data_page+0x3c5/0xdf0
 do_garbage_collect+0x2015/0x36c0
 f2fs_gc+0x554/0x1d30
 f2fs_balance_fs+0x7f5/0xda0
 f2fs_write_single_data_page+0xb66/0xdc0
 f2fs_write_cache_pages+0x716/0x1420
 f2fs_write_data_pages+0x84f/0x9a0
 do_writepages+0x130/0x3a0
 filemap_fdatawrite_wbc+0x87/0xa0
 file_write_and_wait_range+0x157/0x1c0
 f2fs_do_sync_file+0x206/0x12d0
 f2fs_sync_file+0x99/0xc0
 vfs_fsync_range+0x75/0x140
 f2fs_file_write_iter+0xd7b/0x1850
 vfs_write+0x645/0x780
 ksys_write+0xf1/0x1e0
 do_syscall_64+0x3b/0x90
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

As 3db1de0 commit changed atomic write way which new a cow_inode for
atomic write file, and also mark cow_inode as FI_ATOMIC_FILE.
When f2fs_do_write_data_page write cow_inode will use cow_inode's cow_inode
which is NULL. Then will trigger null-ptr-deref.
To solve above issue, introduce FI_COW_FILE flag for COW inode.

Fiexes: 3db1de0("f2fs: change the current atomic write way")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
jwrdegoede pushed a commit to jwrdegoede/linux-sunxi that referenced this issue Oct 9, 2023
Add various tests to check maximum number of supported programs
being attached:

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  ./test_progs -t tc_opts
  [    1.185325] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  [    1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz
  [    1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns
  [    1.276408] clocksource: Switched to clocksource tsc
  linux-sunxi#252     tc_opts_after:OK
  linux-sunxi#253     tc_opts_append:OK
  linux-sunxi#254     tc_opts_basic:OK
  linux-sunxi#255     tc_opts_before:OK
  linux-sunxi#256     tc_opts_chain_classic:OK
  linux-sunxi#257     tc_opts_chain_mixed:OK
  linux-sunxi#258     tc_opts_delete_empty:OK
  linux-sunxi#259     tc_opts_demixed:OK
  linux-sunxi#260     tc_opts_detach:OK
  linux-sunxi#261     tc_opts_detach_after:OK
  linux-sunxi#262     tc_opts_detach_before:OK
  linux-sunxi#263     tc_opts_dev_cleanup:OK
  linux-sunxi#264     tc_opts_invalid:OK
  linux-sunxi#265     tc_opts_max:OK              <--- (new test)
  linux-sunxi#266     tc_opts_mixed:OK
  linux-sunxi#267     tc_opts_prepend:OK
  linux-sunxi#268     tc_opts_replace:OK
  linux-sunxi#269     tc_opts_revision:OK
  Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230929204121.20305-2-daniel@iogearbox.net
jwrdegoede pushed a commit to jwrdegoede/linux-sunxi that referenced this issue Oct 25, 2023
Add a new test case which performs double query of the bpf_mprog through
libbpf API, but also via raw bpf(2) syscall. This is testing to gather
first the count and then in a subsequent probe the full information with
the program array without clearing passed structs in between.

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  ./test_progs -t tc_opts
  [    1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz
  [    1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns
  [    1.402734] clocksource: Switched to clocksource tsc
  [    1.426639] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  linux-sunxi#252     tc_opts_after:OK
  linux-sunxi#253     tc_opts_append:OK
  linux-sunxi#254     tc_opts_basic:OK
  linux-sunxi#255     tc_opts_before:OK
  linux-sunxi#256     tc_opts_chain_classic:OK
  linux-sunxi#257     tc_opts_chain_mixed:OK
  linux-sunxi#258     tc_opts_delete_empty:OK
  linux-sunxi#259     tc_opts_demixed:OK
  linux-sunxi#260     tc_opts_detach:OK
  linux-sunxi#261     tc_opts_detach_after:OK
  linux-sunxi#262     tc_opts_detach_before:OK
  linux-sunxi#263     tc_opts_dev_cleanup:OK
  linux-sunxi#264     tc_opts_invalid:OK
  linux-sunxi#265     tc_opts_max:OK
  linux-sunxi#266     tc_opts_mixed:OK
  linux-sunxi#267     tc_opts_prepend:OK
  linux-sunxi#268     tc_opts_query:OK            <--- (new test)
  linux-sunxi#269     tc_opts_replace:OK
  linux-sunxi#270     tc_opts_revision:OK
  Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
jwrdegoede pushed a commit to jwrdegoede/linux-sunxi that referenced this issue Oct 25, 2023
Add a new test case to query on an empty bpf_mprog and pass the revision
directly into expected_revision for attachment to assert that this does
succeed.

  ./test_progs -t tc_opts
  [    1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz
  [    1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns
  [    1.412419] clocksource: Switched to clocksource tsc
  [    1.428671] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  linux-sunxi#252     tc_opts_after:OK
  linux-sunxi#253     tc_opts_append:OK
  linux-sunxi#254     tc_opts_basic:OK
  linux-sunxi#255     tc_opts_before:OK
  linux-sunxi#256     tc_opts_chain_classic:OK
  linux-sunxi#257     tc_opts_chain_mixed:OK
  linux-sunxi#258     tc_opts_delete_empty:OK
  linux-sunxi#259     tc_opts_demixed:OK
  linux-sunxi#260     tc_opts_detach:OK
  linux-sunxi#261     tc_opts_detach_after:OK
  linux-sunxi#262     tc_opts_detach_before:OK
  linux-sunxi#263     tc_opts_dev_cleanup:OK
  linux-sunxi#264     tc_opts_invalid:OK
  linux-sunxi#265     tc_opts_max:OK
  linux-sunxi#266     tc_opts_mixed:OK
  linux-sunxi#267     tc_opts_prepend:OK
  linux-sunxi#268     tc_opts_query:OK
  linux-sunxi#269     tc_opts_query_attach:OK     <--- (new test)
  linux-sunxi#270     tc_opts_replace:OK
  linux-sunxi#271     tc_opts_revision:OK
  Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants