summaryrefslogtreecommitdiff
path: root/linux/drm_ioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_ioctl.h')
-rw-r--r--linux/drm_ioctl.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/linux/drm_ioctl.h b/linux/drm_ioctl.h
index 2fba6b0c..1cc8f31f 100644
--- a/linux/drm_ioctl.h
+++ b/linux/drm_ioctl.h
@@ -95,6 +95,27 @@ int DRM(setunique)(struct inode *inode, struct file *filp,
DRM_MEM_DRIVER);
sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
+#ifdef __alpha__
+ do {
+ struct pci_dev *pci_dev;
+ int b, d, f;
+ char *p;
+
+ for(p = dev->unique; p && *p && *p != ':'; p++);
+ if (!p || !*p) break;
+ b = (int)simple_strtoul(p+1, &p, 10);
+ if (*p != ':') break;
+ d = (int)simple_strtoul(p+1, &p, 10);
+ if (*p != ':') break;
+ f = (int)simple_strtoul(p+1, &p, 10);
+ if (*p) break;
+
+ pci_dev = pci_find_slot(b, PCI_DEVFN(d,f));
+ if (pci_dev)
+ dev->hose = pci_dev->sysdata;
+ } while(0);
+#endif
+
return 0;
}