diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-24 15:47:34 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-08-23 23:30:02 (GMT) |
commit | 4d46259f00c6dd04d53e74cdfa8f8b6ec35c0140 (patch) | |
tree | 491a71f72c97cae18a9b0eb5b87424550370514d /drivers/gpu/drm/gma500/gem.c | |
parent | 9a9f5786fcccda3cc61eaa8f537690327eff6853 (diff) | |
download | linux-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index fc7d144..df20546 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; } |