From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: nouveau@lists.freedesktop.org
Cc: mesa-dev@lists.freedesktop.org
Subject: [PATCH v2 2/2] xorg/nouveau: blacklist all pre NV30 cards
Date: Tue, 17 May 2011 00:20:14 +0200 [thread overview]
Message-ID: <20110516222014.GH5456@joi.lan> (raw)
In-Reply-To: <20110516195110.GB5456@joi.lan>
Bail out early in probe, so other driver can take control of the card.
Doing it in screen_create would be too late.
---
src/gallium/targets/xorg-nouveau/nouveau_xorg.c | 44 ++++++++++++++++++-----
1 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
index a25254a..5392e50 100644
--- a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
+++ b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
@@ -38,16 +38,9 @@ static Bool nouveau_xorg_pci_probe(DriverPtr driver, int entity_num,
static const struct pci_id_match nouveau_xorg_device_match[] = {
{ 0x10de, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
0x00030000, 0x00ffffff, 0 },
- { 0x12d2, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
- 0x00030000, 0x00ffffff, 0 },
{0, 0, 0},
};
-static SymTabRec nouveau_xorg_chipsets[] = {
- {PCI_MATCH_ANY, "NVIDIA Graphics Device"},
- {-1, NULL}
-};
-
static PciChipsets nouveau_xorg_pci_devices[] = {
{PCI_MATCH_ANY, PCI_MATCH_ANY, NULL},
{-1, -1, NULL}
@@ -121,16 +114,49 @@ nouveau_xorg_setup(pointer module, pointer opts, int *errmaj, int *errmin)
static void
nouveau_xorg_identify(int flags)
{
- xf86PrintChipsets("nouveau2", "Driver for Modesetting Kernel Drivers",
- nouveau_xorg_chipsets);
+ xf86DrvMsg(0, X_INFO, "nouveau2: Gallium3D based 2D driver for NV30+ NVIDIA chipsets\n");
}
+struct pcirange {
+ unsigned int low;
+ unsigned int high;
+};
+
+/* List of cards we DO NOT SUPPORT. */
+static struct pcirange NVPreNV30Chipsets[] =
+{
+ {0x0020, 0x002F}, /* NV04/05 */
+ {0x00A0, 0x00AF}, /* ? */
+ {0x0100, 0x010F}, /* NV10 */
+ {0x0110, 0x011F}, /* NV11 */
+ {0x01A0, 0x01AF}, /* NV1A */
+ {0x0150, 0x015F}, /* NV15 */
+ {0x0170, 0x017F}, /* NV17 */
+ {0x0180, 0x018F}, /* NV18 */
+ {0x01F0, 0x01FF}, /* NV1F */
+ {0x0200, 0x020F}, /* NV20 */
+ {0x02A0, 0x02AF}, /* NV2A */
+ {0x0250, 0x025F}, /* NV25 */
+ {0x0280, 0x028F}, /* NV28 */
+ {0, 0}
+};
+
+
static Bool
nouveau_xorg_pci_probe(DriverPtr driver,
int entity_num, struct pci_device *device, intptr_t match_data)
{
ScrnInfoPtr scrn = NULL;
EntityInfoPtr entity;
+ struct pcirange *cur;
+
+ if (device->vendor_id != 0x10DE)
+ return FALSE;
+
+ for (cur = &NVPreNV30Chipsets[0]; cur->low != 0; cur++) {
+ if (device->device_id >= cur->low && device->device_id <= cur->high)
+ return FALSE;
+ }
scrn = xf86ConfigPciEntity(scrn, 0, entity_num, nouveau_xorg_pci_devices,
NULL, NULL, NULL, NULL, NULL);
--
1.7.4.1
next prev parent reply other threads:[~2011-05-16 22:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 19:51 [PATCH 2/2] xorg/nouveau: blacklist all pre NV30 cards Marcin Slusarz
2011-05-16 22:20 ` Marcin Slusarz [this message]
[not found] ` <20110516222014.GH5456-OI9uyE9O0yo@public.gmane.org>
2011-06-05 19:06 ` [PATCH v2 " Marcin Slusarz
2011-06-05 19:10 ` [Nouveau] " Stéphane Marchesin
2011-06-05 19:15 ` Maarten Maathuis
2011-06-05 19:46 ` Marcin Slusarz
2011-06-05 19:54 ` Maarten Maathuis
2011-06-05 20:31 ` [PATCH v3 " Marcin Slusarz
[not found] ` <20110605203159.GA26259-OI9uyE9O0yo@public.gmane.org>
2011-06-05 21:43 ` Marcin Kościelnicki
2011-06-06 5:51 ` [Nouveau] " Marcin Slusarz
2011-06-19 22:28 ` Marcin Slusarz
2011-06-05 19:22 ` [PATCH v2 " Patrick Baggett
2011-06-05 19:23 ` Maarten Maathuis
2011-06-05 20:35 ` Marcin Slusarz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110516222014.GH5456@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.