VPU enable in i.mx8qxp c0 - tool

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

VPU enable in i.mx8qxp c0 - tool

跳至解决方案
1,887 次查看
r_trivedi123
Contributor IV


Hi,

I am working on i.mx8qxpc0 CPU-based custom board.
It is running LF5.10.35_2.0.0 yocto build.

As I have been through the yocto release note for the same BSP and it has GStreamer v4l2h264enc: plugin available, I tried that as well, and check the CPU load, it was 10% only.
However, HD files are taking too much time to get encoded.

Also while using this plugin in the pipeline I tried checking dmesg but was not able to see any logs related to VPU.

I could only see logs while boot up for VPU about the firmware.

My query is how to ensure VPU is being used while encoding?

Is there any tool available?
Are there any driver logs we can enable to verify?
Why HD files are taking longer to get encoded?

Please let me know if any information is required from my side.

Any help would be greatly appreciable.

--

Thanks

标记 (3)
0 项奖励
回复
1 解答
1,766 次查看
r_trivedi123
Contributor IV

Hi @joanxie ,
Update from my end on VPU,

  1. Run CPU in performance mode

    $ echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  2. Enable logs to validate VPU usage
    1. echo "7" > /sys/module/vpu_malone/parameters/vpu_dbg_level_decoder
    2. echo "16384" > /sys/module/vpu_windsor/parameters/vpu_dbg_level_encoder
  3. Check encoding/decoding and its dmesg logs to veryfy RPC
    1. gst-launch-1.0 v4l2src device=/dev/video3 io-mode=dmabuf-import ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)30/1' ! queue ! v4l2h264enc output-io-mode=dmabuf ! v4l2h264dec ! imxvideoconvert_g2d ! queue ! glimagesink render-rectangle='<0, 0, 1024, 768>' &
  4.  

 

 

 

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,767 次查看
r_trivedi123
Contributor IV

Hi @joanxie ,
Update from my end on VPU,

  1. Run CPU in performance mode

    $ echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  2. Enable logs to validate VPU usage
    1. echo "7" > /sys/module/vpu_malone/parameters/vpu_dbg_level_decoder
    2. echo "16384" > /sys/module/vpu_windsor/parameters/vpu_dbg_level_encoder
  3. Check encoding/decoding and its dmesg logs to veryfy RPC
    1. gst-launch-1.0 v4l2src device=/dev/video3 io-mode=dmabuf-import ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)30/1' ! queue ! v4l2h264enc output-io-mode=dmabuf ! v4l2h264dec ! imxvideoconvert_g2d ! queue ! glimagesink render-rectangle='<0, 0, 1024, 768>' &
  4.  

 

 

 

0 项奖励
回复
1,855 次查看
r_trivedi123
Contributor IV

Hi,
Can anyone help in here ?

 

Thanks

 

标记 (3)
0 项奖励
回复
1,877 次查看
r_trivedi123
Contributor IV

Hi @joanxie ,
Thanks for the quick replay.

I tried using test utlis as well but then how do i ensure on VPU usage ?

  • Any dmesg log should be checked ?
  • Any gputop ot top alike utitlity available to monitor VPU load ?

Also why might HD file are taking too long to get encoded if hardware VPU is being used ?

--
Thanks

 

 

0 项奖励
回复
1,823 次查看
joanxie
NXP TechSupport
NXP TechSupport

you can use the command like below to check vpu:

cat /proc/interrupts | grep vpu

0 项奖励
回复
1,862 次查看
r_trivedi123
Contributor IV

Hi @joanxie ,
Ant debug pointer on above ?

 

Thanks

 

0 项奖励
回复
1,880 次查看
joanxie
NXP TechSupport
NXP TechSupport

if you just want to test vpu, one can use unit test directly, the path should be imx-test/test/mxc_v4l2_vpu_test

 

0 项奖励
回复