VPU enable in i.mx8qxp c0 - tool

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VPU enable in i.mx8qxp c0 - tool

Jump to solution
2,041 Views
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

Tags (3)
0 Kudos
Reply
1 Solution
1,920 Views
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.  

 

 

 

View solution in original post

0 Kudos
Reply
6 Replies
1,921 Views
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 Kudos
Reply
2,009 Views
r_trivedi123
Contributor IV

Hi,
Can anyone help in here ?

 

Thanks

 

Tags (3)
0 Kudos
Reply
2,031 Views
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 Kudos
Reply
1,977 Views
joanxie
NXP TechSupport
NXP TechSupport

you can use the command like below to check vpu:

cat /proc/interrupts | grep vpu

0 Kudos
Reply
2,016 Views
r_trivedi123
Contributor IV

Hi @joanxie ,
Ant debug pointer on above ?

 

Thanks

 

0 Kudos
Reply
2,034 Views
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 Kudos
Reply