Sedat Dilek | 30 Oct 16:34 2010

Wayland with radeon-KMS pageflipping

Hi,

today, I tried to build and setup Wayland according to [1].

I am using a Debian/sid i386 host with ATi/AMD Radeon RV250.
Furthermore, I have an upstream Linux-Kernel (2.6.36-git14) and radeon
DDX from GIT master (up to bf60af5).
Both Kernel + DDX have Alex radeon-KMS pageflipping support from [2] built-in.

# lspci -nnvv | grep "VGA compatible controller"
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon
RV250 [Mobility FireGL 9000] [1002:4c66] (rev 02) (prog-if 00 [VGA
controller])

# grep flip /var/log/Xorg.0.log
[    82.883] (II) RADEON(0): KMS Pageflipping: enabled

My libdrm is 2.4.22 and xorg-server is 1.9.1-rc2 (both from
Debian/experimental repository).

NOTE: Below (see P.S.) I have listed the Wayland-relevant packages
with git-log information.

[1] says in section Modesetting:

"At this point, kernel modesetting is upstream for Intel, AMD and
nVidia chipsets. Most distributions ship with kernel modesetting
enabled by default and will work with Wayland out of the box. The
modesetting driver must also support the page flip ioctl, which only
the intel driver does at this point."
(Continue reading)

Sedat Dilek | 30 Oct 17:08 2010

Re: Wayland with radeon-KMS pageflipping

Just as an addendum:

# udevadm trigger --verbose --subsystem-match=drm --subsystem-match=input
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6/event6
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:03/LNXVIDEO:00/input/input4
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:03/LNXVIDEO:00/input/input4/event4
/sys/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3
/sys/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3/event3
/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input5
/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input5/event5
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DVI-D-1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-LVDS-1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-SVIDEO-1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-VGA-1
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/controlD64
/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input1
/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input1/event1
/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input1/mouse0
/sys/devices/platform/i8042/serio0/input/input0
/sys/devices/platform/i8042/serio0/input/input0/event0
/sys/devices/platform/i8042/serio1/input/input7
/sys/devices/platform/i8042/serio1/input/input7/event7
/sys/devices/platform/i8042/serio1/input/input7/mouse1
/sys/devices/platform/i8042/serio1/serio2/input/input9
/sys/devices/platform/i8042/serio1/serio2/input/input9/event9
/sys/devices/platform/i8042/serio1/serio2/input/input9/mouse2
/sys/devices/platform/pcspkr/input/input2
/sys/devices/platform/pcspkr/input/input2/event2
(Continue reading)

Sedat Dilek | 31 Oct 10:36 2010

Re: Wayland with radeon-KMS pageflipping

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?

- Sedat -

$ echo $DISPLAY
:0.0

$ cd $HOME/src/wayland/wayland/compositor

$ LC_ALL=C ; LIBGL_DRIVERS_PATH=/opt/wayland/lib/dri DISPLAY=:1.0
(Continue reading)

Sedat Dilek | 31 Oct 10:47 2010

Re: Wayland with radeon-KMS pageflipping

Before I forget, I switched als Window-Manager from KDE4 to Fluxbox to
see if the WM has influence on Wayland.

Here is what I see in VT-1 from where I started X via startx command
(I always bootup into runlevel-3):

Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
Failed to read: session.screen0.slit.acceptKdeDockapps
Setting default value
Failed to read: session.screen0.slit.autoHide
Setting default value
Failed to read: session.screen0.slit.maxOver
Setting default value
Failed to read: session.screen0.slit.placement
Setting default value
Failed to read: session.screen0.slit.alpha
(Continue reading)

Peter Clifton | 31 Oct 15:21 2010
Picon
Picon

Re: Wayland with radeon-KMS pageflipping

On Sun, 2010-10-31 at 10:36 +0100, Sedat Dilek 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.

Taking a guess, I think this is the same problem I hit. wayland isn't
checking and exiting after it fails to successfully initialize EGL /
some other resource, and continuing on blindly - hence the segfault.

In my case, it was because mesa was compiled without --disable-gallium

That was REQUIRED for me to get it working.. just deleting the gallium
EGL modules to leave the DRI2 ones was not enough. (There might have
been GLES drives which picked up gallium of course, as I didn't delete
anything there).

I can get the compositor running, but all my clients quit as I've got a
problem with xkb maps not being found / compiled properly with
my /usr/local installed libxkbcommon.

--

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
(Continue reading)

Sedat Dilek | 31 Oct 15:32 2010

Re: [Mesa-dev] Wayland with radeon-KMS pageflipping

On Sun, Oct 31, 2010 at 3:21 PM, Peter Clifton <pcjc2 <at> cam.ac.uk> wrote:
> On Sun, 2010-10-31 at 10:36 +0100, Sedat Dilek 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.
>
> Taking a guess, I think this is the same problem I hit. wayland isn't
> checking and exiting after it fails to successfully initialize EGL /
> some other resource, and continuing on blindly - hence the segfault.
>
> In my case, it was because mesa was compiled without --disable-gallium
>
> That was REQUIRED for me to get it working.. just deleting the gallium
> EGL modules to leave the DRI2 ones was not enough. (There might have
> been GLES drives which picked up gallium of course, as I didn't delete
> anything there).
>
>

Which gfxcard is that?

[1] says for Intel gfxcards:

"If you're using an intel chipset, it's best to also pass
--disable-gallium to ./configure, since otherwise libEGL will try to
load the gallium sw rasterizer before loading the Intel DRI driver."
(Continue reading)

Peter Clifton | 31 Oct 15:42 2010
Picon
Picon

Re: Wayland with radeon-KMS pageflipping

On Sun, 2010-10-31 at 15:32 +0100, Sedat Dilek wrote:
> On Sun, Oct 31, 2010 at 3:21 PM, Peter Clifton <pcjc2 <at> cam.ac.uk> wrote:
> > On Sun, 2010-10-31 at 10:36 +0100, Sedat Dilek wrote:
> >> I made a 2nd wayland build:
> >>
> >
> > In my case, it was because mesa was compiled without --disable-gallium
> >
> > That was REQUIRED for me to get it working.. just deleting the gallium
> > EGL modules to leave the DRI2 ones was not enough. (There might have
> > been GLES drives which picked up gallium of course, as I didn't delete
> > anything there).
> >
> >
> 
> Which gfxcard is that?

It was intel. Hmm.. you? 

> [1] says for Intel gfxcards:
> 
> "If you're using an intel chipset, it's best to also pass
> --disable-gallium to ./configure, since otherwise libEGL will try to
> load the gallium sw rasterizer before loading the Intel DRI driver."
> 
> What does this mean in general? Do NOT build and use swrast?

All I read was not to use Gallium, as there is a _specific_ DRI2 EGL
driver which Wayland wants to use. IE.. any Gallium is bad. I might be
wrong though.
(Continue reading)


Gmane