]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
gma500: Update the GEM todo
authorAlan Cox <alan@linux.intel.com>
Tue, 5 Jul 2011 14:37:55 +0000 (15:37 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 15:20:40 +0000 (08:20 -0700)
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>
drivers/staging/gma500/gem_glue.c
drivers/staging/gma500/psb_gem.c

index 0e7364ba1d4bddc4bb1bd2e90448e49676ef7daf..779ac1a12d24909cf9940794934a5ed5f55dbd30 100644 (file)
@@ -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);
 }
index 1e7faaeee14c06601e06a7c646ffa13a7cfd981a..a63ad9e54dd2eb67a9a51bc747e15463161c0099 100644 (file)
  * 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);