summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_mem.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-06-22 16:29:00 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-06-22 16:29:00 +0200
commit473a1997ace1a9fb545d0457549e50d17eb36175 (patch)
tree93ed8c730a8be1de2564088c4f5aaafc667a1263 /shared-core/nouveau_mem.c
parent7010d500072977f63a0bac08f2141d69dbd19595 (diff)
NV50: Initial import of kernel modesetting.
Diffstat (limited to 'shared-core/nouveau_mem.c')
-rw-r--r--shared-core/nouveau_mem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c
index 2cf8807d..810eaf9e 100644
--- a/shared-core/nouveau_mem.c
+++ b/shared-core/nouveau_mem.c
@@ -108,6 +108,17 @@ static struct mem_block *find_block(struct mem_block *heap, uint64_t start)
return NULL;
}
+struct mem_block *find_block_by_handle(struct mem_block *heap, drm_handle_t handle)
+{
+ struct mem_block *p;
+
+ list_for_each(p, heap)
+ if (p->map_handle == handle)
+ return p;
+
+ return NULL;
+}
+
void nouveau_mem_free_block(struct mem_block *p)
{
p->file_priv = NULL;