Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259673
b: refs/heads/master
c: 5338afd
h: refs/heads/master
i:
  259671: 9a1c25f
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 0c8d9a5 commit 8ef61c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 078d6f71677cda935ed182dbb391e946e13766ec
refs/heads/master: 5338afdfb5eeaefeefd9dcdb06977920eca5d941
9 changes: 9 additions & 0 deletions trunk/drivers/staging/gma500/gem_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
15 changes: 1 addition & 14 deletions trunk/drivers/staging/gma500/psb_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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);
Expand Down

0 comments on commit 8ef61c8

Please sign in to comment.