Skip to contentSkip to conversation

2.4.x, drm, g400 and pci_set_master

DISCUSSION Alex Deucher 2 participants 3 messages Feb 8, 2001

lore
Share & tools
lore
#0 lore raw

I'm not sure about the mga source, but you can enable busmaster manually as root. See the dri-devel list for more. I can't remember the exact message off hand. THere was also some discussion of this last week I think.

Alex

----------------------------

Hi,
friend of mine bought g400 on my recommendation, and unfortunately,
mga drm driver did not worked for me. I tracked it down to missing pci_enable_device and pci_set_master in mga* driver. But even after looking more than hour into that code I have no idea where I should place this call, as it looks like that mga driver is completely shielded from seeing pcidev structure :-(
Does anybody know where I should place pci_enable_device and
pci_set_master into mga code? I worked around pci_enable_device by using matroxfb, but pci_set_master is not invoked by matroxfb, and adding this call into matroxfb just to get mga drm driver to work does not look correctly to me - although it is what I had done just now.
Thanks,
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 10 lines · Alex Deucher

I'm not sure about the mga source, but you can enable busmaster manually as root. See the dri-devel list for more. I can't remember the exact message off hand. THere was also some discussion of this last week I think.

Alex

----------------------------

Quoted 13 lines

Hi,
friend of mine bought g400 on my recommendation, and unfortunately,
mga drm driver did not worked for me. I tracked it down to missing pci_enable_device and pci_set_master in mga* driver. But even after looking more than hour into that code I have no idea where I should place this call, as it looks like that mga driver is completely shielded from seeing pcidev structure :-(
Does anybody know where I should place pci_enable_device and
pci_set_master into mga code? I worked around pci_enable_device by using matroxfb, but pci_set_master is not invoked by matroxfb, and adding this call into matroxfb just to get mga drm driver to work does not look correctly to me - although it is what I had done just now.
Thanks,
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/

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):

{
CARD32 temp;
temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG); pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |
PCI_CMD_MASTER_ENABLE);
}

-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 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.

Alex

Quoted 40 lines · Jeff Hartmann
Quoted 21 lines · Alex Deucher

I'm not sure about the mga source, but you can enable busmaster manually as root. See the dri-devel list for more. I can't remember the exact message off hand. THere was also some discussion of this last week I think.

Alex

----------------------------

Hi,
friend of mine bought g400 on my recommendation, and unfortunately,
mga drm driver did not worked for me. I tracked it down to missing pci_enable_device and pci_set_master in mga* driver. But even after looking more than hour into that code I have no idea where I should place this call, as it looks like that mga driver is completely shielded from seeing pcidev structure :-(
Does anybody know where I should place pci_enable_device and
pci_set_master into mga code? I worked around pci_enable_device by using matroxfb, but pci_set_master is not invoked by matroxfb, and adding this call into matroxfb just to get mga drm driver to work does

Quoted 9 lines

not look correctly to me - although it is what I had done just now.
Thanks,
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/

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 8 lines
{
   CARD32 temp;
   temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
   pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |

PCI_CMD_MASTER_ENABLE);
}

-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/