diff options
author | Alan Cox <alan@linux.intel.com> | 2011-07-05 15:37:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-05 08:20:40 -0700 |
commit | 5338afdfb5eeaefeefd9dcdb06977920eca5d941 (patch) | |
tree | e2bb313c655e2cb7905e746460c23d3254a578e8 | |
parent | 078d6f71677cda935ed182dbb391e946e13766ec (diff) | |
download | op-kernel-dev-5338afdfb5eeaefeefd9dcdb06977920eca5d941.zip op-kernel-dev-5338afdfb5eeaefeefd9dcdb06977920eca5d941.tar.gz |
gma500: Update the GEM todo
We also pull out the undo side of the mmap offset processing so we can later
push it into GEM where it belongs
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/gma500/gem_glue.c | 9 | ||||
-rw-r--r-- | drivers/staging/gma500/psb_gem.c | 15 |
2 files changed, 10 insertions, 14 deletions
diff --git a/drivers/staging/gma500/gem_glue.c b/drivers/staging/gma500/gem_glue.c index 0e7364b..779ac1a 100644 --- a/drivers/staging/gma500/gem_glue.c +++ b/drivers/staging/gma500/gem_glue.c @@ -42,6 +42,15 @@ int drm_gem_private_object_init(struct drm_device *dev, void drm_gem_object_release_wrap(struct drm_gem_object *obj) { + /* Remove the list map if one is present */ + if (obj->map_list.map) { + struct drm_gem_mm *mm = obj->dev->mm_private; + struct drm_map_list *list = &obj->map_list; + drm_ht_remove_item(&mm->offset_hash, &list->hash); + drm_mm_put_block(list->file_offset_node); + kfree(list->map); + list->map = NULL; + } if (obj->filp) drm_gem_object_release(obj); } diff --git a/drivers/staging/gma500/psb_gem.c b/drivers/staging/gma500/psb_gem.c index 1e7faae..a63ad9e 100644 --- a/drivers/staging/gma500/psb_gem.c +++ b/drivers/staging/gma500/psb_gem.c @@ -19,12 +19,8 @@ * Authors: Alan Cox * * TODO: - * - we don't actually put GEM objects into the GART yet - * - we need to work out if the MMU is relevant as well (eg for + * - we need to work out if the MMU is relevant (eg for * accelerated operations on a GEM object) - * - cache coherency - * - * ie this is just an initial framework to get us going. */ #include <drm/drmP.h> @@ -40,15 +36,6 @@ 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); - if (obj->map_list.map) { - /* Do things GEM should do for us */ - struct drm_gem_mm *mm = obj->dev->mm_private; - struct drm_map_list *list = &obj->map_list; - drm_ht_remove_item(&mm->offset_hash, &list->hash); - drm_mm_put_block(list->file_offset_node); - kfree(list->map); - list->map = NULL; - } drm_gem_object_release_wrap(obj); /* This must occur last as it frees up the memory of the GEM object */ psb_gtt_free_range(obj->dev, gtt); |