diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 88910e5..ad12daf 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -128,6 +128,10 @@ config DRM_I915_KMS
 
 endchoice
 
+config DRM_PERMEDIA
+	tristate "Permedia 3/4 driver"
+	depends on DRM && AGP
+
 config DRM_MGA
 	tristate "Matrox g200/g400"
 	depends on DRM
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index abe3f44..26a2397 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_DRM_MGA)	+= mga/
 obj-$(CONFIG_DRM_I810)	+= i810/
 obj-$(CONFIG_DRM_I830)	+= i830/
 obj-$(CONFIG_DRM_I915)  += i915/
+obj-$(CONFIG_DRM_PERMEDIA) +=permedia/
 obj-$(CONFIG_DRM_SIS)   += sis/
 obj-$(CONFIG_DRM_SAVAGE)+= savage/
 obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
diff --git a/drivers/gpu/drm/permedia/Makefile b/drivers/gpu/drm/permedia/Makefile
new file mode 100644
index 0000000..c4b04c8
--- /dev/null
+++ b/drivers/gpu/drm/permedia/Makefile
@@ -0,0 +1,8 @@
+#
+# Makefile for the drm device driver.  This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
+
+ccflags-y := -Iinclude/drm
+permedia-y   := permedia_drv.o permedia_irq.o permedia_kms.o
+
+obj-$(CONFIG_DRM_PERMEDIA) += permedia.o
diff --git a/drivers/gpu/drm/permedia/permedia_drv.c b/drivers/gpu/drm/permedia/permedia_drv.c
new file mode 100644
index 0000000..a0c3759
--- /dev/null
+++ b/drivers/gpu/drm/permedia/permedia_drv.c
@@ -0,0 +1,92 @@
+#include "drmP.h"
+#include "drm.h"
+
+#include "permedia_drv.h"
+#include "permedia_family.h"
+
+#include "drm_pciids.h"
+
+static struct pci_device_id pciidlist[] = {
+	permedia_PCI_IDS
+};
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
+static struct drm_driver driver;
+
+static int __devinit
+permedia_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	int ret = drm_get_dev(pdev, ent, &driver);
+	if (ret == 0)
+		printk(KERN_INFO "Found permedia device!\n");
+	else
+		printk(KERN_INFO "Did not find permedia device.\n");
+	return ret;	
+}
+
+static void
+permedia_pci_remove(struct pci_dev *pdev)
+{
+	struct drm_device *dev = pci_get_drvdata(pdev);
+
+	drm_put_dev(dev);
+}
+
+static struct drm_driver driver = {
+	.driver_features = 0/*DRIVER_MODESET*/,
+	.load = permedia_driver_load,
+	.irq_preinstall = permedia_driver_irq_preinstall,
+	.irq_postinstall = permedia_driver_irq_postinstall,
+	.irq_uninstall = permedia_driver_irq_uninstall,
+	.irq_handler = permedia_driver_irq_handler,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.ioctls = permedia_ioctls,
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.unlocked_ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name = DRIVER_NAME,
+		.id_table = pciidlist,
+		.probe = permedia_pci_probe,
+		.remove = permedia_pci_remove,
+	},
+
+	.name = DRIVER_NAME,
+	.desc = DRIVER_DESC,
+	.date = DRIVER_DATE,
+	.major = DRIVER_MAJOR,
+	.minor = DRIVER_MINOR,
+	.patchlevel = DRIVER_PATCHLEVEL,
+};
+
+static int __init
+permedia_init(void)
+{
+	printk(KERN_INFO "Hello, Permedia3\n");
+	driver.num_ioctls = permedia_max_ioctl;
+
+	return drm_init(&driver);
+}
+
+static void __exit
+permedia_exit(void)
+{
+	printk(KERN_INFO "Bye, Permedia3\n");
+	drm_exit(&driver);
+}
+
+module_init(permedia_init);
+module_exit(permedia_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("Dual MIT/GPL");
diff --git a/drivers/gpu/drm/permedia/permedia_drv.h b/drivers/gpu/drm/permedia/permedia_drv.h
new file mode 100644
index 0000000..617fa6e
--- /dev/null
+++ b/drivers/gpu/drm/permedia/permedia_drv.h
@@ -0,0 +1,25 @@
+#ifndef __PERMEDIA_DRV_H__
+#define __PERMEDIA_DRV_H__
+
+#define DRIVER_AUTHOR		"Matt Turner"
+
+#define DRIVER_NAME		"permedia"
+#define DRIVER_DESC		"3DLabs Permedia"
+#define DRIVER_DATE		"20100526"
+
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		0
+#define DRIVER_PATCHLEVEL	0
+
+				/* permedia_kms.c */
+int permedia_driver_load(struct drm_device *dev, unsigned long flags);
+extern struct drm_ioctl_desc permedia_ioctls[];
+extern int permedia_max_ioctl;
+
+				/* permedia_irq.c */
+void permedia_driver_irq_preinstall(struct drm_device *dev);
+int permedia_driver_irq_postinstall(struct drm_device *dev);
+void permedia_driver_irq_uninstall(struct drm_device *dev);
+irqreturn_t permedia_driver_irq_handler(DRM_IRQ_ARGS);
+
+#endif				/* __PERMEDIA_DRV_H__ */
diff --git a/drivers/gpu/drm/permedia/permedia_family.h b/drivers/gpu/drm/permedia/permedia_family.h
new file mode 100644
index 0000000..79e5256
--- /dev/null
+++ b/drivers/gpu/drm/permedia/permedia_family.h
@@ -0,0 +1,13 @@
+#ifndef PERMEDIA_FAMILY_H
+#define PERMEDIA_FAMILY_H
+/*
+ * Permedia chip families
+ */
+enum permedia_family {
+	PERMEDIA_R3 = 0,
+	PERMEDIA_R4A,
+	PERMEDIA_R4B,
+	PERMEDIA_LAST,
+};
+
+#endif
diff --git a/drivers/gpu/drm/permedia/permedia_irq.c b/drivers/gpu/drm/permedia/permedia_irq.c
new file mode 100644
index 0000000..1ebf5e4
--- /dev/null
+++ b/drivers/gpu/drm/permedia/permedia_irq.c
@@ -0,0 +1,20 @@
+#include "drmP.h"
+#include "drm.h"
+
+irqreturn_t permedia_driver_irq_handler(DRM_IRQ_ARGS)
+{
+	return IRQ_NONE;
+}
+
+void permedia_driver_irq_preinstall(struct drm_device *dev)
+{
+}
+
+int permedia_driver_irq_postinstall(struct drm_device *dev)
+{
+	return 0;
+}
+
+void permedia_driver_irq_uninstall(struct drm_device *dev)
+{
+}
diff --git a/drivers/gpu/drm/permedia/permedia_kms.c b/drivers/gpu/drm/permedia/permedia_kms.c
new file mode 100644
index 0000000..9c6b066
--- /dev/null
+++ b/drivers/gpu/drm/permedia/permedia_kms.c
@@ -0,0 +1,16 @@
+#include "drmP.h"
+#include "drm.h"
+
+int permedia_driver_load(struct drm_device *dev, unsigned long flags)
+{
+	return 0;
+}
+
+void permedia_driver_preclose(struct drm_device *dev, struct drm_file *file_priv)
+{
+}
+
+struct drm_ioctl_desc permedia_ioctls[] = {
+};
+
+int permedia_max_ioctl = DRM_ARRAY_SIZE(permedia_ioctls);
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 2d428b0..497834b 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -531,8 +531,10 @@
 	{0x8086, 0x358e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
 	{0, 0, 0}
 
-#define gamma_PCI_IDS \
-	{0x3d3d, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+#define permedia_PCI_IDS \
+	{0x3d3d, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PERMEDIA_R3}, \
+	{0x3d3d, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PERMEDIA_R4A}, \
+	{0x3d3d, 0x0011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PERMEDIA_R4B}, \
 	{0, 0, 0}
 
 #define savage_PCI_IDS \
