From owner-svn-src-all@FreeBSD.ORG Thu Dec 18 21:58:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB6CD1065677; Thu, 18 Dec 2008 21:58:57 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C095D8FC0C; Thu, 18 Dec 2008 21:58:57 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBILwvrv053337; Thu, 18 Dec 2008 21:58:57 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBILwvX9053335; Thu, 18 Dec 2008 21:58:57 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812182158.mBILwvX9053335@svn.freebsd.org> From: Robert Noland Date: Thu, 18 Dec 2008 21:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186299 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 21:58:57 -0000 Author: rnoland Date: Thu Dec 18 21:58:57 2008 New Revision: 186299 URL: http://svn.freebsd.org/changeset/base/186299 Log: We only want drm to ever attach to the primary pci device. Intel 855 chips present the same pci id for both heads. This prevents us from attaching to the dummy second head. All other chips that I am aware of either only present a single pci id, or different ids for each head so that we only match on the correct head. Approved by: kib@ MFC after: 2 weeks Modified: head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_drv.c Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Thu Dec 18 21:46:18 2008 (r186298) +++ head/sys/dev/drm/drmP.h Thu Dec 18 21:58:57 2008 (r186299) @@ -87,6 +87,7 @@ struct drm_file; #include #include #include +#include #include #include Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Thu Dec 18 21:46:18 2008 (r186298) +++ head/sys/dev/drm/drm_drv.c Thu Dec 18 21:58:57 2008 (r186299) @@ -152,6 +152,10 @@ int drm_probe(device_t dev, drm_pci_id_l device = pci_get_device(dev); #endif + if (pci_get_class(dev) != PCIC_DISPLAY + || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + return ENXIO; + id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { device_set_desc(dev, id_entry->name);