AnsweredAssumed Answered

ENODEV when executing mmap2 on galcore

Question asked by Marcos Lopez on Jul 24, 2019
Latest reply on Jul 30, 2019 by Bio_TICFSL

I'm trying to configure vivante driver for an mx6 solo with vivante gpu. I compiled the vivante SDK sample: 01_SimpleTriangle (I attached the source and makefile of this triangle example).

 

Also I'm compiling the kernel 4.9.88 which I pulled from yocto according nxp instructions and it is compiling fine. drivers/mxc/gpu-viv is compiled as part of the kernel and not as a separated module.

 

The dtsi gpu node is this:

 

gpu@00130000 {
compatible = "fsl,imx6dl-gpu", "fsl,imx6q-gpu";
reg = <0x00130000 0x4000>, <0x00134000 0x4000>,
<0x10000000 0x0>, <0x0 0x8000000>;
reg-names = "iobase_3d", "iobase_2d",
"phys_baseaddr", "contiguous_mem";
interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>,
<0 10 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "irq_3d", "irq_2d";
clocks = <&clks IMX6QDL_CLK_OPENVG_AXI>, <&clks IMX6QDL_CLK_GPU3D_AXI>,
<&clks IMX6QDL_CLK_GPU2D_CORE>, <&clks IMX6QDL_CLK_GPU3D_CORE>,
<&clks IMX6QDL_CLK_DUMMY>;
clock-names = "gpu2d_axi_clk", "gpu3d_axi_clk",
"gpu2d_clk", "gpu3d_clk",
"gpu3d_shader_clk";
resets = <&src 0>, <&src 3>;
reset-names = "gpu3d", "gpu2d";
power-domains = <&gpc 1>;
};

 

The drm and galcore modules seems to start fine:

[drm] Initialized
[drm] Initialized vivante 1.0.0 20120216 on minor 0

.....

galcore: clk_get vg clock failed, disable vg!
Galcore version 6.2.4.150331
Galcore options:
irqLine = 21
registerMemBase = 0x00130000
registerMemSize = 0x00004000
irqLine2D = 22
registerMemBase2D = 0x00134000
registerMemSize2D = 0x00004000
contiguousSize = 0x08000000
contiguousBase = 0x00000000
externalSize = 0x00000000
externalBase = 0x00000000
bankSize = 0x00000000
fastClear = -1
compression = 15
signal = 48
powerManagement = 1
baseAddress = 0x10000000
physSize = 0x80000000
logFileSize = 0 KB
recovery = 0
stuckDump = 0
gpuProfiler = 0
irqs = -1,
-1, -1,
-1, -1,
-1, -1,
-1, -1,
-1,
registerBases = 0x00000000,
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x00000000, 0x00000000,
0x00000000,
registerSizes = 0x00000800,
0x00000800, 0x00000800,
0x00000800, 0x00000800,
0x00000800, 0x00000800,
0x00000800, 0x00000800,
0x00000800,
chipIDs = 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF,
Build options:
gcdGPU_TIMEOUT = 20000
gcdGPU_2D_TIMEOUT = 20000
gcdINTERRUPT_STATISTIC = 1

 

The problem is when I try to run the 01_SimpleTriangle once it is flashed in the arm target. The program fail in the line 

eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, eglNativeWindow, NULL);

I get error 0x300B (EGL_BAD_NATIVE_WINDOW)

 

The userspace libraries were taken also from yocto (imx-gpu-viv-6.2.4.p1.2-aarch32).

 

If I execute the 01_SimpleTriangle with strace I see this error:

open("/dev/galcore", O_RDWR) = 4
ioctl(4, _IOC(0, 0x75, 0x30, 0x00), 0x7ec94578) = 0
ioctl(4, _IOC(0, 0x75, 0x30, 0x00), 0x7ec94578) = 0
ioctl(4, _IOC(0, 0x75, 0x30, 0x00), 0x7ec94598) = 0
mmap2(NULL, 62914560, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = -1 ENODEV (No such device)

 

Please, someone may help me with this? What are the possible causes of this problem?

 

Thanks for any clue!

 

Marcos.

Attachments

Outcomes