kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Chakra D
Hi All,

I'm trying to use gst 1.0 in imx_6q platform based board and encountered with the /dev/mxc_vpu error when I use kmssink.

please find the detailed steps[1]

I have inserted CODA module and it got successfully inserted. From the logs of this CODA module insertion i found that codec registered as /dev/video[8-9].

Coda version i'm using is 
 coda 2040000.vpu: Firmware code revision: 46072
 coda 2040000.vpu: Initialized CODA960.

But when called gst-launch-1.0 with the args below, i ended with error

[ERR]   Can't open /dev/mxc_vpu: No such file or directory
[ERR]   IOSystemInit() failure.

May i know will the coda module will create the mxc_vpu driver ? which part of code will create this driver for gstreamer to run ? 

Also im seeing white rectangular screen overlapped on the left side of the video and video playback is very slow.

Not sure what gone wrong...please share if you have any inputs for fixing this issue

Attached the log in the following link:


Regards,
Chakra

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Carlos Rafael Giani

There is no such device in the mainline kernel. This is part of the non-mainline VPU driver from the imx-kerne.

Are you trying to use gstreamer-imx' imxvpudec? With the mainline kernel, you have to use v4l2Nvideodec instead (where N is some number ... just do gst-inspect-1.0 | grep v4l to find it).


On 2017-08-29 19:44, Chakra D wrote:
Hi All,

I'm trying to use gst 1.0 in imx_6q platform based board and encountered with the /dev/mxc_vpu error when I use kmssink.

please find the detailed steps[1]

I have inserted CODA module and it got successfully inserted. From the logs of this CODA module insertion i found that codec registered as /dev/video[8-9].

Coda version i'm using is 
 coda 2040000.vpu: Firmware code revision: 46072
 coda 2040000.vpu: Initialized CODA960.

But when called gst-launch-1.0 with the args below, i ended with error

[ERR]   Can't open /dev/mxc_vpu: No such file or directory
[ERR]   IOSystemInit() failure.

May i know will the coda module will create the mxc_vpu driver ? which part of code will create this driver for gstreamer to run ? 

Also im seeing white rectangular screen overlapped on the left side of the video and video playback is very slow.

Not sure what gone wrong...please share if you have any inputs for fixing this issue

Attached the log in the following link:


Regards,
Chakra


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Jagan Teki
Hi Carlos,

On Tue, Aug 29, 2017 at 11:30 PM, Carlos Rafael Giani
<[hidden email]> wrote:
> There is no such device in the mainline kernel. This is part of the
> non-mainline VPU driver from the imx-kerne.
>
> Are you trying to use gstreamer-imx' imxvpudec? With the mainline kernel,
> you have to use v4l2Nvideodec instead (where N is some number ... just do
> gst-inspect-1.0 | grep v4l to find it).

We're using gst-1.0 not gstreamer-imx and the coda vpu firmware is
from NXP releases. Can't we use this firmware for Mainline Kernel? if
no can you please provide the relevant info.

thanks!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Chakra D
In reply to this post by Carlos Rafael Giani
Hi Carlos,

Thanks for helping out. I have tried using v4l2videodec but could not succeed - it is still throwing error.
Can you help me out in using this v4l2codec driver with gstreamer on main line kernel.

When inserting the CODA driver - i got this error "vpu: loading /lib/firmware/vpu_fw_imx6q.bin failed with error -22". And i could play the video - but it is playing very slowly and has an small rectangular frame. Please see the attached video - captured on the display while playing the video

I have given the following commands - am i missing something ?
# gst-launch-1.0 uridecodebin uri=file:///root/tears_of_steel_1080p.webm ! \
> videoscale ! \
> videoconvert ! \
> video/x-raw,width=1280,height=800,pixel-aspect-ratio=1/1 ! \
> kmssink connector-id=38 driver-name="imx-drm"  sync=false



On Tue, Aug 29, 2017 at 11:30 PM, Carlos Rafael Giani <[hidden email]> wrote:

There is no such device in the mainline kernel. This is part of the non-mainline VPU driver from the imx-kerne.

Are you trying to use gstreamer-imx' imxvpudec? With the mainline kernel, you have to use v4l2Nvideodec instead (where N is some number ... just do gst-inspect-1.0 | grep v4l to find it).


On 2017-08-29 19:44, Chakra D wrote:
Hi All,

I'm trying to use gst 1.0 in imx_6q platform based board and encountered with the /dev/mxc_vpu error when I use kmssink.

please find the detailed steps[1]

I have inserted CODA module and it got successfully inserted. From the logs of this CODA module insertion i found that codec registered as /dev/video[8-9].

