From patchwork Fri Mar 4 20:29:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 610111 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p24KTCxn001761 for ; Fri, 4 Mar 2011 20:29:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760147Ab1CDU3L (ORCPT ); Fri, 4 Mar 2011 15:29:11 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:48908 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760139Ab1CDU3K (ORCPT ); Fri, 4 Mar 2011 15:29:10 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e38.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p24DEZQg017870; Fri, 4 Mar 2011 06:14:35 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p24KT76Q107348; Fri, 4 Mar 2011 13:29:07 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p24KT6jP031504; Fri, 4 Mar 2011 13:29:07 -0700 Received: from tux1.beaverton.ibm.com (elm3b50.beaverton.ibm.com [9.47.67.50]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p24KT62b031490; Fri, 4 Mar 2011 13:29:06 -0700 Received: by tux1.beaverton.ibm.com (Postfix, from userid 501) id BFCA613E89F; Fri, 4 Mar 2011 12:29:05 -0800 (PST) Date: Fri, 4 Mar 2011 12:29:05 -0800 From: "Darrick J. Wong" To: Linus Torvalds Cc: Gary Hade , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Helt , Petr Vandrovec , Andrew Morton Subject: [PATCH v2] matroxfb: remove incorrect Matrox G200eV support Message-ID: <20110304202905.GB27190@tux1.beaverton.ibm.com> Reply-To: djwong@us.ibm.com References: <20110301175026.GA18770@us.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 04 Mar 2011 20:29:12 +0000 (UTC) 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... */