X performance problems with Matrox G550

Martin Ebourne lists at ebourne.me.uk
Thu Nov 4 03:13:42 PST 2004


On Thu, 2004-11-04 at 04:01, Michel Dänzer wrote:
> On Tue, 2004-11-02 at 23:18 +0000, Martin Ebourne wrote:
> > I have an Athlon 64 with a Matrox G550 running mythTV (a TV pvr
> > program). I am running myth on the second head (CRTC2) using the TV out.
> 
> There's no XVideo support for the colourspace conversion and scaling?

No. The Back End Scaler is only available on the first head (CRTC1).
CRTC2 can do YUV colour space but X doesn't support that currently.
Still, mythtv doesn't use that much CPU doing it in software, so that's
not a major problem at the moment.

> Is write-combining enabled for the framebuffer?

No, it turns out it isn't:

# grep write-com /var/log/Xorg.0.log
(WW) MGA(0): Failed to set up write-combining range (0xd8000000,0x2000000)
(WW) MGA(0): Failed to set up write-combining range (0xd9000000,0x800000)
(WW) MGA(0): Failed to set up write-combining range (0xd8000000,0x1800000)
(WW) MGA(1): Failed to set up write-combining range (0xd8000000,0x2000000)
(WW) MGA(1): Failed to set up write-combining range (0xd9800000,0x800000)
(WW) MGA(0): Failed to set up write-combining range (0xd9000000,0x800000)
(WW) MGA(0): Failed to set up write-combining range (0xd8000000,0x1800000)
(WW) MGA(1): Failed to set up write-combining range (0xd9800000,0x800000)
# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=1
reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=1

I can add it in manually though. I used the first one in the list above
(which is a superset of all the others):

# echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr
# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=1
reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=1
reg02: base=0xd8000000 (3456MB), size=  32MB: write-combining, count=1

This does give a very worthwhile speed increase - about 10% of the
overall CPU. Anyone any ideas why Xorg failed to add the
write-combining?

X Window System Version 6.8.1
Release Date: 17 September 2004
X Protocol Version 11, Revision 0, Release 6.8.1
Build Operating System: Linux 2.6.8-1.521.mje.2 x86_64 [ELF] 
Current Operating System: Linux gliadin.ebourne.me.uk 2.6.8-1.521.mje.2 #1 Sat Oct 23 12:15:11 BST 2004 x86_64
Build Date: 28 October 2004
Build Host: gliadin.ebourne.me.uk
 
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.8-1.521.mje.2 (martin at gliadin.ebourne.me.uk) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Sat Oct 23 12:15:11 BST 2004 

However, this by itself is not enough to make X performance sufficient.
It reduces X CPU usage from about 75% to about 65%. MythTV takes 48% to
do full rate video including all the software scaling and YUV-RGB
conversion, so I need X to take < 50%; all it's doing is blitting the
images to the videocard framebuffer, so it should be able to do that!

> Is direct rendering enabled? AGP doesn't come into play otherwise.

Ah, now I didn't know that. It is definitely not enabled; the mga kernel
module is not 64 bit clean so is not available on the Athlon64.

So now I'd like to know if that will make the difference. If I port the
mga module to amd64 will CRTC2 on the mga driver use AGP for blit
operations? And will it be significantly faster?

One thing to note is that playback to a monitor on CRTC1 (which does use
the BES) is at full rate and only using about 50% of the CPU (30% by X).
This is without AGP but with write-combining. It has just as much data
to transfer to the card (source is 720x576) as when running on the TV on
CRTC2, but does it in less than half the CPU.

> PS: We could have determined most if not all of this from your X server
> log.

Fair point. I didn't want to send that straight away because these
things are quite large. Attached this time.

Cheers,

Martin.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.0.log
Type: text/x-log
Size: 49818 bytes
Desc: 
URL: <http://lists.x.org/archives/xorg/attachments/20041104/96ce9b62/attachment.bin>


More information about the xorg mailing list