Re: AGP bogosities

Paul Mackerras
2005-03-11T02:22:07Z

Dave Jones writes:

> > cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
> > - if (!cap_ptr) {
> > - pci_dev_put(device);
> > - continue;
> > - }
> > - cap_ptr = 0;
> > }
>
> This part I'm not so sure about.
> The pci_get_class() call a few lines above will get a refcount that
> we will now never release.

The point is that pci_get_class does a pci_dev_put() on the "from"
parameter, so your code ended up doing a double put.

> Unfortunatly, no-one with ppc64 tested it there it seems :-(

I have only recently got AGP and DRI working on my G5. I'll post a
patch for AGP support on the G5 shortly.

Paul.