The wayland project is using those technologies. Try going trough its sources to see whats going on. And it does work:)<div><br></div><div>BR,</div><div>Slavko<br><br><div class="gmail_quote">On Sun, Jan 9, 2011 at 2:39 PM, Alberich de megres <span dir="ltr">&lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">sorry to insist, but anyone can helpme with my problem?<br>
Or point me to some manual-tutorial about how to setup drm + kms + egl from?<br>
<br>
thanks!<br>
<br>
<br>
On Fri, Dec 31, 2010 at 4:35 PM, Alberich de megres<br>
<div><div></div><div class="h5">&lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;m using:<br>
&gt;<br>
&gt; - libdrm 2.4.23 with nouveau support<br>
&gt; - Mesa from git repo (las update Dec 14th)<br>
&gt; - Nvidia NV43 device (Geforce go 6200/6400)<br>
&gt; - using nouveau<br>
&gt; - kernel 2.6.36 custom with this config:<br>
&gt; graphics support<br>
&gt;  |-&gt; &lt;M&gt; Direct Rendering Manager<br>
&gt;  |-&gt; &lt;M&gt; Low level video output switch controls<br>
&gt;  |-&gt; {*} Support for frame buffer devices<br>
&gt;                 |-&gt;[*] Enable Video Mode Handling Helpers<br>
&gt;                 |-&gt;[*] Enable Tile blitting support<br>
&gt;                 |-&gt; &lt;M&gt; VGA 16-color<br>
&gt;                 |-&gt; [*] Vesa VGA graphics<br>
&gt;  |-&gt; VGA text console<br>
&gt;                 |-&gt; All options built in kernel<br>
&gt;<br>
&gt; modetest says my connector id is 7 so I tried modetest -s 7:1 with this error<br>
&gt; DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument<br>
&gt; Assuming 131072Kb available aperture size<br>
&gt; May lead to reduced performance or incorrect rendering<br>
&gt; get chip id failed; -1<br>
&gt; param 4, val: 0<br>
&gt; failed to alloc buffer: Invalid argument<br>
&gt;<br>
&gt;<br>
&gt; Thanks!!<br>
&gt;<br>
&gt; On Fri, Dec 31, 2010 at 3:41 PM, Chia-I Wu &lt;<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>&gt; wrote:<br>
&gt;&gt; On Fri, Dec 31, 2010 at 10:06 PM, Alberich de megres<br>
&gt;&gt; &lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; sorry to repost again,<br>
&gt;&gt;&gt; but I attached a screenshoot with what happens to me.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; With single buffer, just adding glFlush() and a black clear color i<br>
&gt;&gt;&gt; get the result I want.<br>
&gt;&gt;&gt; But if I change the color, no matter wich, i allways the same get the<br>
&gt;&gt;&gt; screen attached (even with the same color)<br>
&gt;&gt; I am not sure what goes wrong.  You might want to try modeset from<br>
&gt;&gt; libdrm to see if kernel modesetting is working for you (use the -s<br>
&gt;&gt; option).  It might also be helpful to list your<br>
&gt;&gt; hardware/kernel/mesa/drm versions so that others with a similar<br>
&gt;&gt; environment may help.<br>
&gt;&gt;<br>
&gt;&gt;&gt; thanks!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Fri, Dec 31, 2010 at 12:32 PM, Alberich de megres<br>
&gt;&gt;&gt; &lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; Oh, sorry for the type, i was trying different clear color and at the<br>
&gt;&gt;&gt;&gt; end I didn&#39;t change it back.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; But on wayland the server doesn&#39;t call glFlush. How it render/draws<br>
&gt;&gt;&gt;&gt; the background then?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Also I tried drmModePageFlip, to change buffers, but i cannot get rid<br>
&gt;&gt;&gt;&gt; of these wierd things (like lots of thin columns).<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; thanks!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Fri, Dec 31, 2010 at 10:11 AM, Chia-I Wu &lt;<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt; On Thu, Dec 30, 2010 at 2:26 AM, Alberich de megres<br>
&gt;&gt;&gt;&gt;&gt; &lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt; I found my error, I compiled a kernel and forgot some kms options. So<br>
&gt;&gt;&gt;&gt;&gt;&gt; now i can get a DRMDisplay<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; But, now I got a different problem:<br>
&gt;&gt;&gt;&gt;&gt;&gt; I can set a mode, using drm. And I set up the minimun so i should be<br>
&gt;&gt;&gt;&gt;&gt;&gt; able to clean the backgound (or the buffer) to white and see the<br>
&gt;&gt;&gt;&gt;&gt;&gt; screen on white. But what i really get is weird things like lots of<br>
&gt;&gt;&gt;&gt;&gt;&gt; columns...<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Is there some place where i can read about drm+egl? My init code is<br>
&gt;&gt;&gt;&gt;&gt;&gt; barely copy+paste from wayland..<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I attached the code, don&#39;t blame me for the code (copy+paste stuff)<br>
&gt;&gt;&gt;&gt;&gt;&gt; i&#39;m only trying to understand how drm+egl works so i can create one by<br>
&gt;&gt;&gt;&gt;&gt;&gt; my own.<br>
&gt;&gt;&gt;&gt;&gt; Since you are rendering to rbo[0], you should use fb_id[0] in<br>
&gt;&gt;&gt;&gt;&gt; drmModeSetCrtc.  You also need to call glFlush at the end of<br>
&gt;&gt;&gt;&gt;&gt; draw_scene.  The clear color is black, not white as you said.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; These should be enough to see the correct result on screen.  But you<br>
&gt;&gt;&gt;&gt;&gt; might want to go further to implement double buffering (switch between<br>
&gt;&gt;&gt;&gt;&gt; rbo[0] and rbo[1], and flip between fb_id[0] and fb_id[1]).<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; thanks!<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On Mon, Dec 20, 2010 at 1:55 PM, Chia-I Wu &lt;<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Tue, Dec 14, 2010 at 5:24 PM, Alberich de megres<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; &lt;<a href="mailto:alberich2k5@gmail.com">alberich2k5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi !!<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I got a problem while initializing egl, using the source on git repo:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; git clone git://<a href="http://anongit.freedesktop.org/mesa/mesa" target="_blank">anongit.freedesktop.org/mesa/mesa</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; So what i do is first<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; display = (EGLDisplay) eglGetDRMDisplayMESA(fd);<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; if (display == NULL) return -1;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; if (!eglInitialize(display, &amp;major, &amp;minor)) {<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ... error check<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; When I do that i receive a message:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; libEGL warning: failed to create DRM screen<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; And sometimes i get this other on the same point:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; libEGL warning: failed to create DRM screen<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; libEGL warning: EGL-DRI2: malformed or no PCI ID<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I tried with both nourveau modeset=1, and radeon modeset=1<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I compiled libdrm with the following options:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ./configure --enable-nouveau-experimental-api --enable-vmwgfx-experimental-api<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; And mesa with the following:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ./configure --with-dri-drivers=nouveau --enable-glx-tls<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --with-driver=dri --enable-xcb --disable-glut  --enable-egl<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --enable-gles2 --with-egl-platforms=drm --disable-gallium<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Also i tried those recomended on wayland site:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ./configure  --enable-egl --enable-gles2<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can any one point me some light?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; The configure options look fine.  It is not clear what might have gone<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; wrong.  Can you try again with EGL_LOG_LEVEL=debug set?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; thanks!<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Albert<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; mesa-users mailing list<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:mesa-users@lists.freedesktop.org">mesa-users@lists.freedesktop.org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-users</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; olv@LunarG.com<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt; olv@LunarG.com<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; olv@LunarG.com<br>
&gt;&gt;<br>
&gt;<br>
_______________________________________________<br>
mesa-users mailing list<br>
<a href="mailto:mesa-users@lists.freedesktop.org">mesa-users@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Slavko Glamočanin<br><a href="http://naprave.net">http://naprave.net</a><br>GSM: 0038631847589<br>
</div>