« Hand-Drawn Holograms | Home | Space Shuttle Landing »

February 2, 2009

Glamo-DRI Development

Quite a bit of pain caused this weekend due to not really understanding OpenEmbedded, but I seem to have got through it.  Otherwise, it's been a reasonably productive weekend.

Mesa now selects the correct driver.  I was slightly misinterpreting the causes of my problems here, concentrating on XF86DRIGetClientDriverName when in fact it's much simpler: AIGLX gets upset if swrast_dri.so isn't available, even if you know that later on it's going to choose myshinyhardware_dri.so.  So, adding that file to the package pulls it back into line.

There was also a segfault due to a slightly strange way that drm.ko has of doing things: a DRM device's unique identifier gets zeroed out by drm_lastclose() even though the unique identifier remains the same right until the DRM device gets deallocated at some point in the distant future.

All of the DRI initialisation pipeline seems to be happy now.  Right now there's a problem with Mesa mapping the framebuffer, which causes it to fall back to software, but otherwise it's looking quite promising.  Hopefully, this indicates the end of the "groundwork" to create a working 3D driver...

[root@rafiki:~]# DISPLAY=:0 LIBGL_DEBUG=verbose glxgears
libGL: XF86DRIGetClientDriverName: 0.1.0 glamo (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/glamo_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID platform:glamo-drm
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports platform:glamo-drm
libGL error: drmMap of framebuffer failed (Invalid argument)
libGL error: reverting to software direct rendering
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
27 frames in 5.1 seconds = 5.281 FPS

Leave a comment