tufty
Posts: 1454
Joined: Sun Sep 11, 2011 2:32 pm

Re: So who's working/worked on an Xorg server?

Fri May 25, 2012 9:55 am

teh_orph wrote:DMA is now hooked up to Xorg...and it actually works. I haven't crashed it yet either! A fair few operations are now being lifted off the CPU. The baby steps continue.
Would it be possible to run xbench and post the results for your dma-enabled X vs the "stock" version? From your accelerated gl/es in X video, it appears that this could be a pretty good "quick fix" for the glacial pace of X "out of the box" (even if there's still / always room for improvement).

Simon

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Fri May 25, 2012 12:18 pm

Not yet I'm afraid ;)
Not because I'm precious of it/making it up/etc but simply because the code is all being run in a very cautious mode at the moment - I'm trying to ensure I get 100% correct rendering versus the classic path rather than trying to make it run as fast as possible. Since I'm using a piece of hardware which has no security on it (once you obtain access to it) I do have the ability to deadlock the pi very easily. Display corruption normally means I'm super-close to a deadlock!

Something to consider is that also many X bench marks are not representative of real use, and some of them test code paths that are not frequently used. There's a good chance I have slowed down some code paths, and I wouldn't want create a bad impression at this stage.

There's also the pixman library that does client-side rendering that consumes a big stack of CPU time. There are some easy wins here I feel and would like to release it all at once!

You mention glacial X performance - which window manager are you using? Some of them really make the pi chug! I'm advocating Window Maker at the moment! Very nippy.

tufty
Posts: 1454
Joined: Sun Sep 11, 2011 2:32 pm

Re: So who's working/worked on an Xorg server?

Fri May 25, 2012 1:44 pm

teh_orph wrote:Not yet I'm afraid ;)
Not because I'm precious of it/making it up/etc but simply because the code is all being run in a very cautious mode at the moment - I'm trying to ensure I get 100% correct rendering versus the classic path rather than trying to make it run as fast as possible.
...
There's also the pixman library that does client-side rendering that consumes a big stack of CPU time. There are some easy wins here I feel and would like to release it all at once!
Yep, that makes a good deal of sense.
teh_orph wrote:You mention glacial X performance - which window manager are you using? Some of them really make the pi chug! I'm advocating Window Maker at the moment! Very nippy.
I'm Pi-free at the moment (and when I get one it won't be seeing linux anyway). I'm also a big fan of windowmaker, especially if you use GNUStep behind it (basically, you get an open source version of NeXTStep / OpenStep, not sure where they are with updating the front end of things, but that's where OSX came from, you're effectively at a half way house between Linux and MacOSX.

Other window managers you might want to consider are Sawfish or IceWM. Both of them are fast.

Simon

tawalker
Posts: 180
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Re: So who's working/worked on an Xorg server?

Mon May 28, 2012 10:16 am

Nice to see a couple of WindowMaker fans here :) I'm running Fluxbox as my WM - it's very responsive and uncluttered, although an accelerated video driver certainly wouldn't hurt...
---
Raspberry Pi Zero W with ZeroStem USB board (2017) ("zero") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: So who's working/worked on an Xorg server?

Mon May 28, 2012 10:41 am

I haven't worried about performance on X for years and usually just use gnome. So I had to go looking for fast&light window managers. I saw jwm was used in puppy and dsl which seemed like a fair recommendation. Now X starts almost instantly and it is quite zippy for the sort of things I want to do. I have a slight overclock and kernel optimised for interactive use which helps. Not overly fussed about X accel at the moment. I will take it if available but it would just be icing on the cake.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Mon May 28, 2012 10:54 am

shirro wrote:I have a slight overclock and kernel optimised for interactive use which helps. Not overly fussed about X accel at the moment. I will take it if available but it would just be icing on the cake.
What's a "kernel optimised for interactive" out of interest? Word on street is that the pre-emptive kernel doesn't work properly for things like the USB driver although I have not tested this myself. Is pre-emptive == "interactive"?

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Tue Jun 05, 2012 11:25 am

