i.MX53, Linux 4.9 and Etnaviv

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX53, Linux 4.9 and Etnaviv

4,549 Views
Maddis
Contributor IV

We have i.MX53 based custom HW and so far we have been using 2.6 - series kernel since that was the last officially supported one.

I noticed that that Yocto 2.2 have support for i.MX53 and kernel 4.9 has the Etnaviv opensource graphics driver too.

So, I compiled our image for imx53qsb, that has 1024x768 lvds - display because it was the quickest way to get image up and running. I got system up and running and graphics are working. Only thing is that Wayland/Weston is sloooow. I don't think there is any acceleration going on. If I even try to move mouse the weston cpu-usage goes to 60-95% and cursor barely moves.

The HW is capable to handle the display because we have similar size(in resolution) display in our product and it works way faster with older kernel/drivers.

Have anyone have better luck with i.MX53 and Etnaviv?

Labels (4)
42 Replies

1,398 Views
alexberenshtein
Contributor III

Hi Otavio.

We use very old project , which the base on old system , i.mx53-loco , kernel-2.6.35 , Yocto-1.8, X11-server & application. Many   application works with X11-server. GPU is working.

We try update this board , we try to build system which base on last Yocto version ( 2.5 , 2.6 ...), Kernel minimum version 4.19 . But we have a problem with GPU configuration. One step run application with GPU .

Best regards.    

0 Kudos

1,398 Views
OtavioSalvador
Senior Contributor II

For the project, do you wish to use X11?

We had success using Freedreno with EGLFS (under Qt5) for a customer.

1,398 Views
burakaydin
Contributor II

Hi Otavio,

Thanks for your reply. Any guidance (yocto or buildroot) for using GPU acceleration with new kernels is highly appreciated. We are stuck with the kernel 2.6.35 for GPU usage.   

Best Regards,

Burak 

0 Kudos

1,398 Views
OtavioSalvador
Senior Contributor II

burakaydin‌ we use Yocto Project, as this is what provides us more value but it does not depend on the build system so either works.

0 Kudos

1,398 Views
OtavioSalvador
Senior Contributor II

Sure Alex, we did some projects using mainline and i.MX53.

It all goes down to what is the propose of the project. You can run it successfully with framebuffer.

What is the goal of the project?

1,398 Views
mohamedsarjoond
Contributor III

Hi Otavio,

Could you please share the reference link to start the build for i.MX53.

We have a Custom Board based on i.MX535 , we need to port Qt5.

Our End Application is like its similar to Graphics Recorders where our goal is to create a GUI Application which support chart movement with data trending on the chart and also need to support replay mode.

Please let us know it can be done using this with release.

Thanks,

0 Kudos

1,402 Views
kman_devnull
Contributor I

Hi Mc Maddie,

I noticed you say:

 >> I noticed that that Yocto 2.2 have support for i.MX53 ...

I am a newbie, I am trying to build yocto+iMX53+lvds+qt5+qtwebkit, but when I downloaded yocto2.2 from here I don't see any support/recipes for iMX53 in yocto 2.2 - did I misunderstand what you said?

Please if you could share how to build,

* yocto for iMX53

* with lvds,qt5 support (& if you know qtwebkit as well please)

Many thanks.

0 Kudos

1,402 Views
Maddis
Contributor IV

I was referring to meta-freescale - layer (meta-freescale - Layer containing NXP hardware support metadata ). But it has the same issue as before that kernel for i.MX53 is really old. Based on Chris's msg support for newer kernel should be 'coming soon'.

0 Kudos

1,402 Views
cphealy1
Senior Contributor I

Support for the i.MX53 with the mainline kernel has been good for several releases now.  If one were to use the 5.4 kernel with Mesa 19.3, they would have full OpenGL ES 2.0 HW acceleration using Freedreno in Mesa.  Additionally, HW video decode works correctly with recent kernel, Mesa, and Gstreamer.

0 Kudos

1,402 Views
alexberenshtein
Contributor III

Hi Chris.

I try build system i.MX53 ( qsb-board) with GPU.

I build BSP with Yocto - Rocko , Sumo , Thud , Warrior , Zeus.

I see GPU does not work.

After that I build kernel 5.4 with Yocto - Rocko , Sumo , Thud , Warrior , Zeus.

GPU does not work.

In addition, I see , we have problem with  X11.

I see xorg.conf file ,

Section "Device"
Identifier "i.MX Accelerated Framebuffer Device"
Driver "imx"
Option "fbdev" "/dev/fb0"
# This option only recognized when "mxc_epdc_fb" frame buffer driver in
# use. Values are "RGB565" (default, 16-bit RGB), "Y8" (8-bit gray),
# and "Y8INV" (8-bit gray inverted).
Option "FormatEPDC" "Y8INV"
EndSection
 

