From 75e660e406cd4941f253ddbdeaa45f59d107a014 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 7 Feb 2010 13:27:20 +0100 Subject: [PATCH 9/9] A couple of GEM refcounting fixes This allows GEM objects to be freed properly, which wasn't working before. Signed-off-by: Thomas White --- drivers/mfd/glamo/glamo-buffer.c | 2 ++ drivers/mfd/glamo/glamo-drm-drv.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mfd/glamo/glamo-buffer.c b/drivers/mfd/glamo/glamo-buffer.c index 45500d3..82ea0c0 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 1907a47..e7220d5 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 = { -- 1.6.6.1