Wayland with radeon-KMS pageflipping

Sedat Dilek sedat.dilek at googlemail.com
Sun Oct 31 05:43:07 PDT 2010


On Sun, Oct 31, 2010 at 1:28 PM, Sedat Dilek <sedat.dilek at googlemail.com> wrote:
> On Sun, Oct 31, 2010 at 1:06 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>> On Sun, Oct 31, 2010 at 6:30 PM, Sedat Dilek <sedat.dilek at googlemail.com> wrote:
>>> On Sun, Oct 31, 2010 at 10:53 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
>>>> On Sun, Oct 31, 2010 at 5:36 PM, Sedat Dilek <sedat.dilek at googlemail.com> wrote:
>>>>> I made a 2nd wayland build:
>>>>>
>>>>> OK, there is definitely a problem with $DISPLAY,
>>>>> if I use a different one (for example DISPLAY=:1.0), I get "failed to
>>>>> create compositor".
>>>>> If I want to use DISPLAY=:0.0, the error-message is "failed to
>>>>> initialize display" ending with a Segmentation fault.
>>>>>
>>>>> Having a look into dmesg:
>>>>> [   61.979227] lt-compositor[1702]: segfault at 30 ip 0804db9e sp
>>>>> bf8d2bd0 error 4 in lt-compositor[8048000+a000]
>>>>>
>>>>> That's saying not much to me.
>>>>>
>>>>> How can I dig deeper into the problem?
>>>>>
>>>>> Use and create packages with debug symbols I guess?
>>>>> For mesa I know there is --debug.
>>>>> Enable debug-build for cairo-gl and wayland?
>>>>>
>>>>> Any suggestions for Linux kernel-config parameters to better debug Wayland?
>>>> If you runs Wayland on X11, it does not talk to the DRM device.  So
>>>> there is no pageflipping required and thus no need to worry about the
>>>> kernel module.
>>>>
>>>> I do not think the classic radeon dri driver (--with-dri-drivers=...)
>>>> has OpenGL ES support.  You are gonna need the gallium one.  IIRC,
>>>> gallium-based dri drivers do not support surfaceless contexts.  You
>>>> cannot use egl_dri2 EGL driver.  So you are more or less stuck with
>>>>
>>>>  - gallium-based radeon driver
>>>>  - gallium-based egl driver (egl_gallium)
>>>>
>>>> Also, you might want to start with the EGL and OpenGL ES demos found
>>>> in mesa/demos repository to make sure your setup is working.
>>>
>>> Hey Chia-I Wu :-),
>>>
>>> nice to see you on Wayland!
>>>
>>> Unfortunately, I did *NOT* hope someone will say use radeon-gallium
>>> r300g/r600g, because r300g is minimum r300-r500.
>>> As I am here on RV250 (r200) there is currently no chance for use
>>> radeon-gallium.
>>>
>>> I have all Wayland stuff with $PREFIX to /opt/wayland.
>>> How can I assure that drivers and other stuff is loaded from there?
>>> I know of the LIBGL_DRIVERS_PATH=/opt/wayland/lib/dri trick, is that enough?
>> That should be enough for egl_dri2 to find the DRI drivers.
>>
>> For r200 to work with Wayland, you need to make sure the driver at
>> least supports the OpenGL ES subset used by Wayland and enable it, and
>> add support for __DRI_IMAGE extension.
>>> Currently, I wanted to avoid a system-installation with PREFIX=/usr.
>>>
>>> But, I can try "gallium-based egl driver".
>>> I do not see a --enable-egl-gallium like --enable-gallium-radeon
>>> (r300g) or --enable-gallium-r600 (r600g) in mesa's configure.ac.
>>>
>>> Q: How to build egl_gallium? Via $STATE_TRACKERS
>> It is by default enabled.  ./configure should give
>>
>>        EGL drivers:     glx dri2
>>        EGL tracker:     yes  <-- this is egl_gallium
>
> Setup #1 (ENanled gallium, better)
>
>
> $ egrep 'EGL drivers|EGL tracker' mesa.log
>        EGL drivers:     glx
>        EGL tracker:     yes
>
> sd at tbox:~/src/wayland$ grep -A5 "git log" mesa.log
> + git log --pretty=short -1
> commit a15cf3cd0b21d593033a3abd2b1788de292001bd
> Author: Tom Stellard <tstellar at gmail.com>
>
>    r300/compiler: Don't clobber presubtract sources during optimizations
> + ./autogen.sh --prefix=/opt/wayland --enable-gallium-radeon
> --enable-gallium-swrast --with-state-trackers=egl --enable-egl
> --enable-gles2
>
> Setup #2 (DISabeled gallium -> NO good)
>
> $ egrep 'EGL drivers|EGL tracker' mesa.log
>        EGL drivers:     glx
>        EGL tracker:     no
>
> $ grep -A5 "git log" mesa.log
> + git log --pretty=short -1
> commit a15cf3cd0b21d593033a3abd2b1788de292001bd
> Author: Tom Stellard <tstellar at gmail.com>
>
>    r300/compiler: Don't clobber presubtract sources during optimizations
> + ./autogen.sh --prefix=/opt/wayland --disable-gallium
> --with-state-trackers=egl --enable-egl --enable-gles2
>
>
> How do you force "EGL drivers:     glx dri2"?
> You have me your autogen line, please?
>

SOLVED !!!

$ grep -i XCB_DRI2 -r mesa/configure.ac
            PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
                          [have_xcb_dri2=yes],[have_xcb_dri2=no])
            if test "$have_xcb_dri2" = yes; then
                DEFINES="$DEFINES -DHAVE_XCB_DRI2"

Missing *libx11-xcb-dev* package!

$ egrep -i 'EGL drivers|EGL tracker|XCB' mesa.log
removed `mesa/configs/linux-dri-xcb'
checking for XCB_DRI2... yes
        Use XCB:         no
        EGL drivers:     glx dri2
        EGL tracker:     no
        Macros:          -D_GNU_SOURCE -DPTHREADS
-DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS
-DHAVE_XCB_DRI2 -DHAVE_LIBUDEV -DUSE_X86_ASM -DUSE_MMX_ASM
-DUSE_3DNOW_ASM -DUSE_SSE_ASM

$ grep -A5 "git log" mesa.log
+ git log --pretty=short -1
commit a15cf3cd0b21d593033a3abd2b1788de292001bd
Author: Tom Stellard <tstellar at gmail.com>

    r300/compiler: Don't clobber presubtract sources during optimizations
+ ./autogen.sh --prefix=/opt/wayland --disable-gallium
--with-state-trackers=egl --enable-egl --enable-gles2

- Sedat -

>
>>> BTW, can you tell me which GIT versions you have from mesa
>>> libxkbcommon cairo-gl wayland working?
>> All latest except for cairo, which is 147fa7a2.
>>> Thanks in advance.
>>>
>>>
>>> Kind Regards,
>>> - Sedat -
>>>
>>>
>>>>> - Sedat -
>>>>>
>>>>>
>>>>> $ echo $DISPLAY
>>>>> :0.0
>>>>>
>>>>> $ cd $HOME/src/wayland/wayland/compositor
>>>>>
>>>>> $ LC_ALL=C ; LIBGL_DRIVERS_PATH=/opt/wayland/lib/dri DISPLAY=:1.0
>>>>> ./compositor -b ../../backgrounds/dscn1843.jpg
>>>>> failed to create compositor
>>>>>
>>>>> $ LC_ALL=C ; LIBGL_DRIVERS_PATH=/opt/wayland/lib/dri DISPLAY=:0.0
>>>>> ./compositor -b ../../backgrounds/dscn1843.jpg
>>>>> failed to initialize display
>>>>> Segmentation fault
>>>>>
>>>>> $ dmesg | tail -10
>>>>> [   21.151574] Bluetooth: RFCOMM socket layer initialized
>>>>> [   21.151577] Bluetooth: RFCOMM ver 1.11
>>>>> [   21.156060] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
>>>>> [   21.156064] Bluetooth: BNEP filters: protocol multicast
>>>>> [   21.350328] Bluetooth: SCO (Voice Link) ver 0.6
>>>>> [   21.350333] Bluetooth: SCO socket layer initialized
>>>>> [   29.904036] wlan0: no IPv6 routers present
>>>>> [   61.979227] lt-compositor[1702]: segfault at 30 ip 0804db9e sp
>>>>> bf8d2bd0 error 4 in lt-compositor[8048000+a000]
>>>>> [  152.636425] lt-compositor[1768]: segfault at 30 ip 0804db9e sp
>>>>> bf9e7f30 error 4 in lt-compositor[8048000+a000]
>>>>> [  197.229767] lt-compositor[1803]: segfault at 30 ip 0804db9e sp
>>>>> bffb9330 error 4 in lt-compositor[8048000+a000]
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel at lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> olv at LunarG.com
>>>>
>>>
>>
>>
>>
>> --
>> olv at LunarG.com
>>
>


More information about the wayland-devel mailing list