, we have problem.

If we change  : Driver "imx" to Driver "fbdev" , Xort is working.

Section "Device"
Identifier "i.MX Accelerated Framebuffer Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
# This option only recognized when "mxc_epdc_fb" frame buffer driver in
# use. Values are "RGB565" (default, 16-bit RGB), "Y8" (8-bit gray),
# and "Y8INV" (8-bit gray inverted).
Option "FormatEPDC" "Y8INV"
EndSection

I think no work GPU accelerator.

Maybe someone launched the GPU on i.MX53.

Best regards. 

1,398 Views
burakaydin
Contributor II

Hi Alex,

I confirm the same faulty configuration about Xorg.conf. The xorg.conf is configured to work with imx-lib which is not supported by community distributions.
In addition the adreno a200 driver gives some errors and seems not working.

I have used FSL community zeus branch which uses kernel 5.1.15-fslc+gcd1d083
My reference board is MACHINE=imx53qsb, DISTRO=fslc-x11

This kernel has the adreno a200 driver included with Jonathan Marek's patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.5.y&id=21af872cd8...

During boot I see below messages about gpu:

[ 1.948931] adreno 30000000.gpu: [drm:adreno_gpu_init] *ERROR* Could not find the GPU powerlevels
[ 1.958117] adreno 30000000.gpu: Could not find a clock rate. Using a reasonable default
[ 1.966982] adreno 30000000.gpu: 30000000.gpu supply vdd not found, using dummy regulator
[ 1.976016] adreno 30000000.gpu: 30000000.gpu supply vddcx not found, using dummy regulator
[ 1.987930] msm msm: bound 30000000.gpu (ops a3xx_ops)
[ 1.993332] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.000063] [drm] No driver support for vblank timestamp query.
[ 2.009711] [drm] Initialized msm 1.4.0 20130625 for msm on minor 0
[ 2.027596] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.034531] [drm] No driver support for vblank timestamp query.
[ 2.042313] imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
[ 2.050418] imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
[ 2.058519] imx-drm display-subsystem: bound disp0 (ops imx_pd_ops)
[ 2.068348] imx-drm display-subsystem: bound 63ff0000.tve (ops imx_tve_ops)

The first error seems not important as I see the new kernel patches of Fabio Estavam
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=89048dd010f00de0fd5129fb... 

Further kernel messages complain about adreno200 device firmware;
[ 19.364633] msm msm: Direct firmware load for qcom/yamato_pm4.fw failed with error -2
[ 19.374312] msm msm: Falling back to syfs fallback for: qcom/yamato_pm4.fw
[ 19.423016] msm msm: [drm:adreno_request_fw] *ERROR* failed to load yamato_pm4.fw

Which I found them with the following patch.
https://lore.kernel.org/linux-arm-msm/20190904112653.22452-1-festevam@gmail.com/


putting the firmware files to /lib/firmware/qcom directory fixes this error messages.

But unfortunately "modetest -c" does not provide any connectors, kmscube and drm test applications do not work.

I have checked further commits about imx53, adreno a200 from kernel 5.1.5 to 5.5 but could not find a solution to fix these issues.
I would appreciate if somebody has achieved enabling of imx53 gpu (adreno a200 driver) with 5.x kernel and share his experience.

Kind Regards,

Burak

0 Kudos

1,398 Views
fabio_estevam
NXP Employee
NXP Employee

Hi,

I managed to get mx53 working with GPU acceralation with mainline.

Please make sure you use a recent Mesa version.

Start with something simple first, like kmscube.

I haven't used X11.

Tested kmscube and Qt5 Cinematic demo.

Regards,

Fabio Estevam

1,398 Views
alexberenshtein
Contributor III

Hi Fabio,

 

How to configure a project ?  My config board is MACHINE=imx53qsb, DISTRO=fslc-x1. Is OK ?  

 We use Yocto "Zeus". In this case - kernel 5.1 ,  Mesa 19.1.6.

 Maybe they need to change DISTRO to "fslc-framebuffer"

 Best Regards.

0 Kudos

1,398 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Alex,

I used Buildroot, not Yocto on my tests.

OtavioSalvador  could probably help with getting the Yocto side to work.

Regards,

Fabio Estevam

1,398 Views
francesco_agost
Contributor I

Hi Fabio, I'm reading this thread because I have some issue with i.MX51. I'm using kernel mainline 5.4, Buildroot 2020.02, Qt5.12. But all qt application works only with linux framebuffer. When I try to launch application using /dev/dri/card0, application fail because it's unable to see display connected. I'm using parallel display, could you help me to find the issue?
This is the output of the application:


QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[ 2880.113129] msm msm: [drm:adreno_request_fw] loaded qcom/yamato_pm4.fw from new location
[ 2880.122871] msm msm: [drm:adreno_request_fw] loaded qcom/yamato_pfp.fw from new location
[I] Pipe Info: (msm_pipe_new:240)
[I] GPU-id: 201 (msm_pipe_new:241)
[I] Chip-id: 0x02000001 (msm_pipe_new:242)
[I] GMEM size: 0x00020000 (msm_pipe_new:243)
no screens available, assuming 24-bit color

Regards,
Francesco Agostini 

0 Kudos

1,398 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Francesco,

Is your LCD working fine with 5.4 kernel? Do you see the Linux logo?

Regards,

Fabio Estevam

0 Kudos

1,398 Views
francesco_agost
Contributor I

Hi Fabio, yes the display is working but I can use it only with LinuxFB, no graphical acceleration by the GPU. There is imx-drm that controls display with display subsystem on IPUv3, and the display on DTS use as endpoint display subsystem. Maybe I need only to configure display for msm/kms but I don't know how to do it.
This is the complete dmesg output about drm
[ 0.799868] adreno 30000000.gpu: [drm:adreno_gpu_init] *ERROR* Could not find the GPU powerlevels
[ 0.808815] adreno 30000000.gpu: Could not find a clock rate. Using a reasonable default
[ 0.817132] adreno 30000000.gpu: 30000000.gpu supply vdd not found, using dummy regulator
[ 0.825488] adreno 30000000.gpu: 30000000.gpu supply vddcx not found, using dummy regulator
[ 0.835442] msm msm: bound 30000000.gpu (ops a3xx_ops)
[ 0.840643] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.847284] [drm] No driver support for vblank timestamp query.
[ 0.854089] [drm] Initialized msm 1.5.0 20130625 for msm on minor 0
[ 0.868029] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.874714] [drm] No driver support for vblank timestamp query.
[ 0.880956] imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
[ 0.888587] imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
[ 0.896118] imx-drm display-subsystem: bound display@di0 (ops imx_pd_ops)
[ 0.903678] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[ 0.960114] Console: switching to colour frame buffer device 40x30
[ 0.982849] imx-drm display-subsystem: fb0: imx-drmdrmfb frame buffer device
[ 0.990043] imx-ipuv3 40000000.ipu: IPUv3EX probed

And this is the dts of our display:

display0: display@di0 {
   compatible = "fsl,imx-parallel-display";
   interface-pix-fmt = "rgb24";
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ipu_disp1>;
   lcd-supply = <&regDispReset>;
   backlight = <&bl>;
   display-timings {
      320x240p60{
         native-mode;
         clock-frequency = <6400000>;
         hactive = <320>;
         vactive = <240>;
         hback-porch = <69>;
         hfront-porch = <18>;
         vback-porch = <12>;
         vfront-porch = <10>;
         hsync-len = <1>;
         vsync-len = <1>;
         hsync-active = <1>;
         vsync-active = <1>;
         de-active = <1>;
         pixelclk-active = <1>;
      };
   };

   port {
      display0_in: endpoint {
         remote-endpoint = <&ipu_di0_disp1>;
      };
   };

};

&ipu_di0_disp1 {
   status = "okay";
   remote-endpoint = <&display0_in>;
};

Regards,
Francesco Agostini 

0 Kudos

1,398 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Francesco,

You can try to run kmscube or Qt5 Cinematic demo to test a GPU accelerated application.

Regards,

Fabio Estevam

0 Kudos

1,398 Views
francesco_agost
Contributor I

Hi Fabio,

Rebuilding buildroot with kmscube and launching it, I got this error:

# kmscube
[ 111.741526] msm msm: [drm:adreno_request_fw] loaded qcom/yamato_pm4.fw from new location
[ 111.750952] msm msm: [drm:adreno_request_fw] loaded qcom/yamato_pfp.fw from new location
no connected connector!
failed to initialize legacy DRM

on sysfs inside /sys/class/drm I have both interfaces: card0(msm-drm) and card1(imx-drm).
Inside card1 directory I have "card1-DPI-1" with all display information and other drm elements, in card0 I have only the default drm subfolder.

drm

|-- card0 -> ../../devices/platform/msm/drm/card0
|-- card1 -> ../../devices/platform/display-subsystem/drm/card1
|-- card1-DPI-1 -> ../../devices/platform/display-subsystem/drm/card1/card1-DPI-1
|-- renderD128 -> ../../devices/platform/msm/drm/renderD128
`-- version

Regards,
Francesco Agostini 

0 Kudos

1,398 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Francesco,

The kmscube version in Buildroot is too old. Please upgrade it to the latest one and run it like this:

# kmscube -D /dev/dri/card1

Regards,

Fabio Estevam

0 Kudos