diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-14 21:35:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-14 21:35:53 -0400 |
commit | 08f3dfe8c4b91189890019d307aad236c3633515 (patch) | |
tree | 691ce0fa81741913df3b25ba35b040858ab8d5e5 /drivers/char/agp | |
parent | 0127d6d5d925321650e7b92364420325689a03ef (diff) | |
parent | 8888985144db8f4cb7e56154b31bdf233d3550bf (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
[AGPGART] intel_agp: fix device probe
Diffstat (limited to 'drivers/char/agp')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 97 |
1 files changed, 51 insertions, 46 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index d383168b75fa..0439ee951a11 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -1810,68 +1810,69 @@ static int find_gmch(u16 device) | |||
1810 | static const struct intel_driver_description { | 1810 | static const struct intel_driver_description { |
1811 | unsigned int chip_id; | 1811 | unsigned int chip_id; |
1812 | unsigned int gmch_chip_id; | 1812 | unsigned int gmch_chip_id; |
1813 | unsigned int multi_gmch_chip; /* if we have more gfx chip type on this HB. */ | ||
1813 | char *name; | 1814 | char *name; |
1814 | const struct agp_bridge_driver *driver; | 1815 | const struct agp_bridge_driver *driver; |
1815 | const struct agp_bridge_driver *gmch_driver; | 1816 | const struct agp_bridge_driver *gmch_driver; |
1816 | } intel_agp_chipsets[] = { | 1817 | } intel_agp_chipsets[] = { |
1817 | { PCI_DEVICE_ID_INTEL_82443LX_0, 0, "440LX", &intel_generic_driver, NULL }, | 1818 | { PCI_DEVICE_ID_INTEL_82443LX_0, 0, 0, "440LX", &intel_generic_driver, NULL }, |
1818 | { PCI_DEVICE_ID_INTEL_82443BX_0, 0, "440BX", &intel_generic_driver, NULL }, | 1819 | { PCI_DEVICE_ID_INTEL_82443BX_0, 0, 0, "440BX", &intel_generic_driver, NULL }, |
1819 | { PCI_DEVICE_ID_INTEL_82443GX_0, 0, "440GX", &intel_generic_driver, NULL }, | 1820 | { PCI_DEVICE_ID_INTEL_82443GX_0, 0, 0, "440GX", &intel_generic_driver, NULL }, |
1820 | { PCI_DEVICE_ID_INTEL_82810_MC1, PCI_DEVICE_ID_INTEL_82810_IG1, "i810", | 1821 | { PCI_DEVICE_ID_INTEL_82810_MC1, PCI_DEVICE_ID_INTEL_82810_IG1, 0, "i810", |
1821 | NULL, &intel_810_driver }, | 1822 | NULL, &intel_810_driver }, |
1822 | { PCI_DEVICE_ID_INTEL_82810_MC3, PCI_DEVICE_ID_INTEL_82810_IG3, "i810", | 1823 | { PCI_DEVICE_ID_INTEL_82810_MC3, PCI_DEVICE_ID_INTEL_82810_IG3, 0, "i810", |
1823 | NULL, &intel_810_driver }, | 1824 | NULL, &intel_810_driver }, |
1824 | { PCI_DEVICE_ID_INTEL_82810E_MC, PCI_DEVICE_ID_INTEL_82810E_IG, "i810", | 1825 | { PCI_DEVICE_ID_INTEL_82810E_MC, PCI_DEVICE_ID_INTEL_82810E_IG, 0, "i810", |
1825 | NULL, &intel_810_driver }, | 1826 | NULL, &intel_810_driver }, |
1826 | { PCI_DEVICE_ID_INTEL_82815_MC, PCI_DEVICE_ID_INTEL_82815_CGC, "i815", | 1827 | { PCI_DEVICE_ID_INTEL_82815_MC, PCI_DEVICE_ID_INTEL_82815_CGC, 0, "i815", |
1827 | &intel_810_driver, &intel_815_driver }, | 1828 | &intel_815_driver, &intel_810_driver }, |
1828 | { PCI_DEVICE_ID_INTEL_82820_HB, 0, "i820", &intel_820_driver, NULL }, | 1829 | { PCI_DEVICE_ID_INTEL_82820_HB, 0, 0, "i820", &intel_820_driver, NULL }, |
1829 | { PCI_DEVICE_ID_INTEL_82820_UP_HB, 0, "i820", &intel_820_driver, NULL }, | 1830 | { PCI_DEVICE_ID_INTEL_82820_UP_HB, 0, 0, "i820", &intel_820_driver, NULL }, |
1830 | { PCI_DEVICE_ID_INTEL_82830_HB, PCI_DEVICE_ID_INTEL_82830_CGC, "830M", | 1831 | { PCI_DEVICE_ID_INTEL_82830_HB, PCI_DEVICE_ID_INTEL_82830_CGC, 0, "830M", |
1831 | &intel_830mp_driver, &intel_830_driver }, | 1832 | &intel_830mp_driver, &intel_830_driver }, |
1832 | { PCI_DEVICE_ID_INTEL_82840_HB, 0, "i840", &intel_840_driver, NULL }, | 1833 | { PCI_DEVICE_ID_INTEL_82840_HB, 0, 0, "i840", &intel_840_driver, NULL }, |
1833 | { PCI_DEVICE_ID_INTEL_82845_HB, 0, "845G", &intel_845_driver, NULL }, | 1834 | { PCI_DEVICE_ID_INTEL_82845_HB, 0, 0, "845G", &intel_845_driver, NULL }, |
1834 | { PCI_DEVICE_ID_INTEL_82845G_HB, PCI_DEVICE_ID_INTEL_82845G_IG, "830M", | 1835 | { PCI_DEVICE_ID_INTEL_82845G_HB, PCI_DEVICE_ID_INTEL_82845G_IG, 0, "830M", |
1835 | &intel_845_driver, &intel_830_driver }, | 1836 | &intel_845_driver, &intel_830_driver }, |
1836 | { PCI_DEVICE_ID_INTEL_82850_HB, 0, "i850", &intel_850_driver, NULL }, | 1837 | { PCI_DEVICE_ID_INTEL_82850_HB, 0, 0, "i850", &intel_850_driver, NULL }, |
1837 | { PCI_DEVICE_ID_INTEL_82855PM_HB, 0, "855PM", &intel_845_driver, NULL }, | 1838 | { PCI_DEVICE_ID_INTEL_82855PM_HB, 0, 0, "855PM", &intel_845_driver, NULL }, |
1838 | { PCI_DEVICE_ID_INTEL_82855GM_HB, PCI_DEVICE_ID_INTEL_82855GM_IG, "855GM", | 1839 | { PCI_DEVICE_ID_INTEL_82855GM_HB, PCI_DEVICE_ID_INTEL_82855GM_IG, 0, "855GM", |
1839 | &intel_845_driver, &intel_830_driver }, | 1840 | &intel_845_driver, &intel_830_driver }, |
1840 | { PCI_DEVICE_ID_INTEL_82860_HB, 0, "i860", &intel_860_driver, NULL }, | 1841 | { PCI_DEVICE_ID_INTEL_82860_HB, 0, 0, "i860", &intel_860_driver, NULL }, |
1841 | { PCI_DEVICE_ID_INTEL_82865_HB, PCI_DEVICE_ID_INTEL_82865_IG, "865", | 1842 | { PCI_DEVICE_ID_INTEL_82865_HB, PCI_DEVICE_ID_INTEL_82865_IG, 0, "865", |
1842 | &intel_845_driver, &intel_830_driver }, | 1843 | &intel_845_driver, &intel_830_driver }, |
1843 | { PCI_DEVICE_ID_INTEL_82875_HB, 0, "i875", &intel_845_driver, NULL }, | 1844 | { PCI_DEVICE_ID_INTEL_82875_HB, 0, 0, "i875", &intel_845_driver, NULL }, |
1844 | { PCI_DEVICE_ID_INTEL_82915G_HB, PCI_DEVICE_ID_INTEL_82915G_IG, "915G", | 1845 | { PCI_DEVICE_ID_INTEL_82915G_HB, PCI_DEVICE_ID_INTEL_82915G_IG, 0, "915G", |
1845 | &intel_845_driver, &intel_915_driver }, | 1846 | &intel_845_driver, &intel_915_driver }, |
1846 | { PCI_DEVICE_ID_INTEL_82915GM_HB, PCI_DEVICE_ID_INTEL_82915GM_IG, "915GM", | 1847 | { PCI_DEVICE_ID_INTEL_82915GM_HB, PCI_DEVICE_ID_INTEL_82915GM_IG, 0, "915GM", |
1847 | &intel_845_driver, &intel_915_driver }, | 1848 | &intel_845_driver, &intel_915_driver }, |
1848 | { PCI_DEVICE_ID_INTEL_82945G_HB, PCI_DEVICE_ID_INTEL_82945G_IG, "945G", | 1849 | { PCI_DEVICE_ID_INTEL_82945G_HB, PCI_DEVICE_ID_INTEL_82945G_IG, 0, "945G", |
1849 | &intel_845_driver, &intel_915_driver }, | 1850 | &intel_845_driver, &intel_915_driver }, |
1850 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GM_IG, "945GM", | 1851 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GM_IG, 1, "945GM", |
1851 | &intel_845_driver, &intel_915_driver }, | 1852 | &intel_845_driver, &intel_915_driver }, |
1852 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GME_IG, "945GME", | 1853 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GME_IG, 0, "945GME", |
1853 | &intel_845_driver, &intel_915_driver }, | 1854 | &intel_845_driver, &intel_915_driver }, |
1854 | { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, "946GZ", | 1855 | { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, 0, "946GZ", |
1855 | &intel_845_driver, &intel_i965_driver }, | 1856 | &intel_845_driver, &intel_i965_driver }, |
1856 | { PCI_DEVICE_ID_INTEL_82965G_1_HB, PCI_DEVICE_ID_INTEL_82965G_1_IG, "965G", | 1857 | { PCI_DEVICE_ID_INTEL_82965G_1_HB, PCI_DEVICE_ID_INTEL_82965G_1_IG, 0, "965G", |
1857 | &intel_845_driver, &intel_i965_driver }, | 1858 | &intel_845_driver, &intel_i965_driver }, |
1858 | { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, "965Q", | 1859 | { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, 0, "965Q", |
1859 | &intel_845_driver, &intel_i965_driver }, | 1860 | &intel_845_driver, &intel_i965_driver }, |
1860 | { PCI_DEVICE_ID_INTEL_82965G_HB, PCI_DEVICE_ID_INTEL_82965G_IG, "965G", | 1861 | { PCI_DEVICE_ID_INTEL_82965G_HB, PCI_DEVICE_ID_INTEL_82965G_IG, 0, "965G", |
1861 | &intel_845_driver, &intel_i965_driver }, | 1862 | &intel_845_driver, &intel_i965_driver }, |
1862 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GM_IG, "965GM", | 1863 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GM_IG, 1, "965GM", |
1863 | &intel_845_driver, &intel_i965_driver }, | 1864 | &intel_845_driver, &intel_i965_driver }, |
1864 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GME_IG, "965GME/GLE", | 1865 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GME_IG, 0, "965GME/GLE", |
1865 | &intel_845_driver, &intel_i965_driver }, | 1866 | &intel_845_driver, &intel_i965_driver }, |
1866 | { PCI_DEVICE_ID_INTEL_7505_0, 0, "E7505", &intel_7505_driver, NULL }, | 1867 | { PCI_DEVICE_ID_INTEL_7505_0, 0, 0, "E7505", &intel_7505_driver, NULL }, |
1867 | { PCI_DEVICE_ID_INTEL_7205_0, 0, "E7205", &intel_7505_driver, NULL }, | 1868 | { PCI_DEVICE_ID_INTEL_7205_0, 0, 0, "E7205", &intel_7505_driver, NULL }, |
1868 | { PCI_DEVICE_ID_INTEL_G33_HB, PCI_DEVICE_ID_INTEL_G33_IG, "G33", | 1869 | { PCI_DEVICE_ID_INTEL_G33_HB, PCI_DEVICE_ID_INTEL_G33_IG, 0, "G33", |
1869 | &intel_845_driver, &intel_g33_driver }, | 1870 | &intel_845_driver, &intel_g33_driver }, |
1870 | { PCI_DEVICE_ID_INTEL_Q35_HB, PCI_DEVICE_ID_INTEL_Q35_IG, "Q35", | 1871 | { PCI_DEVICE_ID_INTEL_Q35_HB, PCI_DEVICE_ID_INTEL_Q35_IG, 0, "Q35", |
1871 | &intel_845_driver, &intel_g33_driver }, | 1872 | &intel_845_driver, &intel_g33_driver }, |
1872 | { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, "Q33", | 1873 | { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", |
1873 | &intel_845_driver, &intel_g33_driver }, | 1874 | &intel_845_driver, &intel_g33_driver }, |
1874 | { 0, 0, NULL, NULL, NULL } | 1875 | { 0, 0, 0, NULL, NULL, NULL } |
1875 | }; | 1876 | }; |
1876 | 1877 | ||
1877 | static int __devinit agp_intel_probe(struct pci_dev *pdev, | 1878 | static int __devinit agp_intel_probe(struct pci_dev *pdev, |
@@ -1892,10 +1893,19 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1892 | /* In case that multiple models of gfx chip may | 1893 | /* In case that multiple models of gfx chip may |
1893 | stand on same host bridge type, this can be | 1894 | stand on same host bridge type, this can be |
1894 | sure we detect the right IGD. */ | 1895 | sure we detect the right IGD. */ |
1895 | if ((pdev->device == intel_agp_chipsets[i].chip_id) && | 1896 | if (pdev->device == intel_agp_chipsets[i].chip_id) { |
1896 | ((intel_agp_chipsets[i].gmch_chip_id == 0) || | 1897 | if ((intel_agp_chipsets[i].gmch_chip_id != 0) && |
1897 | find_gmch(intel_agp_chipsets[i].gmch_chip_id))) | 1898 | find_gmch(intel_agp_chipsets[i].gmch_chip_id)) { |
1898 | break; | 1899 | bridge->driver = |
1900 | intel_agp_chipsets[i].gmch_driver; | ||
1901 | break; | ||
1902 | } else if (intel_agp_chipsets[i].multi_gmch_chip) { | ||
1903 | continue; | ||
1904 | } else { | ||
1905 | bridge->driver = intel_agp_chipsets[i].driver; | ||
1906 | break; | ||
1907 | } | ||
1908 | } | ||
1899 | } | 1909 | } |
1900 | 1910 | ||
1901 | if (intel_agp_chipsets[i].name == NULL) { | 1911 | if (intel_agp_chipsets[i].name == NULL) { |
@@ -1906,11 +1916,6 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1906 | return -ENODEV; | 1916 | return -ENODEV; |
1907 | } | 1917 | } |
1908 | 1918 | ||
1909 | if (intel_agp_chipsets[i].gmch_chip_id != 0) | ||
1910 | bridge->driver = intel_agp_chipsets[i].gmch_driver; | ||
1911 | else | ||
1912 | bridge->driver = intel_agp_chipsets[i].driver; | ||
1913 | |||
1914 | if (bridge->driver == NULL) { | 1919 | if (bridge->driver == NULL) { |
1915 | printk(KERN_WARNING PFX "Failed to find bridge device " | 1920 | printk(KERN_WARNING PFX "Failed to find bridge device " |
1916 | "(chip_id: %04x)\n", intel_agp_chipsets[i].gmch_chip_id); | 1921 | "(chip_id: %04x)\n", intel_agp_chipsets[i].gmch_chip_id); |