Yet another keep-alive to let people know that work continues on this project... I'm now in a tuning/refactoring stage as I'm happy that it works correctly etc. I also have proper instruction-level profiling (courtesy of oprofile) so can finally see what's slow or not!
What's I'm working on next:
- better handling when push buffers run out of space (ie let's have ring buffers instead of linear+rewind to beginning)
- running push buffers in parallel where possible - currently everything's in one monolithic command buffer (this should reduce latency)
- a quick bit of triage on the always-software rendered libfb
- replacing memcpy with something more awesome

Once this work has been done I'll be in a good place to focus on alpha composition, which is important for text rendering.

theHetman
Posts: 88
Joined: Tue Jan 10, 2012 5:42 pm

Re: So who's working/worked on an Xorg server?

Tue Jun 05, 2012 3:17 pm

Excellent work I'm sure that it's not easy where all the delays are and then finding solutions to fixing them. I've been looking at the xlib API this weekend and I see that the graphics commands map pretty closely to OpenVG. Is there any chance of using OpenVG in the server to render lines, shapes and fonts?

I myself have been looking at getting GLES to render in a window. I have been playing with eglCopyBuffers but whatever I do I get a "bad match" error. I'm beginning to think that the function might be stubbed.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: So who's working/worked on an Xorg server?

Tue Jun 05, 2012 6:54 pm

Just spotted this post, and dunno if it would be helpful at all :?:
http://raspberrypi.org/phpBB3/viewtopic ... 068#p89068

theHetman
Posts: 88
Joined: Tue Jan 10, 2012 5:42 pm

Re: So who's working/worked on an Xorg server?

Tue Jun 05, 2012 8:00 pm

Yes, I'm following that thread. I've not looked at that code yet but I will do once I explore OpenVG.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Wed Jun 06, 2012 10:40 am

Wrong place, but quick question: can I connect a Pi to a laptop with an Ethernet twist cable? I'll be on a long flight from London to San Francisco on Friday and hope to bash some assembly out to kill time...
Not sure what I'll do about the display though. VNC?

theHetman
Posts: 88
Joined: Tue Jan 10, 2012 5:42 pm

Re: So who's working/worked on an Xorg server?

Wed Jun 06, 2012 11:19 am

Do you mean a CrossOver cable like this? http://www.ebuyer.com/171259-cablestogo ... k-5m-83539 I don't see why not. I've connected two machines that way before. Obvously you would have to arrange for both the pi and the laptop to have fixed IPs.

On the software side, as I'm a Windows guy, you are more likely to have an idea about what to use than me. I'm stll feeling my way in the Linux/X11 world. I've recently installed Putty and Xming on my Windows box and have had fun playing with them.

User avatar
MattPurland
Posts: 57
Joined: Fri Apr 13, 2012 7:37 pm

Re: So who's working/worked on an Xorg server?

Wed Jun 06, 2012 11:46 am

You probably won't need a crossover cable, most (if not all) modern laptops will do the crossing for you with a standard cable.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Wed Jun 06, 2012 12:47 pm

Cool cheers, I'll make sure to test tonight! Can I take a naked Pi in hand luggage? I could see those x-ray control people eyeballing it!

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Sat Jun 09, 2012 3:15 pm

Points for the highest rpi programming and local network... 39000 feet.
Image
Bizarre camera angle to show that I was on a plane. Rpi is in the Farnell box.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: So who's working/worked on an Xorg server?

Sat Jun 09, 2012 3:45 pm

teh_orph wrote:Rpi is in the Farnell box.
I guess the aircrew would probably get a bit jumpy if they see someone playing with an exposed PCB mid-flight ;)

User avatar
Jim Manley
Posts: 1593
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: So who's working/worked on an Xorg server?

Tue Jun 12, 2012 2:20 am

AndrewS wrote:
teh_orph wrote:Rpi is in the Farnell box.
I guess the aircrew would probably get a bit jumpy if they see someone playing with an exposed PCB mid-flight ;)
Not to mention the neatly-twisted wires extending between the laptop and box/"case". Well, at least now the TSA knows what the twists-per-inch and preferred wire color portions of your bomb-maker signature are, now ;)

"Let's see, should I cut the red, black, or white wire first to defuse the bomb? Damn, I picked the wrong week to stop snorting cocaine!" :D
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

atarian88
Posts: 6
Joined: Mon Jul 09, 2012 5:51 pm

Re: So who's working/worked on an Xorg server?

Mon Jul 09, 2012 5:56 pm

Hi!

It's been a while since the last post in this thread, and I'm curious as to the status of this project. teh_orph, are you starting to get comfortable about releasing the source? I'm sure a lot of people would like to contribute, me included. I'm not that experienced when it comes to x.org development, but I'd like this opportunity to learn and maybe contribute something.

Cheers!

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Tue Jul 10, 2012 4:01 pm

You can see some of the code in my github account, https://github.com/simonjhall
I've been doing a lot of travelling recently so have only been able to work on small things. My memcpy and memset implementations look like they are to make it into Wheezy. Dom has already made an image (and a forum thread to go with it).

atarian88
Posts: 6
Joined: Mon Jul 09, 2012 5:51 pm

