[Xpert]Setting up MTRR support

2002-07-18 Thread Markus Glodek

I am completely new to Linux, so please bear with me. I am trying to speed
up DVD playback under Xine.
xine-check gives me the following information:

[ hint ] you have MTRR support but it's unused.
 It seems like your X server didn't set any MTRR ranges for the
 graphics card. Maybe upgrading your X server helps...
 You don't have a PCI graphics card, do you? AFAIK, MTRR only
 helps with AGP cards.
 press enter to continue...

It seems that I have to set MTRR ranges for my graphics card (ATI
Radeon700, and an AMD K6-2). I am told
that I need to first determine the memory base address of the graphics
card by looking at XFree86.0.log. I
take it that this is the relevant line from XFree86.0.log:

(--) PCI:*(1:0:0) ATI Radeon VE QY rev 0, Mem @ 0xd000/27,
0xd900/16, I/O @ 0xc000/8

From this I take it that the memory base address for my graphics card is
0xd900. Is this correct?
Also, my graphics card has 32MB RAM, which is in Hex: 0x200. Correct
so far?

With these values, I do the following:

# cat /proc/mtrr
reg00: base=0xd000 (3328MB), size=  32MB: write-combining, count=1
# echo base=0xd900 size=0x200 type=write-combining | /proc/mtrr
# cat /proc/mtrr
reg00: base=0xd000 (3328MB), size=  32MB: write-combining, count=1

Something seems to have gone wrong, no? Shouldn't the output of the second
cat /proc/mtrr be different from the
output of the first one? Can anyone explain to me what is going wrong, and
what I have to do to set the correct MTRR ranges?

Thanks a lot,

Markus


PS: Here is my XFree86.0.log, in case something is wrong with the memory
base address I am trying to use:

XFree86 Version 4.2.0 (Red Hat Linux release: 4.2.0-8) / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 23 January 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.17-0.13smp i686 [ELF]
Build Host: daffy.perf.redhat.com

Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
 (++) from command line, (!!) notice, (II) informational,
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: /var/log/XFree86.0.log, Time: Thu Jul 18 10:07:17 2002
(==) Using config file: /etc/X11/XF86Config-4
(==) ServerLayout Anaconda Configured
(**) |--Screen Screen0 (0)
(**) |   |--Monitor Monitor0
(**) |   |--Device ATI Radeon 7000
(**) |--Input Device Mouse0
(**) |--Input Device Keyboard0
(**) Option XkbRules xfree86
(**) XKB: rules: xfree86
(**) Option XkbModel pc105
(**) XKB: model: pc105
(**) Option XkbLayout us
(**) XKB: layout: us
(==) Keyboard: CustomKeycode disabled
(**) FontPath set to unix/:7100
(**) RgbPath set to /usr/X11R6/lib/X11/rgb
(==) ModulePath set to /usr/X11R6/lib/modules
(--) using VT number 7

(II) Open APM successful
(II) Module ABI versions:
XFree86 ANSI C Emulation: 0.1
XFree86 Video Driver: 0.5
XFree86 XInput driver : 0.3
XFree86 Server Extension : 0.1
XFree86 Font Renderer : 0.3
(II) Loader running on linux
(II) LoadModule: bitmap
(II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a
(II) Module bitmap: vendor=The XFree86 Project
compiled for 4.2.0, module version = 1.0.0
Module class: XFree86 Font Renderer
ABI class: XFree86 Font Renderer, version 0.3
(II) Loading font Bitmap
(II) LoadModule: pcidata
(II) Loading /usr/X11R6/lib/modules/libpcidata.a
(II) Module pcidata: vendor=The XFree86 Project
compiled for 4.2.0, module version = 0.1.0
ABI class: XFree86 Video Driver, version 0.5
(II) PCI: Probing config type using method 1
(II) PCI: Config type is 1
(II) PCI: stages = 0x03, oldVal1 = 0x8060, mode1Res1 = 0x8000
(II) PCI: PCI scan (all values are in hex)
(II) PCI: 00:00:0: chip 1106,0598 card , rev 04 class 06,00,00 hdr
00
(II) PCI: 00:01:0: chip 1106,8598 card , rev 00 class 06,04,00 hdr
01
(II) PCI: 00:07:0: chip 1106,0586 card 1106, rev 47 class 06,01,00 hdr
80
(II) PCI: 00:07:1: chip 1106,0571 card , rev 06 class 01,01,8a hdr
00
(II) PCI: 00:07:2: chip 1106,3038 card 0925,1234 rev 02 class 0c,03,00 hdr
00
(II) PCI: 00:07:3: chip 1106,3040 card , rev 10 class 06,00,00 hdr
00
(II) PCI: 00:08:0: chip 12b9,1008 card 12b9,00d7 rev 01 class 07,00,02 hdr
00
(II) PCI: 00:09:0: chip 10ec,8139 card 10ec,8139 rev 10 class 02,00,00 hdr
00
(II) PCI: 00:0a:0: chip 1274,1371 card 1274,1371 rev 08 class 04,01,00 hdr
00
(II) PCI: 01:00:0: chip 1002,5159 card 1002,000a rev 00 class 03,00,00 hdr
00
(II) PCI: End of PCI scan
(II) LoadModule: scanpci
(II) Loading /usr/X11R6/lib/modules/libscanpci.a
(II) Module scanpci: vendor=The XFree86 Project
compiled for 4.2.0, module version = 0.1.0
ABI class: XFree86 Video Driver, version 0.5
(II) 

Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Henrik Farre

Yello

On Thu, 18 Jul 2002 15:40:36 -0500 (CDT)
Markus Glodek [EMAIL PROTECTED] wrote:

 I am completely new to Linux, so please bear with me. I am trying to
 speed up DVD playback under Xine.
 xine-check gives me the following information:
 
 [ hint ] you have MTRR support but it's unused.
  It seems like your X server didn't set any MTRR ranges for the
  graphics card. Maybe upgrading your X server helps...
  You don't have a PCI graphics card, do you? AFAIK, MTRR only
  helps with AGP cards.
  press enter to continue...

Are you sure you have MTRR support in your kernel?

cat /var/log/messages | grep -i mtrr 

gives me (Matrox gfx card):

Jul 18 22:56:03 spookcentral kernel: mtrr: v1.40 (20010327) Richard Gooch
([EMAIL PROTECTED])
Jul 18 22:56:03 spookcentral kernel: mtrr: detected mtrr type: Intel
Jul 18 22:56:03 spookcentral kernel: matroxfb: MTRR's turned on

-- 
Mvh. / Kind regards 
Henrik Farre 
http://www.cs.auc.dk/~enrique
http://www.fsf.org/philosophy/no-word-attachments.html
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Markus Glodek

Many thanks for the response.

cat /var/log/messages | grep -i mtrr

gives me

Jul 18 10:04:58 philo kernel: mtrr: v1.40 (20010327) Richard Gooch
([EMAIL PROTECTED])
Jul 18 10:04:58 philo kernel: mtrr: detected mtrr type: AMD K6

Nothing about MTRR's turned on. I thought that the mere presence of
/proc/mtrr (it's there) tells me that my kernel supports MTRR. Does it?

What should I do?

Thanks.


  [ hint ] you have MTRR support but it's unused.
   It seems like your X server didn't set any MTRR ranges for the
   graphics card. Maybe upgrading your X server helps...
   You don't have a PCI graphics card, do you? AFAIK, MTRR only
   helps with AGP cards.
   press enter to continue...

 Are you sure you have MTRR support in your kernel?

 cat /var/log/messages | grep -i mtrr

 gives me (Matrox gfx card):

 Jul 18 22:56:03 spookcentral kernel: mtrr: v1.40 (20010327) Richard Gooch
 ([EMAIL PROTECTED])
 Jul 18 22:56:03 spookcentral kernel: mtrr: detected mtrr type: Intel
 Jul 18 22:56:03 spookcentral kernel: matroxfb: MTRR's turned on


___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Andy Isaacson

On Thu, Jul 18, 2002 at 06:30:42PM -0500, Markus Glodek wrote:
   [ hint ] you have MTRR support but it's unused.
It seems like your X server didn't set any MTRR ranges for the
graphics card. Maybe upgrading your X server helps...
You don't have a PCI graphics card, do you? AFAIK, MTRR only
helps with AGP cards.

False.  Using a write-combining MTRR helps performance on PCI as well as
AGP.

  Are you sure you have MTRR support in your kernel?
 
  cat /var/log/messages | grep -i mtrr

grep -i mtrr /var/log/messages.  Useless Use of Cat award!

  gives me (Matrox gfx card):
 
  Jul 18 22:56:03 spookcentral kernel: mtrr: v1.40 (20010327) Richard Gooch
  ([EMAIL PROTECTED])
  Jul 18 22:56:03 spookcentral kernel: mtrr: detected mtrr type: Intel
  Jul 18 22:56:03 spookcentral kernel: matroxfb: MTRR's turned on

This line is only present because you have a Matrox card and are using
the matroxfb module.  Non-Matrox cards, or people who don't use
matroxfb, won't see it.

 Jul 18 10:04:58 philo kernel: mtrr: v1.40 (20010327) Richard Gooch
 ([EMAIL PROTECTED])
 Jul 18 10:04:58 philo kernel: mtrr: detected mtrr type: AMD K6
 
 Nothing about MTRR's turned on. I thought that the mere presence of
 /proc/mtrr (it's there) tells me that my kernel supports MTRR. Does it?
 
 What should I do?

On startup, before X has ever run, do a cat /proc/mtrr.  You should
see a single MTRR the size of your memory, like so:

reg00: base=0x (   0MB), size= 256MB: write-back, count=1

Then, start X.  In an xterm, do cat /proc/mtrr.  You should see some
more mtrr entries there.  Here's mine:

reg00: base=0x (   0MB), size= 256MB: write-back, count=1
reg01: base=0xd400 (3392MB), size=  16MB: write-combining, count=1
reg05: base=0xd000 (3328MB), size=  64MB: write-combining, count=1

Those write-combining entries indicate that the framebuffer has been
mapped.

Additionally, you can look at the XFree86 log file,
/var/log/XFree86.0.log.  Search for MTRR.  (Case insensitive, I
suppose.)

-andy
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Markus Glodek

Many thanks for the response.

 False.  Using a write-combining MTRR helps performance on PCI as well as
 AGP.

I actually have an AGP card (ATI Radeon7000)


 On startup, before X has ever run, do a cat /proc/mtrr.  You should
 see a single MTRR the size of your memory, like so:

 reg00: base=0x (   0MB), size= 256MB: write-back, count=1

Doesn't work here. If I do cat /proc/mtrr before running an X-server I
get nothing at all:


 Then, start X.  In an xterm, do cat /proc/mtrr.  You should see some
 more mtrr entries there.  Here's mine:

 reg00: base=0x (   0MB), size= 256MB: write-back, count=1
 reg01: base=0xd400 (3392MB), size=  16MB: write-combining, count=1
 reg05: base=0xd000 (3328MB), size=  64MB: write-combining, count=1

Running cat /proc/mtrr after starting the X server gives me the
following:

reg00: base=0xd000 (3328MB), size=  32MB: write-combining, count=1

I do not seem to be able to modify this entry with

echo base=0xd900 size=0x200 type=write-combining | /proc/mtrr

When I do another cat /proc/mtrr, I simply get the same as before:

reg00: base=0xd000 (3328MB), size=  32MB: write-combining, count=1

 Additionally, you can look at the XFree86 log file,

Can't find anything about MTRR in XFree86.0.log.  I included a copy of
the file in my first post.

Any ideas on how get MTRR set up under these circumstances?

Thanks,

Markus

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Peter Finderup Lund

On Thu, 18 Jul 2002, Andy Isaacson wrote:

  Doesn't work here. If I do cat /proc/mtrr before running an X-server I
  get nothing at all:
  

 Ah, perhaps your CPU only has 1 MTRR.  You could check the kernel code
 if you're very curious.

The AMD K6-2 has two (I was curious some months ago and read the
documentation from AMD).

  Running cat /proc/mtrr after starting the X server gives me the
  following:
 
  reg00: base=0xd000 (3328MB), size=  32MB: write-combining, count=1

 That looks a whole lot like a framebuffer.  So what's the point of this
 thread, then, if it's working fine for you? :)  (I came in at the tail
 end here, sorry if I'm missing context.)

It probably is his framebuffer.  What troubles him, I think, is that lspci
tells him that the video card has two memory ranges and only one of them
is covered by an MTRR.

I have an AMD K6-2 500 MHz and a RIVA TNT2 M64 card.  I'm running Linux
2.2.21 and XFree86 4.2.0.

cat /proc/mtrr:
reg00: base=0xe600 (3680MB), size=  32MB: write-combining, count=1

lspci:
01:00.0 VGA compatible controller: nVidia Corporation Riva TNT2 Model 64
(rev 15) (prog-if 00 [VGA])
Subsystem: AOPEN Inc.: Unknown device 000d
Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 9
Memory at e400 (32-bit, non-prefetchable)
Memory at e600 (32-bit, prefetchable)
Expansion ROM at e500 [disabled]
Capabilities: [60] Power Management version 1
Capabilities: [44] AGP version 2.0

If anybody knows why my card also shows up twice in the memory map I'd be
much obliged.  Is the first (non-prefetchable) part memory-mapped control
registers for the accellerator functions and the second one the
framebuffer?

(I think I used to know this... :/ )

-Peter

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Setting up MTRR support

2002-07-18 Thread Mark Vojkovich

On Fri, 19 Jul 2002, Peter Finderup Lund wrote:

 
 lspci:
 01:00.0 VGA compatible controller: nVidia Corporation Riva TNT2 Model 64
 (rev 15) (prog-if 00 [VGA])
   Subsystem: AOPEN Inc.: Unknown device 000d
   Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 9
   Memory at e400 (32-bit, non-prefetchable)
   Memory at e600 (32-bit, prefetchable)
   Expansion ROM at e500 [disabled]
   Capabilities: [60] Power Management version 1
   Capabilities: [44] AGP version 2.0
 
 If anybody knows why my card also shows up twice in the memory map I'd be
 much obliged.  Is the first (non-prefetchable) part memory-mapped control
 registers for the accellerator functions and the second one the
 framebuffer?
 

   The non-prefectable is registers, the prefecthable is framebuffer.


Mark.
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert