diff mbox

[v2] matroxfb: remove incorrect Matrox G200eV support

Message ID 20110304202905.GB27190@tux1.beaverton.ibm.com (mailing list archive)
State Superseded
Headers show

Commit Message

Darrick J. Wong March 4, 2011, 8:29 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index a082deb..a86e401 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -1385,6 +1385,17 @@  static struct video_board vbG400		= {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG4
 #define DEVF_G450	(DEVF_GCORE | DEVF_ANY_VXRES | DEVF_SUPPORT32MB | DEVF_TEXT16B | DEVF_CRTC2 | DEVF_G450DAC | DEVF_SRCORG | DEVF_DUALHEAD)
 #define DEVF_G550	(DEVF_G450)
 
+static struct blacklisted_board {
+	unsigned short vendor, device, svid, sid;
+		} black_list[] = {
+#ifdef CONFIG_FB_MATROX_G
+	/* Onboard G200eV in IBM servers cause display failures */
+	{PCI_VENDOR_ID_MATROX,	PCI_DEVICE_ID_MATROX_G200EV_PCI,
+	 PCI_VENDOR_ID_IBM, 0},
+#endif
+	{0, 0, 0, 0},
+};
+
 static struct board {
 	unsigned short vendor, device, rev, svid, sid;
 	unsigned int flags;
@@ -2012,10 +2023,11 @@  static void matroxfb_unregister_device(struct matrox_fb_info* minfo) {
 
 static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dummy) {
 	struct board* b;
+	struct blacklisted_board *d;
 	u_int16_t svid;
 	u_int16_t sid;
 	struct matrox_fb_info* minfo;
-	int err;
+	int err, ignore;
 	u_int32_t cmd;
 	DBG(__func__)
 
@@ -2025,6 +2037,17 @@  static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
 		if ((b->vendor != pdev->vendor) || (b->device != pdev->device) || (b->rev < pdev->revision)) continue;
 		if (b->svid)
 			if ((b->svid != svid) || (b->sid != sid)) continue;
+		ignore = 0;
+		for (d = black_list; d->vendor; d++)
+			if (d->vendor == pdev->vendor &&
+			    d->device == pdev->device &&
+			    d->svid == svid &&
+			    (!d->sid || d->sid == sid)) {
+				ignore = 1;
+				break;
+			}
+		if (ignore)
+			continue;
 		break;
 	}
 	/* not match... */