[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKb7UvjyWPJo-APYEhzGMERSB=652xFX5R0JuE20PFs+RMF_PQ@mail.gmail.com>
Date: Sun, 13 Sep 2015 18:17:17 -0400
From: Ilia Mirkin <imirkin@...m.mit.edu>
To: Ondrej Zary <linux@...nbow-software.org>
Cc: "nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Kernel development list <linux-kernel@...r.kernel.org>,
Ben Skeggs <bskeggs@...hat.com>
Subject: Re: AGP cards in PCI mode (fake slots like AGPro, AGP Express, AGI,
AGX, XGP)
On Sun, Sep 13, 2015 at 6:01 PM, Ondrej Zary <linux@...nbow-software.org> wrote:
> On Sunday 13 September 2015 21:12:25 Ilia Mirkin wrote:
>> On Sun, Sep 13, 2015 at 2:57 PM, Ondrej Zary <linux@...nbow-software.org> wrote:
>> > Hello,
>> > I have a PC Chips A31G board with AGPro slot and found that nouveau does
>> > not work properly with it. Console works but reverts to software mode,
>> > X11 hangs with mouse cursor only.
>> >
>> > The slot is physically AGP 1.5V but is wired to PCI bus as the chipset
>> > (SiS 761) does not support AGP cards. To further complicate things, the
>> > chipset has AGP capability - but only for the integrated video. You can
>> > see that in the lspci output below - the AGP card is on bus 0 and SiS
>> > card on bus 1 (AGP bus behind the AGP bridge). The SiS card is not used
>> > (can be disabled in BIOS but it does not improve things - as the AGP
>> > capability of the host bridge remains active).
>>
>> I believe we can handle it with a blacklist. If the chipset just
>> doesn't support AGP at all, we should just set agpmode=0 irrespective
>> of the card plugged in, right?
>>
>> Shouldn't the agpgart know about this and not even allow any setting
>> at all? This is where we get the idea to set 8x AGP from. See
>> drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.c for details.
>
> The chipset does not support AGP slot but supports AGP for the integrated
> video. So it shouldn't be completely disabled.
>
>> The alternative is to add to nvkm_device_agp_quirks, and just add
>> something that matches just the host bridge vendor/device, ignoring
>> the chip.
>
> Something like this?
Yes, precisely what I had in mind. I don't know if this is the "right"
solution, but it'll definitely work. Ideally we'd somehow find out
from the agpgart that we shouldn't be trying to use AGP, since adding
this quirk to every agp-supporting driver seems like a pain. OTOH this
is long-dead hardware, so a quick hack like this is fine by me. radeon
has a much more extensive list IIRC, may want to add it in there as
well for good measure if it's not already there.
-ilia
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.c
> index 814cb51..385a90f 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.c
> @@ -35,6 +35,8 @@ static const struct nvkm_device_agp_quirk
> nvkm_device_agp_quirks[] = {
> /* VIA Apollo PRO133x / GeForce FX 5600 Ultra - fdo#20341 */
> { PCI_VENDOR_ID_VIA, 0x0691, PCI_VENDOR_ID_NVIDIA, 0x0311, 2 },
> + /* SiS 761 does not support AGP cards, use PCI mode */
> + { PCI_VENDOR_ID_SI, 0x0761, PCI_ANY_ID, PCI_ANY_ID, 0 },
> {},
> };
>
> @@ -137,8 +139,10 @@ nvkm_agp_ctor(struct nvkm_pci *pci)
> while (quirk->hostbridge_vendor) {
> if (info.device->vendor == quirk->hostbridge_vendor &&
> info.device->device == quirk->hostbridge_device &&
> - pci->pdev->vendor == quirk->chip_vendor &&
> - pci->pdev->device == quirk->chip_device) {
> + (quirk->chip_vendor == (u16)PCI_ANY_ID ||
> + pci->pdev->vendor == quirk->chip_vendor) &&
> + (quirk->chip_device == (u16)PCI_ANY_ID ||
> + pci->pdev->device == quirk->chip_device)) {
> nvkm_info(subdev, "forcing default agp mode to %dX, "
> "use NvAGP=<mode> to override\n",
> quirk->mode);
> --
> Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists