aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/gma500/gem.c')
-rw-r--r--drivers/gpu/drm/gma500/gem.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
index f3a1ae8eb77b..eefd6cc5b80d 100644
--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -36,7 +36,12 @@ int psb_gem_init_object(struct drm_gem_object *obj)
36void psb_gem_free_object(struct drm_gem_object *obj) 36void psb_gem_free_object(struct drm_gem_object *obj)
37{ 37{
38 struct gtt_range *gtt = container_of(obj, struct gtt_range, gem); 38 struct gtt_range *gtt = container_of(obj, struct gtt_range, gem);
39 drm_gem_object_release_wrap(obj); 39
40 /* Remove the list map if one is present */
41 if (obj->map_list.map)
42 drm_gem_free_mmap_offset(obj);
43 drm_gem_object_release(obj);
44
40 /* This must occur last as it frees up the memory of the GEM object */ 45 /* This must occur last as it frees up the memory of the GEM object */
41 psb_gtt_free_range(obj->dev, gtt); 46 psb_gtt_free_range(obj->dev, gtt);
42} 47}
@@ -77,7 +82,7 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
77 82
78 /* Make it mmapable */ 83 /* Make it mmapable */
79 if (!obj->map_list.map) { 84 if (!obj->map_list.map) {
80 ret = gem_create_mmap_offset(obj); 85 ret = drm_gem_create_mmap_offset(obj);
81 if (ret) 86 if (ret)
82 goto out; 87 goto out;
83 } 88 }