iMX6 solo weston simple egl run error

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX6 solo weston simple egl run error

Jump to solution
1,520 Views
xiongweihuang
Contributor III

Hi all

I get package gpu-viv-bin-mx6q-3.10.17-1.0.0-beta-hfp.bin from Freescale · GitHub yocto project

And make my own buildroot system from liyaoshi/buildroot · GitHub

I have made it run under a custom  iMX6 solo board

I can run weston and weston-flower ,weston-terminal on my board now , But

When I try to get weston simple egl demo run on my board . I get Segmentation fault

My question ,

Do gpu-viv-bin-mx6q-3.10.17-1.0.0-beta-hfp.bin this package only support iMX6D and iMX6Q that with VIVANTE gc2000 core ?

If yes .

Do you have package driver for iMX6 Dual lite and solo that with gc880 core ? where can I get it ?

Thanks and regards

Xiongwei

0 Kudos
1 Solution
126 Views
xiongweihuang
Contributor III

Update information

Today I try to use kernel from 3.10.17 ,and seems this will be the right way

current Kernel 3.10,31 from freescale git is NOT compatible with gpu-viv-bin-mx6q-3.10.17-1.0.0-hfp.bin

So ,this might be the conclusion.

I will use 3.10.17 GA  kernel


BTW ,Do FSL have plan update GPU driver to support newer version  ?

View solution in original post

0 Kudos
5 Replies
126 Views
jonathanolson
Contributor II

The /dev/galcore driver in Linux 3.14 expects a driver argument like the following for the IOCTL_GCHAL_INTERFACE ioctl.

typedef struct _DRIVER_ARGS

{

    gctUINT64               InputBuffer;

    gctUINT64               InputBufferSize;

    gctUINT64               OutputBuffer;

    gctUINT64               OutputBufferSize;

}

DRIVER_ARGS;

Each InputBuffer and OutBuffer must be a gcsHAL_INTERFACE type which currently has a size of 248 bytes.   To verify what the current iMX6Q libGAL.so is passing to the kernel I set a breakpoint on the first call to ioctl() when querying the interface parameters.  On inspecting the $r2 ioctl argument, the current iMX6Q GPU drivers are passing a DRIVER_ARGS which contains 32-bit values, not the gcfUINT64 values expected by the 3.14 kernel.  In addition, the size of the gcsHAL_INTERFACE parameters was apparently 128 bytes at the time the iMX6Q GPU driver was compiled.

(gdb) info registers

r0             0xffffffe7 4294967271

r1             0x7530 30000

r2             0x7efef7fc 2130638844

r3             0x14008 81928

r4             0x76fb9ee8 1996201704

r5             0x7530 30000

r6             0x2710 10000

r7             0x80 128

r8             0x7efef838 2130638904

r9             0x1 1

r10            0xaaa22a22 2862754338

r11            0xffffffff 4294967295

r12            0x76fb692c 1996187948

sp             0x7efef7f0 0x7efef7f0

lr             0x76fa7fec 1996128236

pc             0x76eb0bec 0x76eb0bec <ioctl+12>

cpsr           0x200e0030 537788464

(gdb) x/8x $r2

0x7efef7fc: 0x7efef838 0x00000080 0x7efef838 0x00000080

0x7efef80c: 0x00024078 0x00022930 0x00000000 0x0002407c

Please, Freescale could you rebuild these drivers to support the current 3.14 kernel!

Regards,

Jonathan

0 Kudos
127 Views
xiongweihuang
Contributor III

Update information

Today I try to use kernel from 3.10.17 ,and seems this will be the right way

current Kernel 3.10,31 from freescale git is NOT compatible with gpu-viv-bin-mx6q-3.10.17-1.0.0-hfp.bin

So ,this might be the conclusion.

I will use 3.10.17 GA  kernel


BTW ,Do FSL have plan update GPU driver to support newer version  ?

View solution in original post

0 Kudos
126 Views
xiongweihuang
Contributor III

Hi all

update information

When I use weston with EGL  I get error

And from strace log

open("/dev/fb0", O_RDWR)                = 12

ioctl(12, FBIOGET_VSCREENINFO, 0xa57624) = 0

ioctl(12, FBIOGET_CONTRAST or FBIOPUT_VSCREENINFO, 0xa57624) = 0

ioctl(12, FBIOGET_VSCREENINFO, 0xa57624) = 0

ioctl(12, FBIOGET_FSCREENINFO or FBIOPUT_CONTRAST, 0xa575e0) = 0

mmap2(NULL, 1536000, PROT_READ|PROT_WRITE, MAP_SHARED, 12, 0) = 0x7698f000

rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], 0}, 8) = 0

rt_sigaction(SIGFPE, {0x76f24d0c, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0

futex(0x76f4e424, FUTEX_WAKE_PRIVATE, 2147483647) = 0

open("/dev/galcore", O_RDWR)            = 13

ioctl(13, 0x7530, 0x7e954628)           = -1 ENOTTY (Inappropriate ioctl for device)

ioctl(13, 0x7530, 0x7e954600)           = -1 ENOTTY (Inappropriate ioctl for device)

--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xd4} ---

+++ killed by SIGSEGV +++

Segmentation fault

#

I get gpu package from http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/gpu-viv-bin-mx6q-3.10.17-1.0.0-hfp.bin and kernel based on freescale git tree of branch remotes/origin/imx_3.10.31_1.1.0_alpha

Any help would be appreciate

Regards

0 Kudos
126 Views
xiongweihuang
Contributor III

update information

I test same code on iMX6Q with gc2000 core ,and for more simply case, I use libEGL-fb.so and test with vv_launcher

but unfortunately I got same code error

strace log shows the ioctl error

open("/usr/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0D)\0\0004\0\0\0"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=379514, ...}) = 0

close(3)                                = 0

munmap(0x76fce000, 18206)               = 0

rt_sigaction(SIGINT, {0x76ef046c, [], SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|0x4000000}, {SIG_DFL, [], 0}, 8) = 0

rt_sigaction(SIGQUIT, {0x76ef046c, [], SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|0x4000000}, {SIG_DFL, [], 0}, 8) = 0

rt_sigaction(SIGTERM, {0x76ef046c, [], SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|0x4000000}, {SIG_DFL, [], 0}, 8) = 0

open("/dev/fb0", O_RDWR)                = 3

ioctl(3, FBIOGET_VSCREENINFO, 0x41a1cc) = 0

ioctl(3, FBIOGET_CONTRAST or FBIOPUT_VSCREENINFO, 0x41a1cc) = 0

ioctl(3, FBIOGET_VSCREENINFO, 0x41a1cc) = 0

ioctl(3, FBIOGET_FSCREENINFO or FBIOPUT_CONTRAST, 0x41a188) = 0

mmap2(NULL, 1536000, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x76b75000

rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], 0}, 8) = 0

rt_sigaction(SIGFPE, {0x76eec854, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0

futex(0x76f1568c, FUTEX_WAKE_PRIVATE, 2147483647) = 0

open("/dev/galcore", O_RDWR)            = 4

ioctl(4, 0x7530, 0x7eb6b940)            = -1 ENOTTY (Inappropriate ioctl for device)

ioctl(4, 0x7530, 0x7eb6b918)            = -1 ENOTTY (Inappropriate ioctl for device)

--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xd4} ---

+++ killed by SIGSEGV +++

Segmentation fault

I use kernel from http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.10.31_1.1.0_alpha

And gpu driver from http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/gpu-viv-bin-mx6q-3.10.17-1.0.0-hfp.bin

Toolchain and libc from http://releases.linaro.org/13.11/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-20...

Regards

Xiongwei

0 Kudos
126 Views
jamesbone
NXP TechSupport
NXP TechSupport

Bio_TICFSL, please give a comment

0 Kudos