diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 1b71b45..aeeaa92 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -1474,6 +1474,8 @@ static inline void drm_gem_object_handle_unreference (struct drm_gem_object *obj
 struct drm_gem_object *
 drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
 		      int handle);
+int drm_gem_name_object(struct drm_device *dev,
+			struct drm_gem_object *obj);
 int drm_gem_close_ioctl(struct drm_device *dev, void *data,
 			struct drm_file *file_priv);
 int drm_gem_flink_ioctl(struct drm_device *dev, void *data,
diff --git a/linux-core/drm_gem.c b/linux-core/drm_gem.c
index 0cbf9ca..a0c56d0 100644
--- a/linux-core/drm_gem.c
+++ b/linux-core/drm_gem.c
@@ -194,6 +194,59 @@ again:
 }
 EXPORT_SYMBOL(drm_gem_handle_create);
 
+int
+drm_gem_name_object(struct drm_device *dev,
+		    struct drm_gem_object *obj)
+{
+	int ret;
+
+	if (!(dev->driver->driver_features & DRIVER_GEM))
+		return -ENODEV;
+
+	mutex_lock(&dev->struct_mutex);
+	drm_gem_object_reference (obj);
+	mutex_unlock(&dev->struct_mutex);
+
+again:
+	if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) {
+		mutex_lock(&dev->struct_mutex);
+		drm_gem_object_unreference(obj);
+		mutex_unlock(&dev->struct_mutex);
+		return -ENOMEM;
+	}
+
+	spin_lock(&dev->object_name_lock);
+	if (obj->name) {
+		spin_unlock(&dev->object_name_lock);
+		mutex_lock(&dev->struct_mutex);
+		drm_gem_object_unreference(obj);
+		mutex_unlock(&dev->struct_mutex);
+		return -EEXIST;
+	}
+	ret = idr_get_new_above(&dev->object_name_idr, obj, 1,
+				 &obj->name);
+	spin_unlock(&dev->object_name_lock);
+	if (ret == -EAGAIN)
+		goto again;
+
+	if (ret != 0) {
+		mutex_lock(&dev->struct_mutex);
+		drm_gem_object_unreference(obj);
+		mutex_unlock(&dev->struct_mutex);
+		return ret;
+	}
+
+	/*
+	 * Leave the obj reference from above around as the
+	 * name table took ownership of it
+	 */
+
+	DRM_DEBUG ("named obj %p with name %d\n", obj, obj->name);
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_gem_name_object);
+
 /** Returns a reference to the object named by the handle. */
 struct drm_gem_object *
 drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
@@ -201,6 +254,25 @@ drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
 {
 	struct drm_gem_object *obj;
 
+	if (handle < 0) {
+		int name = -handle;
+
+		DRM_DEBUG("handle %x is actually name %d\n", handle, name);
+		
+		spin_lock(&dev->object_name_lock);
+		obj = idr_find(&dev->object_name_idr, name);
+
+		if (obj == NULL) {
+			spin_unlock(&dev->object_name_lock);
+			return NULL;
+		}
+
+		drm_gem_object_reference(obj);
+		spin_unlock(&dev->object_name_lock);
+
+		return obj;
+	}
+
 	spin_lock(&filp->table_lock);
 
 	/* Check if we currently have a reference on the object */
@@ -218,6 +290,34 @@ drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
 }
 EXPORT_SYMBOL(drm_gem_object_lookup);
 
+int
+drm_gem_handle_create_from_name(struct drm_device *dev,
+                                struct drm_file *file_priv,
+                                int name, int *handle)
+{
+	struct drm_gem_object *obj;
+	int ret;
+
+	if (!(dev->driver->driver_features & DRIVER_GEM))
+		return -ENODEV;
+
+	spin_lock(&dev->object_name_lock);
+	obj = idr_find(&dev->object_name_idr, name);
+	if (obj)
+		drm_gem_object_reference(obj);
+	spin_unlock(&dev->object_name_lock);
+	if (!obj)
+		return -ENOENT;
+
+	ret = drm_gem_handle_create(file_priv, obj, handle);
+	mutex_lock(&dev->struct_mutex);
+	drm_gem_object_unreference(obj);
+	mutex_unlock(&dev->struct_mutex);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_gem_handle_create_from_name);
+
 /**
  * Releases the handle to an mm object.
  */
