lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201509140001.55580.linux@rainbow-software.org>
Date:	Mon, 14 Sep 2015 00:01:55 +0200
From:	Ondrej Zary <linux@...nbow-software.org>
To:	Ilia Mirkin <imirkin@...m.mit.edu>
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>
Subject: Re: AGP cards in PCI mode (fake slots like AGPro, AGP Express, AGI, AGX, XGP)

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?

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