Skip to contentSkip to conversation

multiple separate pci bridges ...

DISCUSSION Sven Luther 4 participants 23 messages Jan 18, 2004 – Jan 19, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 6 lines

Ok, i have done this. I have followed the recomendations of the hardware guy, and did the following :

device 0, function 0 : read access to bytes 0-15, read returns 0 on regs > 15. Write access fails silently.

Show the code (just in case...)

  #define PEG2_PCI_OP(rw, size, type, op, mask, btrw)
  int __chrp
  peg2_##rw##_config_##size(struct pci_dev *dev, int offset, type val)
  {
          struct pci_controller *hose = dev->sysdata;
          u32 msr;
          u32 data;
          volatile unsigned int *f118 = hose->cfg_peg2_magic;
          volatile unsigned int *f11c = (unsigned int *) f118 + 1;
          /* We won't write on device 0 and only read byte 0-15 of func 0 */
          if (dev->bus->number == 0 || dev->bus->number == 0x10) {
                  if (dev->devfn == 0) {
                          if (!(btrw & 1) && (offset > 15)) {
                                  val = (type) 0x0;
                                  return PCIBIOS_SUCCESSFUL;
                          } else if (btrw & 1) {
                                  return PCIBIOS_SUCCESSFUL;
                          }
                  } else if ((dev->devfn >> 3) == 0) {
                          return PCIBIOS_DEVICE_NOT_FOUND;
                  }
          }

	  if (btrw & 2) {
                /* Disable cpu interrupts */
                msr = mfmsr();
                mtmsr(msr & ~MSR_EE);
                /* Enable PCI -> AGP idsel mapping */
                cfg_write(0x8000, f118, u32, out_be32);
          }

          data = 0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
                    | (dev->devfn << 8) | (offset & 0xff);
          cfg_write(data, hose->cfg_addr, u32, out_le32);
          cfg_##rw(val, hose->cfg_data + (offset & mask), type, op);

          if (btrw & 2) {
                /* Enable PCI -> AGP idsel mapping */
                cfg_write(0x8000, f11c, u32, out_be32);
                /* Disable cpu interrupts */
                mtmsr(msr);
          }
          return PCIBIOS_SUCCESSFUL;

}

btrw is 0 for reads and 1 for writes. The second bit (0 or 2) also encodes if we are on the pci or agp bus, to enable th agp config access magic.

Quoted 10 lines
Quoted 9 lines

device 0, function 1-7 : both read and writes fail with PCIBIOS_DEVICE_NOT_FOUND.

Additionnally, i have nullified the ressources with :

	dev->resource[i].flags = 0;
	dev->resource[i].start = 0;
	dev->resource[i].end = 0;

from the pcibios_fixup (not the right place, but i don't know where it should be done instead).

Quoted 2 lines

A quirk is one of the functions in the table in pci.c but you can use the fixup too at this point...

Ok.

Quoted 26 lines
Quoted 26 lines

This allows me to see the host bridge on both buses, and radeonfb works fine :

$ lspci
00:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
00:01.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
00:05.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:0c.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] (rev 10)
00:0c.1 IDE interface: VIA Technologies, Inc.  VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:0c.2 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.3 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.4 Non-VGA unclassified device: VIA Technologies, Inc. VT8235 ACPI (rev 10)
00:0c.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 40)
00:0c.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 20)
00:0d.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)
10:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
10:08.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5964 (rev 01)

But :

$ hexdump /proc/bus/pci/10/00.0
0000000 ab11 6064 0700 b022 0300 0006 2000 0000
0000010 20df 85cf 20df 85cf 20df 85cf 20df 85cf
*
0000040
Quoted 6 lines
Quoted 2 lines

Why in hell do i have 0x20df85cf on all four bars of the config space addresses 0x10 to 0x1f ?

I don't know, make sure you are "filtering" things properly... You should return 0xff on anything after 0x10 I suppose (though you may want to return 0 for the BARs, I have to dbl check).

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

Quoted 6 lines
Quoted 3 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Which version of DRI ? Do you have the interrupt routing working properly ?

Mmm, maybe i should also allow to read (and write ?) the config 32-bit word at 0x3c, those include the Interrupt Line and Pin, as well as the Max_lat and Min_Gnt.

Maybe some of the first 16 bytes would also need to be modifiable, and there should be no harm in allowing read of the subsytem id and vendor id ?

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Quoted 5 lines
Quoted 3 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only. Something strange is going on.

Yah, XFree log could be useful.

Ok, i uploaded it at http://people.debian.org/~luther/XFree86.0.log,
since the list was not able to cope with it. I didn't see anything anormal there though. Altough some of the bus ressources seem to be checked even if i nullified them.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 4 lines · Sven Luther
Quoted 4 lines
Quoted 4 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

[...]

Quoted 4 lines

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

You may want to try my dri-trunk-sid packages.

Quoted 6 lines

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Sounds like a typical chip lockup, possibly caused by the chip not reading from the CP ring what we're writing to it.

Do you also have a server log with the DRI enabled?

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 6 lines · Michel Dänzer
Quoted 4 lines · Sven Luther
Quoted 4 lines
Quoted 4 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Quoted 8 lines

[...]

Quoted 4 lines

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

You may want to try my dri-trunk-sid packages.

Ok, will give them a try.

Quoted 9 lines
Quoted 6 lines

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Sounds like a typical chip lockup, possibly caused by the chip not reading from the CP ring what we're writing to it.

Well, not sure. Compared to the pegasos 1 situation, where nothing showed up on the screen, except the hardware cursor, Things seem to work out fine at first, and only certain operation make it happen. The gdm prompt comes up, you can log in, then once logged in, you can open a gnome-terminal, and even do some stuff. Once you try moving the window though, it starts moving, but then quickly freezes. I believe there is maybe more a problem with the CPU and the graphic chip being in disacord over the size of the CP ring.

Come to think of it, i have three negative tries (Radeon 7000, 7200 and 9200SE) and one positive (Radeon 7500), or at least claimed such, the glxgears numbers obtained with the Radeon 7500 where not all that high (maybe 300 or so), but still higher than the software only numbers i obtain on my box with Radeon 9200 SE.

Also, the Radeon 9200 SE has only 64bit memory interface. I don't know about 7000 and 7200, but maybe this is also the case for them, while the 7500 could have 128bit memory interface ? Not sure, will investigate.

Quoted 1 line

Do you also have a server log with the DRI enabled?

Wait a minute, i can send them to you. I also had logs of the of the 7500 and 7000, but had them in /tmp and rebooted my box yesterday :/.

Anyway, here are the three DRI enabled logs :

http://people.debian.org/~luther/XFree86.DRI.log
this one is while it is loading.
http://people.debian.org/~luther/XFree86.DRI2.log
this one is ones loged in gnome, opened a terminal, and started typing in it (ls only).
http://people.debian.org/~luther/XFree86.DRI3.log
this one is after having moved the gnome-terminal and locking up X. Hardware cursor still works. i first moved the gnome-terminal a bit, and it worked, but i insisted and it locked up.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 7 lines · Sven Luther
Quoted 6 lines · Michel Dänzer
Quoted 5 lines · Sven Luther
Quoted 1 line

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure.

It would be quite interesting to know, see below.

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Sounds like a typical chip lockup, possibly caused by the chip not reading from the CP ring what we're writing to it.

Quoted 6 lines

Well, not sure. Compared to the pegasos 1 situation, where nothing showed up on the screen, except the hardware cursor, Things seem to work out fine at first, and only certain operation make it happen. The gdm prompt comes up, you can log in, then once logged in, you can open a gnome-terminal, and even do some stuff. Once you try moving the window though, it starts moving, but then quickly freezes.

Because the RENDER extension isn't accelerated, that might be the first time the ring is heavily used.

It might also occur when the ring wraps around; whether or not it also happens when the server is idling would give a hint about this, or even better instrumenting the wraparound handling code in the DRM.

Quoted 2 lines

I believe there is maybe more a problem with the CPU and the graphic chip being in disacord over the size of the CP ring.

I'd expect problems everywhere if that code wasn't correct.

Quoted 5 lines

Come to think of it, i have three negative tries (Radeon 7000, 7200 and 9200SE) and one positive (Radeon 7500), or at least claimed such, the glxgears numbers obtained with the Radeon 7500 where not all that high (maybe 300 or so), but still higher than the software only numbers i obtain on my box with Radeon 9200 SE.

PCI GART isn't very fast in general, it's even mysteriously slow on some systems, see the dri-devel list archives.

Quoted 3 lines

Also, the Radeon 9200 SE has only 64bit memory interface. I don't know about 7000 and 7200, but maybe this is also the case for them, while the 7500 could have 128bit memory interface ? Not sure, will investigate.

I doubt that matters.

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 10 lines · Michel Dänzer
Quoted 7 lines · Sven Luther
Quoted 6 lines · Michel Dänzer
Quoted 5 lines · Sven Luther
Quoted 1 line

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure.

It would be quite interesting to know, see below.

But then, maybe it has something to do with the GL screensaver or something such. The problem is that i have this box on the analog entry of my dual entry monitor, and mostly work on the box connected to the DVI connector, so it usually died while i was not looking.

Quoted 13 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Sounds like a typical chip lockup, possibly caused by the chip not reading from the CP ring what we're writing to it.

Quoted 6 lines

Well, not sure. Compared to the pegasos 1 situation, where nothing showed up on the screen, except the hardware cursor, Things seem to work out fine at first, and only certain operation make it happen. The gdm prompt comes up, you can log in, then once logged in, you can open a gnome-terminal, and even do some stuff. Once you try moving the window though, it starts moving, but then quickly freezes.

Quoted 2 lines

Because the RENDER extension isn't accelerated, that might be the first time the ring is heavily used.

Yep. Altough this problem doesn't occur for the Radeon 7500 on the same board. I believe it may be triggered by some problem which is present in the R200 code path, and which is present in the R100 software T&L (since i think the 7000 and 7200 lack a T&L engine).

Quoted 3 lines

It might also occur when the ring wraps around; whether or not it also happens when the server is idling would give a hint about this, or even better instrumenting the wraparound handling code in the DRM.

Ok, i will look into this and do some experiments. What is the size of the ring anyway ? 4K or something such ?

Quoted 4 lines
Quoted 2 lines

I believe there is maybe more a problem with the CPU and the graphic chip being in disacord over the size of the CP ring.

I'd expect problems everywhere if that code wasn't correct.

Mmm.

Quoted 8 lines
Quoted 5 lines

Come to think of it, i have three negative tries (Radeon 7000, 7200 and 9200SE) and one positive (Radeon 7500), or at least claimed such, the glxgears numbers obtained with the Radeon 7500 where not all that high (maybe 300 or so), but still higher than the software only numbers i obtain on my box with Radeon 9200 SE.

PCI GART isn't very fast in general, it's even mysteriously slow on some systems, see the dri-devel list archives.

Ok. There is no other chance anyway, since there is no true AGP bus on these boxes. The nortbridge used is a communication controller after all.

Quoted 5 lines
Quoted 3 lines

Also, the Radeon 9200 SE has only 64bit memory interface. I don't know about 7000 and 7200, but maybe this is also the case for them, while the 7500 could have 128bit memory interface ? Not sure, will investigate.

I doubt that matters.

I doubt it too. But then, if the chip measures data in multiples of the memory words or something such, it may have an influence.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#14 lore raw
In reply to Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt
Quoted 2 lines

.../...

The code you posted is awfully ugly...

Comes from multiple testing and such, once it find the final one, i will do some cleanup or something. That said, it is not all that more ugly as the stuff in indirect_pci.c i used as example.

Quoted 9 lines

I'll look at it in detail later.

Quoted 6 lines

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

Quoted 3 lines

pci_dev resources are read from the BARs and the sizing mecanism uses the BARs too (you should filter out writes too btw). If you properly filter things out, there should be no problem.

The BARs are the ones at address 0x10 to 0x27 of the pci config space, right ? Only 0 is read back when looking at them.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Which version of DRI ? Do you have the interrupt routing working properly ?

Quoted 7 lines
Quoted 3 lines

Mmm, maybe i should also allow to read (and write ?) the config 32-bit word at 0x3c, those include the Interrupt Line and Pin, as well as the Max_lat and Min_Gnt.

Interrupt pin is mostly useless. You may want to fill interrupt line of the PCI cards with the value assigned by OF (or in any case, at least make sure pci_dev->irq is properly filled).

Ok.

Quoted 6 lines
Quoted 3 lines

Maybe some of the first 16 bytes would also need to be modifiable, and there should be no harm in allowing read of the subsytem id and vendor id ?

Of what ? the bridge ? You surely need to let the system access the AGP portion of it btw...

There is no AGP portion of it, it is a plain pci bus with some config space reading magic i don't know the details, and a AGP (3.3V) connector.

Quoted 6 lines
Quoted 4 lines

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

Use the DRM module from Michel snapshot, might help...

Will try tomorrow. But then, it seems that the default for debian will be to use the kernel included DRM.

Quoted 8 lines
Quoted 6 lines

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Could be irq not working...

Which would make sense with the above remarq of the interrupt line.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#15 lore raw
In reply to Benjamin Herrenschmidt
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 7 lines

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Could be irq not working...

Only the 3D drivers use the IRQ, it's not involved when moving around windows. Or do you mean a badly configured IRQ causing a flood or something?

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
In reply to Sven Luther
Quoted 10 lines · Sven Luther
Quoted 9 lines · Michel Dänzer
Quoted 7 lines · Sven Luther
Quoted 6 lines · Michel Dänzer
Quoted 5 lines · Sven Luther

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure.

Quoted 4 lines
Quoted 1 line

It would be quite interesting to know, see below.

But then, maybe it has something to do with the GL screensaver or something such.

Don't run them, then? *shrug*

Quoted 1 line

Altough this problem doesn't occur for the Radeon 7500 on the same board.

I suspect that's more luck than anything else at this point...

Quoted 3 lines

I believe it may be triggered by some problem which is present in the R200 code path, and which is present in the R100 software T&L (since i think the 7000 and 7200 lack a T&L engine).

The 7200 has one, and the 2D acceleration code (which moves windows around) doesn't have any core specific paths because the 2D engines are mostly identical.

Quoted 6 lines
Quoted 3 lines

It might also occur when the ring wraps around; whether or not it also happens when the server is idling would give a hint about this, or even better instrumenting the wraparound handling code in the DRM.

Ok, i will look into this and do some experiments. What is the size of the ring anyway ? 4K or something such ?

daenzer@thor|0:29:29> grep 'ring buffer' /var/log/XFree86.0.log (II) RADEON(0): Using 1 MB for the ring buffer

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#17 lore raw
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 4 lines

Only the 3D drivers use the IRQ, it's not involved when moving around windows. Or do you mean a badly configured IRQ causing a flood or something?

Oh, you don't use the IRQ for throttling the ring ?

No, that's only rarely needed anyway, if ever (a while ago, I discovered that the DRM code to detect a full ring had been broken for a while, but it didn't seem to cause any problems :).

Quoted 1 line

Only for VBL ?

That, frame throttling (to prevent too many frames getting queued) and waiting for rendering to finish.

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#13 lore raw
In reply to Sven Luther
Quoted 2 lines

.../...

The code you posted is awfully ugly...

I'll look at it in detail later.

Quoted 6 lines

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

pci_dev resources are read from the BARs and the sizing mecanism uses the BARs too (you should filter out writes too btw). If you properly filter things out, there should be no problem.

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Which version of DRI ? Do you have the interrupt routing working properly ?

Mmm, maybe i should also allow to read (and write ?) the config 32-bit word at 0x3c, those include the Interrupt Line and Pin, as well as the Max_lat and Min_Gnt.

Interrupt pin is mostly useless. You may want to fill interrupt line of the PCI cards with the value assigned by OF (or in any case, at least make sure pci_dev->irq is properly filled).

Quoted 3 lines

Maybe some of the first 16 bytes would also need to be modifiable, and there should be no harm in allowing read of the subsytem id and vendor id ?

Of what ? the bridge ? You surely need to let the system access the AGP portion of it btw...

Quoted 4 lines

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

Use the DRM module from Michel snapshot, might help...

Quoted 6 lines

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure. The box is still available trough ssh, but killing the X server doesn't restore the fbdev console, and freeze the box.

Could be irq not working...

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only. Something strange is going on.

Yah, XFree log could be useful.

Quoted 8 lines

Ok, i uploaded it at http://people.debian.org/~luther/XFree86.0.log,
since the list was not able to cope with it. I didn't see anything anormal there though. Altough some of the bus ressources seem to be checked even if i nullified them.

Friendly,

Sven Luther

--
Benjamin Herrenschmidt <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#6 lore raw
In reply to Michel Dänzer
Quoted 12 lines · Michel Dänzer
Quoted 10 lines · Sven Luther
Quoted 9 lines · Michel Dänzer
Quoted 7 lines · Sven Luther
Quoted 6 lines · Michel Dänzer
Quoted 5 lines · Sven Luther

The freeze happens when i first launch glxinfo, or when i first start moving a window around (using a debian/unstable default gnome desktop). I don't remember well, but i think it would also freeze when let running for a time, but i am not sure.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

It would be quite interesting to know, see below.

But then, maybe it has something to do with the GL screensaver or something such.

Don't run them, then? *shrug*

Mmm, i only have xscreensaver installer, not the gl ones. Should be ok.

But then, the DRI server corrupts the fbdev screen, and the font memory when i /etc/init.d/gdm stop :/

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#18 lore raw
In reply to Benjamin Herrenschmidt
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 6 lines

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

pci_dev resources are read from the BARs and the sizing mecanism uses the BARs too (you should filter out writes too btw). If you properly filter things out, there should be no problem.

So shouldn't reads from the BAR return -1 instead of 0, and writes be ignored?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#19 lore raw
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

Quoted 5 lines
Quoted 3 lines

pci_dev resources are read from the BARs and the sizing mecanism uses the BARs too (you should filter out writes too btw). If you properly filter things out, there should be no problem.

So shouldn't reads from the BAR return -1 instead of 0, and writes be ignored?

Writes have to be ignored, I don't remember if an unused BAR should return 0xffffffff or 0 (check the spec). (The call shall not fail, the BAR space has to be implemented).

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#20 lore raw
Quoted 14 lines · Benjamin Herrenschmidt
Quoted 12 lines · Geert Uytterhoeven
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 6 lines

I am returning 0 for all of function 0. I dropped the whole struct pci_dev ressource thingy, and they are well nullified. My limited understanding of those pci issues let me make a guess though. I think that either the stuff in the struct pci_dev is set later on (the BARs are modifiable i think), or those values are read from the struct pci_dev before i nullify them.

pci_dev resources are read from the BARs and the sizing mecanism uses the BARs too (you should filter out writes too btw). If you properly filter things out, there should be no problem.

Quoted 5 lines
Quoted 1 line

So shouldn't reads from the BAR return -1 instead of 0, and writes be ignored?

Writes have to be ignored, I don't remember if an unused BAR should return 0xffffffff or 0 (check the spec). (The call shall not fail, the BAR space has to be implemented).

Mmm, should it also be needed to put 0 in the Memory Space and IO space bits of the Command register ?

Also, about the Interrupt line, i believe that there is no interrupt used by the northbridge at this time. We were not speaking about the pci config space of the graphic card, but of the bridge, so it should have no influence with DRI or anything else, right ?

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#7 lore raw
In reply to Michel Dänzer
Quoted 6 lines · Michel Dänzer
Quoted 4 lines · Sven Luther
Quoted 4 lines
Quoted 4 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Quoted 8 lines

[...]

Quoted 4 lines

As for the DRI version, i use the drm module from the linuxppc-2.4 tree, using the v2.4.24 TAG to checkout, and the rest of the XFree86 stuff, including the mesa libraries, from the 4.3.0-0pre1v5 experimental package, rebuild with the Radeon 9200SE patch from Michel Daenzer.

You may want to try my dri-trunk-sid packages.

Just tried (all three packages) and my Radeon 9200 SE is not recognized :

(II) PCI: 10:08:0: chip 1002,5964 card 148c,2073 rev 01 class 03,00,00 hdr 00
...
(WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected! (EE) No devices detected.

Time for you to make another snapshot ? These where with the 2003.10.05 snapshot.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#8 lore raw
Quoted 8 lines · Sven Luther
Quoted 1 line · Michel Dänzer

You may want to try my dri-trunk-sid packages.

Just tried (all three packages) and my Radeon 9200 SE is not recognized :

(II) PCI: 10:08:0: chip 1002,5964 card 148c,2073 rev 01 class 03,00,00 hdr 00
...
(WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected!

That's a warning from the Mach64 driver, not from the Radeon driver?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#9 lore raw
Quoted 11 lines · Geert Uytterhoeven
Quoted 8 lines · Sven Luther
Quoted 1 line · Michel Dänzer

You may want to try my dri-trunk-sid packages.

Just tried (all three packages) and my Radeon 9200 SE is not recognized :

(II) PCI: 10:08:0: chip 1002,5964 card 148c,2073 rev 01 class 03,00,00 hdr 00
...
(WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected!

That's a warning from the Mach64 driver, not from the Radeon driver?

Yes, indeed it is. And in fact i see :

(II) ATI: ATI driver (version 6.5.3) for chipset: ati
...
(II) RADEON: Driver for ATI Radeon chipsets: ATI Radeon QD (AGP),
...

        ATI Radeon 9200 5962 (AGP), ATI Radeon 9200SE 5964 (AGP),

Which is my graphic card, but then :

ATI Radeon 9800XT NJ (AGP)
(II) Primary Device is: PCI 10:08:0
(II) ATI: Candidate "Device" section "Generic Video Card". (WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected! (EE) No devices detected.

So, i wonder what is going on.

Full log can be found at :

http://people.debian.org/~luther/XFree86.Michel.log

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#10 lore raw
In reply to Sven Luther
Quoted 10 lines · Sven Luther
Quoted 2 lines · Michel Dänzer

You may want to try my dri-trunk-sid packages.

Just tried (all three packages) and my Radeon 9200 SE is not recognized :

(II) PCI: 10:08:0: chip 1002,5964 card 148c,2073 rev 01 class 03,00,00 hdr 00
...
(WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected! (EE) No devices detected.

Hmm.

daenzer@thor|14:50:01> grep 5964 /var/log/XFree86.0.log

        ATI Radeon 9200 5962 (AGP), ATI Radeon 9200SE 5964 (AGP),

If you have Driver "ati" in the Device section, does "radeon" make a difference?

Quoted 1 line

Time for you to make another snapshot ?

Give me the time, and/or fix all the bugs (or at least the important ones) in current DRI/Mesa CVS...

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#11 lore raw

BTW, is it time to move this thread to the dri-devel list or something ?

Quoted 13 lines · Michel Dänzer
Quoted 10 lines · Sven Luther
Quoted 2 lines · Michel Dänzer

You may want to try my dri-trunk-sid packages.

Just tried (all three packages) and my Radeon 9200 SE is not recognized :

(II) PCI: 10:08:0: chip 1002,5964 card 148c,2073 rev 01 class 03,00,00 hdr 00
...
(WW) ATI: PCI/AGP Mach64 in slot 16:8:0 could not be detected! (EE) No devices detected.

Quoted 7 lines

Hmm.

daenzer@thor|14:50:01> grep 5964 /var/log/XFree86.0.log

        ATI Radeon 9200 5962 (AGP), ATI Radeon 9200SE 5964 (AGP),

If you have Driver "ati" in the Device section, does "radeon" make a difference?

Yep, it makes a difference. With radeon it does work. I believe this is because the ati module lacks knowledge about the 5964 to choose the submodule ?

Also, by doing this, the startup time of X is also much faster, it brings the startup time down from 20s, which i feel is to much, to 10-12s.

That said, DRI doesn't work, because it lacks the 9200SE recognition code, i suppose. Should it be ok to apply the same patch that was posted on the debian-x list to your dri-trunk package also ?

Quoted 4 lines
Quoted 1 line

Time for you to make another snapshot ?

Give me the time, and/or fix all the bugs (or at least the important ones) in current DRI/Mesa CVS...

:))

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#12 lore raw
Quoted 1 line · Sven Luther

BTW, is it time to move this thread to the dri-devel list or something ?

It wouldn't be really on topic there either, so maybe just take it off list?

Quoted 2 lines

With radeon it does work. I believe this is because the ati module lacks knowledge about the 5964 to choose the submodule ?

Right, I forgot to merge that.

Quoted 3 lines

That said, DRI doesn't work, because it lacks the 9200SE recognition code, i suppose. Should it be ok to apply the same patch that was posted on the debian-x list to your dri-trunk package also ?

RV280 chips should be treated correctly AFAICT. How does it fail?

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#21 lore raw
In reply to Sven Luther
Quoted 3 lines

Mmm, should it also be needed to put 0 in the Memory Space and IO space bits of the Command register ?

Probably a good idea, yes.

Quoted 4 lines

Also, about the Interrupt line, i believe that there is no interrupt used by the northbridge at this time. We were not speaking about the pci config space of the graphic card, but of the bridge, so it should have no influence with DRI or anything else, right ?

Yup.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#22 lore raw
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 3 lines

Mmm, should it also be needed to put 0 in the Memory Space and IO space bits of the Command register ?

Probably a good idea, yes.

Mmm.

Quoted 6 lines
Quoted 4 lines

Also, about the Interrupt line, i believe that there is no interrupt used by the northbridge at this time. We were not speaking about the pci config space of the graphic card, but of the bridge, so it should have no influence with DRI or anything else, right ?

Yup.

BTW, xfree86 with voodoo cards and the tdfx driver dies with :

(EE) TDFX(0): No valid PIO address in PCI config space

But again, this is with the graphic card which should not be touched here. Tdfxfb is ok though, as is X with the fbdev driver.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/