video playback on i.MX6 failes (VPU_DecGetVersionInfo failed)

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

video playback on i.MX6 failes (VPU_DecGetVersionInfo failed)

4,271 Views
Martin1z
Contributor III

When trying to play a video with gestreamer we always received the following error message:

root@freescale ~$ gst-launch filesrc location=/480.avi typefind=true ! aiurdemux ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink

Setting pipeline to PAUSED ...

ERROR: Pipeline doesn't want to pause.

ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Could not initialise X output

Additional debug info:

ximagesink.c(1269): gst_ximagesink_xcontext_get (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:

Could not open display

Setting pipeline to NULL ...

Freeing pipeline ...

root@freescale ~$

All required gstreamer plugins are available and v4lsink is working properly (gst-launch videotestsrc ! mfw_v4lsink).

VPU support is build into kernel properly. From this point there seems to be no problem. All io-control calls are performed correctly.

Firmware files for VPU are also available in corresponding directory (/lib/firmware/vpu).

Video is a H264 coded AVI with no audio. But even MP4 or Mpeg2 streams produce the same result.

After some additional investigations we have discovered following error message during initailization with GST debug zones enabled:

0:00:02.258217669 4008    0x17050 INFO GST_STATES gstbin.c:2497:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully

0:00:02.591283669 4008    0x17050 ERROR vpudec vpudec.c:517:vpudec_core_init: Func VPU_DecGetVersionInfo failed!! with ret 1

0:00:02.591416336  4008 0x17050 INFO GST_STATES gstelement.c:2725:gst_element_change_state:<vpudec0> have FAILURE change_state return

0:00:02.591531003 4008    0x17050 INFO GST_STATES gstelement.c:2302:gst_element_abort_state:<vpudec0> aborting state from READY to PAUSED

0:00:02.591645336 4008    0x17050 INFO GST_STATES gstbin.c:2513:gst_bin_change_state_func:<pipeline0> child 'vpudec0' failed to go to state 3(PAUSED)


I am already going through the source code to find the reason but I am wondering if I am the only one having this problem. The result is the same on latest oneric ubuntu image and the binary FSL image available in the latst BSP (L3.0.35_12.09.01_GA).

BTW: Unfortunatly the required libraries (gstreamer plugins, imx-lib) can not be integrated into a custom ltib image poperly.

Labels (2)
9 Replies

1,597 Views
sergerobert
Contributor I

Hi

I seem to have a problem close to yours.

I try to implement the VPU Bare Metal driver from the imx6 platform SDK on an iMX6 SABRE Smart Device.

I first want to run the embedded unit test, but at initialization, the VPU_GetVersionInfo fails due to a "vpu not initialized" error.

I investigate, but I've not found what is going wrong yet.

0 Kudos

1,597 Views
billgerba
Contributor I

Are you launching from the console, or from inside X? If the former, make sure you first do:

export DISPLAY=:0

and then try your command

0 Kudos

1,597 Views
Martin1z
Contributor III

After using a dirty fix to resolv this situation I am again searching for a proper solution.

The main problem is related to "cpu_vddvpu" which will be disabled on startup. I am not using the anatop bypass option and on bootup I see following debug messages that the internal VPU regulator will be disabled:

regulator_init_complete: VGEN2: disabling

regulator_init_complete: vddpu: disabling

The voltage for this LDO is stilll getting updated by DFVS (cpufreq). And therefore the internal state of the regulator function to get current state (is_pu_enabled()) returns an invalid status which is one source of error for sure.

Additionally cpu_vddvpu is not beeing enabled by VPU driver explicitly. According to the git log there was an implementation to enable this regulator dynaimcally. But the log says that this supply was not stable enough and there is beeing disabled?!

The bypass option for anatop regulator is disabled in the default config (it is disabled in my config, too).

In my current fix I simply leave this regulator on permamently (always_on=1)

Could someone enlight what how to handle vddvpu regulation correctly?

I am still wondering why I am the only one having this problem! :smileysad:

1,597 Views
saurabh_a
Contributor I

Hello Martin,

I am also facing issue in vpu_dev_probe() function where regulator_get(NULL, "cpu_vddvpu") call is failing.

Have you got any idea about the cpu_vddvpu thing till now.It seems it is not related to initial voltage stabilization as I get error message whenever I try re-inserting vpu driver.

0 Kudos

1,597 Views
Martin1z
Contributor III

Hi,

>>I am also facing issue in vpu_dev_probe() function where regulator_get(NULL, "cpu_vddvpu") call is failing.

I think this is caused by the faulty returned status of cpu_vddvpu (is_pu_enabled()).

While trying to power up and down the GPU voltage dynamically I've noticed that the VPU is working properly only ones. There might be required some additional intialization is required. Based on 3.0.25-120901 I have left the always_on workaround in my code.


Have you already applied the latest patches available from freescale (3.0.35-121218)? I have seen that there where some additional changes. Even the controlling the regulators has been added again into VPU driver.

0 Kudos

1,597 Views
LaurenPost
NXP Employee
NXP Employee

Which i.MX6 do you have?  Some do not have a VPU on it and that return code would make sense if you ran on a non-VPU i.MX6.

0 Kudos

1,596 Views
Martin1z
Contributor III

Thanks for your reply. I am running a MX6Q :smileyhappy:.

Yhis error only occurs with latest BSP release (3.0.35). I have an older kernel tree (based on 3.0.15) which is running properly here.

Problem ist that VPU does not seem to be running - isVpuInitialized() in imx-lib always returns false. Firmware is getting loaded to VPU correctly. Maybe there is something broken with PLLs as I see that there are some related changes in git tree?

0 Kudos

1,597 Views
zhenyong_chen
Contributor III

I notice that x display is failed to opened. Are you running through a remote term? You cannot do that to launch a GUI application.

0 Kudos

1,597 Views
Martin1z
Contributor III

Sorry I think my debug output above does not fit to the command I posted. But as I am not using ximagesink but v4lsink this should not be the problem here. Videotestsrc is displayed correctly.

0 Kudos