aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-02-07 13:27:20 +0100
committerThomas White <taw@bitwiz.org.uk>2010-02-09 23:37:33 +0100
commit76ab2acfeea8b762d25dab027e72e98a7b822ed2 (patch)
tree02cc354cb1e9376b7315c2c69dade289e7919840
parentfb08d07798e87830e7acf46439874c8aecd792f5 (diff)
A couple of GEM refcounting fixes
This allows GEM objects to be freed properly, which wasn't working before. Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r--drivers/mfd/glamo/glamo-buffer.c2
-rw-r--r--drivers/mfd/glamo/glamo-drm-drv.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/glamo/glamo-buffer.c b/drivers/mfd/glamo/glamo-buffer.c
index 45500d37417..82ea0c090b5 100644
--- a/drivers/mfd/glamo/glamo-buffer.c
+++ b/drivers/mfd/glamo/glamo-buffer.c
@@ -245,6 +245,8 @@ int glamo_ioctl_gem_mmap(struct drm_device *dev, void *data,
if (!gobj->mmap_offset) {
ret = glamo_gem_create_mmap_offset(obj);
if (ret) {
+ printk(KERN_CRIT "Couldn't create mmap offset\n");
+ drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
return ret;
}
diff --git a/drivers/mfd/glamo/glamo-drm-drv.c b/drivers/mfd/glamo/glamo-drm-drv.c
index 1907a47b510..e7220d5a281 100644
--- a/drivers/mfd/glamo/glamo-drm-drv.c
+++ b/drivers/mfd/glamo/glamo-drm-drv.c
@@ -153,6 +153,8 @@ static int glamodrm_unload(struct drm_device *dev)
static struct vm_operations_struct glamodrm_gem_vm_ops = {
.fault = glamodrm_gem_fault,
+ .open = drm_gem_vm_open,
+ .close = drm_gem_vm_close,
};
static struct drm_driver glamodrm_drm_driver = {