Coda version i'm using is 
 coda 2040000.vpu: Firmware code revision: 46072
 coda 2040000.vpu: Initialized CODA960.

But when called gst-launch-1.0 with the args below, i ended with error

[ERR]   Can't open /dev/mxc_vpu: No such file or directory
[ERR]   IOSystemInit() failure.

May i know will the coda module will create the mxc_vpu driver ? which part of code will create this driver for gstreamer to run ? 

Also im seeing white rectangular screen overlapped on the left side of the video and video playback is very slow.

Not sure what gone wrong...please share if you have any inputs for fixing this issue

Attached the log in the following link:


Regards,
Chakra


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

gsteamer_code_issue_video.mp4 (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Nicolas Dufresne-5
Le mardi 05 septembre 2017 à 14:50 +0530, Chakra D a écrit :

> Thanks for helping out. I have tried using v4l2videodec but could not
> succeed - it is still throwing error.
> Can you help me out in using this v4l2codec driver with gstreamer on
> main line kernel.
>
> When inserting the CODA driver - i got this error "vpu: loading
> /lib/firmware/vpu_fw_imx6q.bin failed with error -22". And i could
> play the video - but it is playing very slowly and has an small
> rectangular frame. Please see the attached video - captured on the
> display while playing the video
Without it's firmware, the CODEC cannot work, you'll endup using the
software decoder (which will be too slow). Make sure to install the
firmware file to the reported location.

>
> I have given the following commands - am i missing something ?
> # gst-launch-1.0 uridecodebin
> uri=file:///root/tears_of_steel_1080p.webm ! \
> > videoscale ! \
> > videoconvert ! \
> > video/x-raw,width=1280,height=800,pixel-aspect-ratio=1/1 ! \
> > kmssink connector-id=38 driver-name="imx-drm"  sync=false
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
In reply to this post by Chakra D
On Tue, Sep 5, 2017 at 6:20 AM, Chakra D <[hidden email]> wrote:
> Hi Carlos,
>
> Thanks for helping out. I have tried using v4l2videodec but could not
> succeed - it is still throwing error.
> Can you help me out in using this v4l2codec driver with gstreamer on main
> line kernel.
>
> When inserting the CODA driver - i got this error "vpu: loading
> /lib/firmware/vpu_fw_imx6q.bin failed with error -22". And i could play the

Make sure you select the coda driver as module:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/arch/arm/configs/imx_v6_v7_defconfig?h=for-next&id=a5a56f07c2726cc801efccd23f8df29af04d6d19

Coda needs to successfully get the firmware.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
In reply to this post by Jagan Teki
On Tue, Aug 29, 2017 at 4:05 PM, Jagan Teki <[hidden email]> wrote:

> We're using gst-1.0 not gstreamer-imx and the coda vpu firmware is
> from NXP releases. Can't we use this firmware for Mainline Kernel? if
> no can you please provide the relevant info.

Yes, just use the VPU firmware from the NXP BSP.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
In reply to this post by Chakra D
On Tue, Aug 29, 2017 at 2:44 PM, Chakra D <[hidden email]> wrote:

> Attached the log in the following link:
>
> [1] https://paste.ubuntu.com/25426280/

Checking your log we can see that coda firmware is successfully
retrieved later on.

The /dev/mxc_vpu error should not  happen if you use mainline Gstreamer.

/dev/mxc_vpu is only present in NXP kernel, so it seems your userspace
is still from NXP BSP.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Chakra D
Hi Fabio,

Thanks for helping us out.

We are using gstreamer 1.0 from buildroot and latest linux kernel from mainline ( linux-next ).
We have also set VIDEO_CODA as module while building uImage from mainline kernel.

As you said, VPU firmware is getting loaded from vpu/vpu_fw_imx6q.bin.

We could not figure out what is going wrong, we have followed the steps that are in [1].

And also we could not understand why "mxc_vpu" is throwing error in main line gstreamer ? 
Is there any other configure option that needs to be enabled for gstreamer build ?


Regards,
Chakra

On Tue, Sep 5, 2017 at 9:31 PM, Fabio Estevam <[hidden email]> wrote:
On Tue, Aug 29, 2017 at 2:44 PM, Chakra D <[hidden email]> wrote:

> Attached the log in the following link:
>
> [1] https://paste.ubuntu.com/25426280/

Checking your log we can see that coda firmware is successfully
retrieved later on.

The /dev/mxc_vpu error should not  happen if you use mainline Gstreamer.

/dev/mxc_vpu is only present in NXP kernel, so it seems your userspace
is still from NXP BSP.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
On Tue, Sep 5, 2017 at 2:23 PM, Chakra D <[hidden email]> wrote:
> Hi Fabio,
>
> Thanks for helping us out.
>
> We are using gstreamer 1.0 from buildroot and latest linux kernel from
> mainline ( linux-next ).

What does 'gst-launch-1.0 --version' give you?

Are you sure you are not installing the gstreamer-imx plugins instead?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
Hi Chakra/Jagan,

On Tue, Sep 5, 2017 at 3:55 PM, Fabio Estevam <[hidden email]> wrote:

> On Tue, Sep 5, 2017 at 2:23 PM, Chakra D <[hidden email]> wrote:
>> Hi Fabio,
>>
>> Thanks for helping us out.
>>
>> We are using gstreamer 1.0 from buildroot and latest linux kernel from
>> mainline ( linux-next ).
>
> What does 'gst-launch-1.0 --version' give you?
>
> Are you sure you are not installing the gstreamer-imx plugins instead?

Maybe you can reference to Boundary Devices' Buildroot defconfig where
they put together a GPU/VPU support for their mx6 boards:
https://github.com/boundarydevices/buildroot-external-boundary/blob/2017.08.x/configs/nitrogen6x_qt5_gst1_4.9_defconfig

Their complete post is at:
https://boundarydevices.com/buildroot-2017-08-imx-platforms/

See the Gstreamer pipeline they use here (in the very bottom of the file):
https://github.com/boundarydevices/buildroot-external-boundary/blob/2017.08.x/README.md

Let us know if it works for you.

Regards,

Fabio Estevam
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Chakra D
Hi Fabio,

Thanks for the points. It helped us. We took the reference from
the config provided in the given link - and modified to use the main line kernel.
It worked for us. Once again thanks a lot.

Regards,
Chakra


On Thu, Sep 7, 2017 at 7:08 PM, Fabio Estevam <[hidden email]> wrote:
Hi Chakra/Jagan,

On Tue, Sep 5, 2017 at 3:55 PM, Fabio Estevam <[hidden email]> wrote:
> On Tue, Sep 5, 2017 at 2:23 PM, Chakra D <[hidden email]> wrote:
>> Hi Fabio,
>>
>> Thanks for helping us out.
>>
>> We are using gstreamer 1.0 from buildroot and latest linux kernel from
>> mainline ( linux-next ).
>
> What does 'gst-launch-1.0 --version' give you?
>
> Are you sure you are not installing the gstreamer-imx plugins instead?

Maybe you can reference to Boundary Devices' Buildroot defconfig where
they put together a GPU/VPU support for their mx6 boards:
https://github.com/boundarydevices/buildroot-external-boundary/blob/2017.08.x/configs/nitrogen6x_qt5_gst1_4.9_defconfig

Their complete post is at:
https://boundarydevices.com/buildroot-2017-08-imx-platforms/

See the Gstreamer pipeline they use here (in the very bottom of the file):
https://github.com/boundarydevices/buildroot-external-boundary/blob/2017.08.x/README.md

Let us know if it works for you.

Regards,

Fabio Estevam


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Jagan Teki
On Thu, Sep 21, 2017 at 10:08 PM, Chakra D <[hidden email]> wrote:
> Hi Fabio,
>
> Thanks for the points. It helped us. We took the reference from
> the config provided in the given link - and modified to use the main line
> kernel.
> It worked for us. Once again thanks a lot.

And will share the public link soon.

thanks!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
In reply to this post by Chakra D
Hi Chakra,

On Thu, Sep 21, 2017 at 1:38 PM, Chakra D <[hidden email]> wrote:
> Hi Fabio,
>
> Thanks for the points. It helped us. We took the reference from
> the config provided in the given link - and modified to use the main line
> kernel.
> It worked for us. Once again thanks a lot.

Glad to know you are able to play video on mx6 with mainline kernel
and mainline Gstreamer :-)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: kmssink : Cannot Open /dev/mxc_vpu with Mainline kernel

Fabio Estevam
In reply to this post by Jagan Teki
Hi Jagan,

On Thu, Sep 21, 2017 at 1:40 PM, Jagan Teki <[hidden email]> wrote:
> On Thu, Sep 21, 2017 at 10:08 PM, Chakra D <[hidden email]> wrote:
>> Hi Fabio,
>>
>> Thanks for the points. It helped us. We took the reference from
>> the config provided in the given link - and modified to use the main line
>> kernel.
>> It worked for us. Once again thanks a lot.
>
> And will share the public link soon.

Do you have anything to share? I am facing problems in getting VPU to decode.

Thanks
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel