Skip to contentSkip to conversation

2.4.x, drm, g400 and pci_set_master

DISCUSSION Petr Vandrovec 3 participants 3 messages Feb 8, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Alex Deucher

I wasn't talking about the drm driver I was talking about programming the PCI controller directly using setpci 1.0.0 .... or some such command, I can't remember off hand. Which turns on busmastering if it is off for a particular device.

OK.

Quoted 8 lines
Quoted 7 lines · Jeff Hartmann

The DRM drivers don't know about the pcidev structure at all. All this is done in the XFree86 ddx driver. You can probably add something like this to MGAPreInit (after pMga->PciTag is set, in my copy its mga_driver.c:1232 yours might be at a slightly different line number depending on the version your using):

Quoted 6 lines
Quoted 6 lines
{
   CARD32 temp;
   temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
   pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |

PCI_CMD_MASTER_ENABLE);
}

Jeff, do you say that drm code does not use dynamic DMA mapping, which is specified as only busmastering interface for kernels 2.4.x, at all? Now I understand what had one friend in the mind when he laughed when I said that it must be easy to get it to work on Alpha...
Thanks anyway for all suggestions,
Petr Vandrovec [email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 26 lines · Petr Vandrovec
Quoted 4 lines · Alex Deucher

I wasn't talking about the drm driver I was talking about programming the PCI controller directly using setpci 1.0.0 .... or some such command, I can't remember off hand. Which turns on busmastering if it is off for a particular device.

OK.

Quoted 8 lines
Quoted 6 lines · Jeff Hartmann

The DRM drivers don't know about the pcidev structure at all. All this is done in the XFree86 ddx driver. You can probably add something like this to MGAPreInit (after pMga->PciTag is set, in my copy its mga_driver.c:1232 yours might be at a slightly different line number depending on the version your using):

Quoted 7 lines
Quoted 6 lines
{
   CARD32 temp;
   temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
   pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |

PCI_CMD_MASTER_ENABLE);
}

Quoted 7 lines

Jeff, do you say that drm code does not use dynamic DMA mapping, which is
specified as only busmastering interface for kernels 2.4.x, at all? Now I understand what had one friend in the mind when he laughed when I said that it must be easy to get it to work on Alpha...
Thanks anyway for all suggestions,
Petr Vandrovec
[email protected]

It does not use dynamic DMA mapping, because it doesn't do PCI DMA at all. It uses AGP DMA. Actually, it shouldn't be too hard to get it to work on the Alpha (just a few 32/64 bit issues probably.) Someone just needs to get agpgart working on the Alpha, thats the big step.

-Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Petr Vandrovec
Quoted 38 lines · Jeff Hartmann
Quoted 26 lines · Petr Vandrovec
Quoted 4 lines · Alex Deucher

I wasn't talking about the drm driver I was talking about programming the PCI controller directly using setpci 1.0.0 .... or some such command, I can't remember off hand. Which turns on busmastering if it is off for a particular device.

OK.

Quoted 8 lines
Quoted 6 lines · Jeff Hartmann

The DRM drivers don't know about the pcidev structure at all. All this is done in the XFree86 ddx driver. You can probably add something like this to MGAPreInit (after pMga->PciTag is set, in my copy its mga_driver.c:1232 yours might be at a slightly different line number depending on the version your using):

Quoted 7 lines
Quoted 6 lines
{
   CARD32 temp;
   temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
   pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |

PCI_CMD_MASTER_ENABLE);
}

Quoted 9 lines

Jeff, do you say that drm code does not use dynamic DMA mapping, which is specified as only busmastering interface for kernels 2.4.x, at all? Now I understand what had one friend in the mind when he laughed when I said that it must be easy to get it to work on Alpha...
Thanks anyway for all suggestions,
Petr Vandrovec [email protected]

Quoted 6 lines

It does not use dynamic DMA mapping, because it doesn't do PCI DMA at all. It uses AGP DMA. Actually, it shouldn't be too hard to get it to work on the Alpha (just a few 32/64 bit issues probably.) Someone just needs to get agpgart working on the Alpha, thats the big step.

-Jeff

That shouldn't be too hard since many (all?) AGP alpha boards (UP1000's anyway) are based on the AMD 751 Northbridge? And there is already support for that in the kernel for x86.

Alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/