Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282663
b: refs/heads/master
c: aa38e2e
h: refs/heads/master
i:
  282661: e9d4613
  282659: e168c3b
  282655: 4ace1b2
v: v3
  • Loading branch information
Daniel Vetter committed Dec 21, 2011
1 parent 4df49c5 commit 44af0e8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 58 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: c828e20456301b0f5192a1f75e8bf8a6afd15551
refs/heads/master: aa38e2e01521f88e9b0230c0236d2bd89d0af0ed
38 changes: 0 additions & 38 deletions trunk/drivers/gpu/drm/drm_sman.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,27 +279,6 @@ static void drm_sman_remove_owner(struct drm_sman *sman,
kfree(owner_item);
}

int drm_sman_owner_clean(struct drm_sman *sman, unsigned long owner)
{

struct drm_hash_item *hash_item;
struct drm_owner_item *owner_item;

if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) {
return -1;
}

owner_item = drm_hash_entry(hash_item, struct drm_owner_item, owner_hash);
if (owner_item->mem_blocks.next == &owner_item->mem_blocks) {
drm_sman_remove_owner(sman, owner_item);
return -1;
}

return 0;
}

EXPORT_SYMBOL(drm_sman_owner_clean);

static void drm_sman_do_owner_cleanup(struct drm_sman *sman,
struct drm_owner_item *owner_item)
{
Expand All @@ -312,23 +291,6 @@ static void drm_sman_do_owner_cleanup(struct drm_sman *sman,
drm_sman_remove_owner(sman, owner_item);
}

void drm_sman_owner_cleanup(struct drm_sman *sman, unsigned long owner)
{

struct drm_hash_item *hash_item;
struct drm_owner_item *owner_item;

if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) {

return;
}

owner_item = drm_hash_entry(hash_item, struct drm_owner_item, owner_hash);
drm_sman_do_owner_cleanup(sman, owner_item);
}

EXPORT_SYMBOL(drm_sman_owner_cleanup);

void drm_sman_cleanup(struct drm_sman *sman)
{
struct drm_owner_item *entry, *next;
Expand Down
19 changes: 0 additions & 19 deletions trunk/include/drm/drm_sman.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,25 +148,6 @@ extern struct drm_memblock_item *drm_sman_alloc(struct drm_sman * sman,
extern int drm_sman_free_key(struct drm_sman * sman, unsigned int key);
extern void drm_sman_free(struct drm_memblock_item *item);

/*
* returns 1 iff there are no stale memory blocks associated with this owner.
* Typically called to determine if we need to idle the hardware and call
* drm_sman_owner_cleanup. If there are no stale memory blocks, it removes all
* resources associated with owner.
*/

extern int drm_sman_owner_clean(struct drm_sman * sman, unsigned long owner);

/*
* Frees all stale memory blocks associated with this owner. Note that this
* requires that the hardware is finished with all blocks, so the graphics engine
* should be idled before this call is made. This function also frees
* any resources associated with "owner" and should be called when owner
* is not going to be referenced anymore.
*/

extern void drm_sman_owner_cleanup(struct drm_sman * sman, unsigned long owner);

/*
* Frees all stale memory blocks associated with the memory manager.
* See idling above.
Expand Down

0 comments on commit 44af0e8

Please sign in to comment.