summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/gem.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-24 19:47:34 +0400
committerDave Airlie <airlied@redhat.com>2012-08-24 03:30:02 +0400
commit4d46259f00c6dd04d53e74cdfa8f8b6ec35c0140 (patch)
tree491a71f72c97cae18a9b0eb5b87424550370514d /drivers/gpu/drm/gma500/gem.c
parent9a9f5786fcccda3cc61eaa8f537690327eff6853 (diff)
downloadlinux-4d46259f00c6dd04d53e74cdfa8f8b6ec35c0140.tar.xz
drm: gma500: Kill the GEM glue layer
The private gem_create_mmap_offset() function is now implemented in the DRM core as drm_gem_create_mmap_offset(). Use it and kill the private copy. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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 fc7d144bc2d3..df20546a2a34 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)
void psb_gem_free_object(struct drm_gem_object *obj)
{
struct gtt_range *gtt = container_of(obj, struct gtt_range, gem);
- drm_gem_object_release_wrap(obj);
+
+ /* Remove the list map if one is present */
+ if (obj->map_list.map)
+ drm_gem_free_mmap_offset(obj);
+ drm_gem_object_release(obj);
+
/* This must occur last as it frees up the memory of the GEM object */
psb_gtt_free_range(obj->dev, gtt);
}
@@ -77,7 +82,7 @@ int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
/* Make it mmapable */
if (!obj->map_list.map) {
- ret = gem_create_mmap_offset(obj);
+ ret = drm_gem_create_mmap_offset(obj);
if (ret)
goto out;
}