2012-07-05 21:36:43 +00:00
|
|
|
#ifndef __NOUVEAU_MM_H__
|
|
|
|
#define __NOUVEAU_MM_H__
|
2010-08-25 05:26:04 +00:00
|
|
|
|
|
|
|
struct nouveau_mm_node {
|
|
|
|
struct list_head nl_entry;
|
|
|
|
struct list_head fl_entry;
|
|
|
|
struct list_head rl_entry;
|
|
|
|
|
2011-01-14 05:46:30 +00:00
|
|
|
u8 type;
|
2010-08-25 05:26:04 +00:00
|
|
|
u32 offset;
|
|
|
|
u32 length;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nouveau_mm {
|
|
|
|
struct list_head nodes;
|
|
|
|
struct list_head free;
|
|
|
|
|
|
|
|
struct mutex mutex;
|
|
|
|
|
|
|
|
u32 block_size;
|
2011-06-24 00:23:20 +00:00
|
|
|
int heap_nodes;
|
2010-08-25 05:26:04 +00:00
|
|
|
};
|
|
|
|
|
2011-06-24 00:14:07 +00:00
|
|
|
int nouveau_mm_init(struct nouveau_mm *, u32 offset, u32 length, u32 block);
|
|
|
|
int nouveau_mm_fini(struct nouveau_mm *);
|
2012-07-11 06:28:19 +00:00
|
|
|
int nouveau_mm_head(struct nouveau_mm *, u8 type, u32 size_max, u32 size_min,
|
|
|
|
u32 align, struct nouveau_mm_node **);
|
|
|
|
int nouveau_mm_tail(struct nouveau_mm *, u8 type, u32 size_max, u32 size_min,
|
|
|
|
u32 align, struct nouveau_mm_node **);
|
|
|
|
void nouveau_mm_free(struct nouveau_mm *, struct nouveau_mm_node **);
|
2010-08-25 05:26:04 +00:00
|
|
|
|
|
|
|
#endif
|