<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OpenGL use without a display on a imx6 processor in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-use-without-a-display-on-a-imx6-processor/m-p/392952#M57361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have not see any discrepancy on the initialization code or your kernel config I guess, You can write your application to target EGL, and it can be run without the presence of a window manager or even a compositor. To do so, you would call eglGetDisplay, eglInitialize, eglCreateContext and eglMakeCurrent, EGL accepts both X11 displays and Wayland displays, I think it is not possible for EGL to operate without one. For that propose you should install mesa in your yocto packages. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.mesa3d.org/egl.html" rel="nofollow"&gt;http://www.mesa3d.org/egl.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2015 16:17:19 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2015-09-22T16:17:19Z</dc:date>
    <item>
      <title>OpenGL use without a display on a imx6 processor</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-use-without-a-display-on-a-imx6-processor/m-p/392951#M57360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif;"&gt;Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif;"&gt;In our project we want to use the GPU of a Freescale iMX6Q ARM processor to render an image and then write over a gstreamer pipeline to a VNC server. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;The sequence is as follows:&lt;/P&gt;&lt;OL style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;&lt;LI&gt;Initialize OpenGL&lt;/LI&gt;&lt;LI&gt;For each frame of the video stream:&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;Render Image with OpenGL ES to a texture using a Framebuffer and a Renderbuffer&lt;/LI&gt;&lt;LI&gt;Read Image pixels using glReadPixels()&lt;/LI&gt;&lt;LI&gt;Copy the Image data to the video frame&lt;/LI&gt;&lt;LI&gt;Push frame to the video stream&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;We use Yocto 1.8 as the build-system, and the source code below of the init sequence works on our nitrogen6X-lite prototype board, but not on our headless production board. On the production board we can't initalize a "display": Either with USE_PBUFFER defined or not defined, we get a 0x3003 EGL_BAD_ALLOC Error. We have the vfb kernel module loaded with vfb_enable=1 and the video=vfb kernel options. The dev file /dev/fb0 is created successfully. In yocto, we tried the fsl-image-multimedia-full, image-core and image-core-directfb images both in default mode, and wtih&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14425656348553027 jive_macro_code jive_text_macro" data-renderedposition="324.984375_8_1232_32" jivemacro_uid="_14425656348553027"&gt;&lt;P&gt;DISTRO_FEATURES_remove = " x11 wayland"&lt;/P&gt;&lt;P&gt;DISTRO_FEATURES_append = " directfb"&lt;/P&gt;&lt;/PRE&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;in our conf/local.conf file.&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;&lt;STRONG&gt;How should can we use the GPU of the iMX processor in an embedded Linux settings to render offscreen, without having a display? What are the appropriate Kernel settings? What are the appropriate user-space functions to use?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;Current user-space implementation of the OpenGL init sequence:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14425656723399865" data-renderedposition="501.984375_8_1232_400" jivemacro_uid="_14425656723399865"&gt;&lt;P&gt;EGLDisplay display;&lt;/P&gt;&lt;P&gt;EGLSurface surface;&lt;/P&gt;&lt;P&gt;#ifdef&amp;nbsp; USE_PBUFFER&lt;/P&gt;&lt;P&gt;&amp;nbsp; display = eglGetDisplay(EGL_DEFAULT_DISPLAY);&lt;/P&gt;&lt;P&gt;#else&lt;/P&gt;&lt;P&gt; int fbnum = 0; // fbnum is an integer for /dev/fb0 fbnum = 0&lt;/P&gt;&lt;P&gt; EGLNativeDisplayType native_display = fbGetDisplayByIndex(fbnum);&lt;/P&gt;&lt;P&gt; EGLNativeWindowType native_window = fbCreateWindow(native_display, 0, 0, 0, 0);&lt;/P&gt;&lt;P&gt; display = eglGetDisplay(native_display);&lt;/P&gt;&lt;P&gt;#endif&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (display == EGL_NO_DISPLAY) {&lt;/P&gt;&lt;P&gt; g_print("Unable to open connection to Window system: 0x%x\n",eglGetError());&lt;/P&gt;&lt;P&gt; return 0; // &amp;lt;-- Point of failure, both with and without USE_PBUFFER set&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;// ...&lt;/P&gt;&lt;P&gt;if (!eglInitialize(display, &amp;amp;majorVersion, &amp;amp;minorVersion)) {&lt;/P&gt;&lt;P&gt; g_print("Unable to initialize Display: 0x%x\n",eglGetError());&lt;/P&gt;&lt;P&gt; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;// ...&lt;/P&gt;&lt;P&gt;#ifdef USE_PBUFFER&lt;/P&gt;&lt;P&gt;&amp;nbsp; surface = eglCreatePbufferSurface(display, config, surfaceAttribList); &lt;/P&gt;&lt;P&gt;#else&lt;/P&gt;&lt;P&gt;&amp;nbsp; surface = eglCreateWindowSurface(display, config, native_display, surfaceAttribList);&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;/PRE&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif;"&gt;Extract of the current kernel config, based on 3.14.28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14425657073737978" data-renderedposition="953.984375_8_1232_720" jivemacro_uid="_14425657073737978"&gt;&lt;P&gt;# CONFIG_VGASTATE is not set&lt;/P&gt;&lt;P&gt;# CONFIG_VIDEO_OUTPUT_CONTROL is not set&lt;/P&gt;&lt;P&gt;CONFIG_HDMI=y&lt;/P&gt;&lt;P&gt;CONFIG_FB=y&lt;/P&gt;&lt;P&gt;# CONFIG_FIRMWARE_EDID is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_DDC is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_BOOT_VESA_SUPPORT is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_CFB_FILLRECT=y&lt;/P&gt;&lt;P&gt;CONFIG_FB_CFB_COPYAREA=y&lt;/P&gt;&lt;P&gt;CONFIG_FB_CFB_IMAGEBLIT=y&lt;/P&gt;&lt;P&gt;# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_SYS_FILLRECT=m&lt;/P&gt;&lt;P&gt;CONFIG_FB_SYS_COPYAREA=m&lt;/P&gt;&lt;P&gt;CONFIG_FB_SYS_IMAGEBLIT=m&lt;/P&gt;&lt;P&gt;# CONFIG_FB_FOREIGN_ENDIAN is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_SYS_FOPS=m&lt;/P&gt;&lt;P&gt;# CONFIG_FB_SVGALIB is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_MACMODES is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_BACKLIGHT is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_MODE_HELPERS=y&lt;/P&gt;&lt;P&gt;# CONFIG_FB_TILEBLITTING is not set&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;# Frame buffer hardware drivers&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;# CONFIG_FB_IMX is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_UVESA is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_OPENCORES is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_S1D13XXX is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_TMIO is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_SMSCUFX is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_UDL is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_GOLDFISH is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_VIRTUAL=m&lt;/P&gt;&lt;P&gt;# CONFIG_FB_METRONOME is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_MX3=y&lt;/P&gt;&lt;P&gt;# CONFIG_FB_BROADSHEET is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_AUO_K190X is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_MXS is not set&lt;/P&gt;&lt;P&gt;# CONFIG_FB_SIMPLE is not set&lt;/P&gt;&lt;P&gt;# CONFIG_EXYNOS_VIDEO is not set&lt;/P&gt;&lt;P&gt;# CONFIG_BACKLIGHT_LCD_SUPPORT is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_MXC=y&lt;/P&gt;&lt;P&gt;# CONFIG_FB_MXC_SYNC_PANEL is not set&lt;/P&gt;&lt;P&gt;CONFIG_FB_MXC_EDID=y&lt;/P&gt;&lt;P&gt;# CONFIG_FB_MXC_EINK_PANEL is not set&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 08:44:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenGL-use-without-a-display-on-a-imx6-processor/m-p/392951#M57360</guid>
      <dc:creator>stefan_riesen</dc:creator>
      <dc:date>2015-09-18T08:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL use without a display on a imx6 processor</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-use-without-a-display-on-a-imx6-processor/m-p/392952#M57361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have not see any discrepancy on the initialization code or your kernel config I guess, You can write your application to target EGL, and it can be run without the presence of a window manager or even a compositor. To do so, you would call eglGetDisplay, eglInitialize, eglCreateContext and eglMakeCurrent, EGL accepts both X11 displays and Wayland displays, I think it is not possible for EGL to operate without one. For that propose you should install mesa in your yocto packages. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.mesa3d.org/egl.html" rel="nofollow"&gt;http://www.mesa3d.org/egl.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 16:17:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenGL-use-without-a-display-on-a-imx6-processor/m-p/392952#M57361</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2015-09-22T16:17:19Z</dc:date>
    </item>
  </channel>
</rss>

