ENODEV when executing mmap2 on galcore

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

ENODEV when executing mmap2 on galcore

1,180 Views
marcosal
Contributor II

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.

0 Kudos
2 Replies

977 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Marcos,

You need to check yocto bsp L4.9.88 based on X11, they whole GPU program run well on that´s version.

Regards

0 Kudos

977 Views
marcosal
Contributor II

I forgot to put the dts fb node:

fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "ldb";
interface_pix_fmt = "RGB24";
default_bpp = <24>;
/*mode_str ="1280x480";*/
int_clk = <0>;
late_init = <1>;
fb_base = <0x18800000>; /* Frame buffer base address, it is same as CONFIG_FB_BASE in Uboot. */
fb_size = <0x00546000>; /* Reserved display memory size, bigger than 3 x framer buffer size. */
status = "okay";
};

I'm not using any x11 or other window manager.

Thanks!

0 Kudos