summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2005-12-03 01:23:50 +0000
committeranholt <anholt@FreeBSD.org>2005-12-03 01:23:50 +0000
commitec3e11dc526f447eb9ff75bbd7ed3f4f8b30231c (patch)
treeb66cb53d5f41f8985139fef130ed7084a4930f71
parenta4f1b36f3ef8c2625919df1ff99c54138de83b1e (diff)
downloadFreeBSD-src-ec3e11dc526f447eb9ff75bbd7ed3f4f8b30231c.zip
FreeBSD-src-ec3e11dc526f447eb9ff75bbd7ed3f4f8b30231c.tar.gz
Merge DRM CVS as of 2005-12-02, adding i915 DRM support thanks to Alexey Popov,
and a new r300 PCI ID.
-rw-r--r--sys/amd64/conf/NOTES1
-rw-r--r--sys/conf/files4
-rw-r--r--sys/dev/drm/drm_drv.c13
-rw-r--r--sys/dev/drm/drm_pciids.h1
-rw-r--r--sys/dev/drm/i915_drv.c2
-rw-r--r--sys/i386/conf/NOTES1
-rw-r--r--sys/modules/drm/Makefile1
7 files changed, 18 insertions, 5 deletions
diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES
index 2a90df5..cdb8d66 100644
--- a/sys/amd64/conf/NOTES
+++ b/sys/amd64/conf/NOTES
@@ -204,6 +204,7 @@ device cpufreq
# Direct Rendering modules for 3D acceleration.
device drm # DRM core module required by DRM drivers
+device i915drm # Intel i830 through i915
device mach64drm # ATI Rage Pro, Rage Mobility P/M, Rage XL
device mgadrm # AGP Matrox G200, G400, G450, G550
device r128drm # ATI Rage 128
diff --git a/sys/conf/files b/sys/conf/files
index 6e6832c..f7efe09 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -535,6 +535,10 @@ dev/drm/drm_pci.c optional drm
dev/drm/drm_scatter.c optional drm
dev/drm/drm_sysctl.c optional drm
dev/drm/drm_vm.c optional drm
+dev/drm/i915_dma.c optional i915drm
+dev/drm/i915_drv.c optional i915drm
+dev/drm/i915_irq.c optional i915drm
+dev/drm/i915_mem.c optional i915drm
dev/drm/mach64_dma.c optional mach64drm
dev/drm/mach64_drv.c optional mach64drm
dev/drm/mach64_irq.c optional mach64drm
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c
index 1801bee..eb9c644 100644
--- a/sys/dev/drm/drm_drv.c
+++ b/sys/dev/drm/drm_drv.c
@@ -153,9 +153,14 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist)
{
drm_pci_id_list_t *id_entry;
int vendor, device;
+ device_t realdev;
- vendor = pci_get_vendor(dev);
- device = pci_get_device(dev);
+ if (!strcmp(device_get_name(dev), "drmsub"))
+ realdev = device_get_parent(dev);
+ else
+ realdev = dev;
+ vendor = pci_get_vendor(realdev);
+ device = pci_get_device(realdev);
id_entry = drm_find_description(vendor, device, idlist);
if (id_entry != NULL) {
@@ -190,8 +195,8 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
mtx_init(&dev->dev_lock, "drm device", NULL, MTX_DEF);
#endif
- id_entry = drm_find_description(pci_get_vendor(nbdev),
- pci_get_device(nbdev), idlist);
+ id_entry = drm_find_description(pci_get_vendor(dev->device),
+ pci_get_device(dev->device), idlist);
dev->id_entry = id_entry;
return drm_load(dev);
diff --git a/sys/dev/drm/drm_pciids.h b/sys/dev/drm/drm_pciids.h
index d0868a5..42e9a09 100644
--- a/sys/dev/drm/drm_pciids.h
+++ b/sys/dev/drm/drm_pciids.h
@@ -93,6 +93,7 @@
{0x1002, 0x5c63, CHIP_RV280|CHIP_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \
{0x1002, 0x5c64, CHIP_RV280, "ATI Radeon RV280"}, \
{0x1002, 0x5d4d, CHIP_R350, "ATI Radeon R480"}, \
+ {0x1002, 0x5e4b, CHIP_R420, "ATI Radeon RV410 X700PRO"}, \
{0, 0, 0, NULL}
#define r128_PCI_IDS \
diff --git a/sys/dev/drm/i915_drv.c b/sys/dev/drm/i915_drv.c
index 3a632d4..f2ab394 100644
--- a/sys/dev/drm/i915_drv.c
+++ b/sys/dev/drm/i915_drv.c
@@ -104,7 +104,7 @@ static driver_t i915_driver = {
};
extern devclass_t drm_devclass;
-DRIVER_MODULE(i915, pci, i915_driver, drm_devclass, 0, 0);
+DRIVER_MODULE(i915, agp, i915_driver, drm_devclass, 0, 0);
MODULE_DEPEND(i915, drm, 1, 1, 1);
#elif defined(__NetBSD__) || defined(__OpenBSD__)
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 347b43c..6e4d701 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -467,6 +467,7 @@ device cpufreq
# Direct Rendering modules for 3D acceleration.
device drm # DRM core module required by DRM drivers
+device i915drm # Intel i830 through i915
device mach64drm # ATI Rage Pro, Rage Mobility P/M, Rage XL
device mgadrm # AGP Matrox G200, G400, G450, G550
device r128drm # ATI Rage 128
diff --git a/sys/modules/drm/Makefile b/sys/modules/drm/Makefile
index b2cfa04..a953b37 100644
--- a/sys/modules/drm/Makefile
+++ b/sys/modules/drm/Makefile
@@ -2,6 +2,7 @@
SUBDIR = \
drm \
+ i915 \
mach64 \
mga \
r128 \
OpenPOWER on IntegriCloud