Re: So who's working/worked on an Xorg server?

Wed Jul 11, 2012 9:25 pm

Thanks a lot! I'll start looking at it right now!

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Sat Jul 14, 2012 5:34 pm

Does anyone reading this know how to choose an explicit backend to test when using cairo-perf-trace? I explicitly want to test just pixman and it takes about half an hour to get to the test I want to actually test! Turnaround times are high...

ssvb
Posts: 112
Joined: Sat May 19, 2012 6:15 pm

Re: So who's working/worked on an Xorg server?

Sat Jul 14, 2012 5:54 pm

The backend can be selected via CAIRO_TEST_TARGET environment variable. A bit more detailed instructions about running cairo-perf-trace benchmark can be found at the bottom of http://ssvb.github.com/2012/05/04/xorg- ... ering.html In any case, pixman is going to be used for "xlib", "image" and "image16" backends.

The cairo-perf-trace benchmarks are useful for verifying that your optimizations are useful and testing how much speedup you are going to get in real applications. The run times are very high because the traces were primarily intended to be run on x86 desktop systems.

For quickly testing the performance of individual compositing operations, one can use lowlevel-blt-bench synthetic benchmark included with pixman. For example, running "./lowlevel-blt-bench src_8888_8888" is benchmarking 32-bit RGBA to RGBA copy, "./lowlevel-blt-bench over_8888_8888" is benchmarking alpha blending 32-bit RGBA over RGBA, "./lowlevel-blt-bench over_n_8888" is benchmarking solid fill to 32-bit RGBA, etc.

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Sat Jul 14, 2012 6:07 pm

Epic stuff. Thanks very much!
In my kernel (not sure if it's been fixed yet) oprofile works only in timer mode, so I need a high -i setting for cairo-perf-trace to get useful results. Unfortunately xlib and xcb backends don't devote enough time to pixman so I get a lot of uninteresting samples. I can now run just one backend with the same amount of pixman samples in 1/3rd of the time!

I'll be sure to check out those extra programs too.

Btw any idea why sometimes the exact same perf trace run will bring in the image16 backend, but not every time? I always run my X in 32-bit mode.

(working on over n 8 8888 at the moment)

ssvb
Posts: 112
Joined: Sat May 19, 2012 6:15 pm

Re: So who's working/worked on an Xorg server?

Sat Jul 14, 2012 6:37 pm

teh_orph wrote:Epic stuff. Thanks very much!
In my kernel (not sure if it's been fixed yet) oprofile works only in timer mode, so I need a high -i setting for cairo-perf-trace to get useful results.
You can try the patch from http://ssvb.github.com/2011/08/23/yet-a ... orial.html to make oprofile more useful in timer mode (increase sampling rate frequency).
Btw any idea why sometimes the exact same perf trace run will bring in the image16 backend, but not every time? I always run my X in 32-bit mode.
The "image" and "image16" backends have nothing to do with X server (and work fine without it), the rendering is just done in memory buffers. If "image16" backend is not listed in CAIRO_TEST_TARGET but gets tested, then it is likely a bug.
(working on over n 8 8888 at the moment)
Beware of this function, it is booby trapped: http://lists.freedesktop.org/archives/p ... 00773.html http://lists.freedesktop.org/archives/p ... 00498.html
For slow processors, such as ARM11, it is beneficial to skip over fully transparent pixels. And it is one of the cases where the results from lowlevel-blt-bench are misleading (it simply assumes that all the pixels are translucent).

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: So who's working/worked on an Xorg server?

Sat Jul 14, 2012 8:21 pm

Interesting stuff. Thanks for the references. Seems this function has been beaten to death already!
I was very surprised that the assembly code has those defines turned off that skip zero-masked pixels.
I had figured that the function was used for things like rounded window corners and larger glyphs, but not things as small as fonts. Perhaps this would explain why I've had no luck pld'ing either the mask or destination!

In profiles I'm still surprised that the mask load (ldrb) has so many hits. The loop goes one pixel at a time, left to right so worst case only one in thirty-two pixels should miss? The ARM docs are as inconsistent as I remember...there doesn't seem to be a mention of how long a ldrb will take versus a regular ldr. On Cortex A9 I'm sure that was one or two clocks delayed on the result bus, or did it stall issue for two extra clocks...? (well I guess we don't have an A9 anyway)

How does your patch compare to the generic ARMv6 assembly version? I shall re-enable it and see.

Btw rigging in a modified version of my memset into pixman_fill32 pretty much removed it from the profile, wup wup.

Return to “General discussion”

Who is online

Users browsing this forum: Bing [Bot], Burngate and 78 guests