i.Mx6 Vivante EGL: fbcreatewindow - how bind windowsurface to a particular framebuffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.Mx6 Vivante EGL: fbcreatewindow - how bind windowsurface to a particular framebuffer

跳至解决方案
14,359 次查看
AshokKumarReddy
Contributor I

Hi

In imx6, vivante has provided the graphics driver and implemented few EGL extension/wrapper files in vivante.h file.

For creating display and window, custom functions fbcreatedisplay and fbcreatewindow are used. When we create using these functions, the surface created seem to be bind to /dev/fb0.
We need to find a way to bind a surface to a different framebuffer like fb1, fb2 etc.

In imx53 and also in many other general implementations, eglcreatewindowsurface is used for the same as below:

eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, open("/dev/fb0",
O_RDWR), NULL);

But in imx6 we find that this call though it does not give any error does not have any effect or any visual output for any framebuffer (even for fb0).

So how do we bind a particular surface to a framebuffer using EGL APIs or vivante APIs?

Thanks,

Ashok

标记 (2)
1 解答
5,416 次查看
Philip_FSL
Contributor IV

With MX6 selection of the framebuffer device bound to EGL is done as follows:

EGLNativeDisplayType   native_display  = fbGetDisplayByIndex(fbnum); // fbnum is an integer for /dev/fb1 fbnum = 1.

EGLNativeWindowType  native_window  = fbCreateWindow(native_display, 0, 0, 0, 0);

EGLDisplay                   egldisplayGL   = eglGetDisplay(native_display);

eglInitialize(egldisplayGL, NULL, NULL);

...

Philip

在原帖中查看解决方案

3 回复数
5,417 次查看
Philip_FSL
Contributor IV

With MX6 selection of the framebuffer device bound to EGL is done as follows:

EGLNativeDisplayType   native_display  = fbGetDisplayByIndex(fbnum); // fbnum is an integer for /dev/fb1 fbnum = 1.

EGLNativeWindowType  native_window  = fbCreateWindow(native_display, 0, 0, 0, 0);

EGLDisplay                   egldisplayGL   = eglGetDisplay(native_display);

eglInitialize(egldisplayGL, NULL, NULL);

...

Philip

5,416 次查看
konstantynproko
Contributor III

Hello Philip,

Sorry to bother you. I'm trying to follow your guideline about initializing EGL display using framebuffer:

EGLNativeDisplayType   native_display  = fbGetDisplayByIndex(fbnum);

the return parameter is always NULL for both 0 and 1 fb numbers. I've got /dev/fb0 and /dev/fb1

Could you help please what should i check in this case.

Thanks

Regards,

Konstantyn

0 项奖励
回复
5,416 次查看
sudiptasubudhi
Contributor III

Hi,

Sorry to dig an older thread.

I am trying to bind /dev/fb1 to EGL. so, i am replacing the fbnum parameter with "1". In my device /dev/fb1 is used as overlay framebuffer.when, i am running the sample, no graphics is displayed on the screen unlike the case with fbnum as "0".

Kindly help me with this.

With Regards,

Sudlin

0 项奖励
回复