@@ -257,35 +357,15 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
 	if (obj == NULL)
 		return -EINVAL;
 
-again:
-	if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0)
-		return -ENOMEM;
+	ret = drm_gem_name_object (dev, obj);
 
-	spin_lock(&dev->object_name_lock);
-	if (obj->name) {
-		spin_unlock(&dev->object_name_lock);
-		return -EEXIST;
-	}
-	ret = idr_get_new_above(&dev->object_name_idr, obj, 1,
-				 &obj->name);
-	spin_unlock(&dev->object_name_lock);
-	if (ret == -EAGAIN)
-		goto again;
-
-	if (ret != 0) {
-		mutex_lock(&dev->struct_mutex);
-		drm_gem_object_unreference(obj);
-		mutex_unlock(&dev->struct_mutex);
-		return ret;
-	}
+	mutex_lock(&dev->struct_mutex);
+	drm_gem_object_unreference(obj);
+	mutex_unlock(&dev->struct_mutex);
 
-	/*
-	 * Leave the reference from the lookup around as the
-	 * name table now holds one
-	 */
 	args->name = (uint64_t) obj->name;
 
-	return 0;
+	return ret;
 }
 
 /**
@@ -306,6 +386,8 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
 	if (!(dev->driver->driver_features & DRIVER_GEM))
 		return -ENODEV;
 
+	DRM_DEBUG("looking up name %d\n", (int) args->name);
+
 	spin_lock(&dev->object_name_lock);
 	obj = idr_find(&dev->object_name_idr, (int) args->name);
 	if (obj)
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index 7676ca4..208bfa6 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -85,6 +85,8 @@ static struct pci_device_id pciidlist[] = {
 	radeon_PCI_IDS
 };
 
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 extern struct drm_fence_driver radeon_fence_driver;
 
 static uint32_t radeon_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
diff --git a/linux-core/radeon_fb.c b/linux-core/radeon_fb.c
index 5cb118c..eb020d6 100644
--- a/linux-core/radeon_fb.c
+++ b/linux-core/radeon_fb.c
@@ -724,6 +724,7 @@ int radeonfb_create(struct drm_device *dev, uint32_t fb_width, uint32_t fb_heigh
 	/* need to align pitch with crtc limits */
 	mode_cmd.pitch = radeon_align_pitch(dev, mode_cmd.width, mode_cmd.bpp) * ((mode_cmd.bpp + 1) / 8);
 	mode_cmd.depth = 24;
+	mode_cmd.handle = 0;
 
 	size = mode_cmd.pitch * mode_cmd.height;
 	aligned_size = ALIGN(size, PAGE_SIZE);
@@ -736,6 +737,14 @@ int radeonfb_create(struct drm_device *dev, uint32_t fb_width, uint32_t fb_heigh
 	}
 	obj_priv = fbo->driver_private;
 
+	ret = drm_gem_name_object (dev, fbo);
+
+	if (ret) {
+		DRM_ERROR("failed to name fb object for userspace: %d\n", ret);
+		mutex_lock(&dev->struct_mutex);
+		goto out_unref;
+	}
+
 	ret = radeon_gem_object_pin(fbo, PAGE_SIZE);
 	if (ret) {
 		DRM_ERROR("failed to pin fb: %d\n", ret);
@@ -751,6 +760,8 @@ int radeonfb_create(struct drm_device *dev, uint32_t fb_width, uint32_t fb_heigh
 		goto out_unref;
 	}
 
+	fb->mm_handle = -fbo->name;
+
 	list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list);
 
 	radeon_fb = to_radeon_framebuffer(fb);
