aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2009-06-17 06:29:56 -0400
committerDave Airlie <airlied@redhat.com>2009-06-18 19:01:12 -0400
commit89579f778266d5a4d08d0c64c46b1565218de9f9 (patch)
treef7a2389d1277bf285e790b660e0f6a6019ff857f /include/drm
parent78ecf091aa592a9e160ebbbfa5873c2bb2e2d0f8 (diff)
drm: Apply "Memory fragmentation from lost alignment blocks"
also for the atomic path by using a common code-path. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_mm.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index 5662f4278ef3..f8332073d277 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -59,13 +59,22 @@ struct drm_mm {
59/* 59/*
60 * Basic range manager support (drm_mm.c) 60 * Basic range manager support (drm_mm.c)
61 */ 61 */
62 62extern struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node,
63extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, 63 unsigned long size,
64 unsigned long size, 64 unsigned alignment,
65 unsigned alignment); 65 int atomic);
66extern struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, 66static inline struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent,
67 unsigned long size, 67 unsigned long size,
68 unsigned alignment); 68 unsigned alignment)
69{
70 return drm_mm_get_block_generic(parent, size, alignment, 0);
71}
72static inline struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent,
73 unsigned long size,
74 unsigned alignment)
75{
76 return drm_mm_get_block_generic(parent, size, alignment, 1);
77}
69extern void drm_mm_put_block(struct drm_mm_node *cur); 78extern void drm_mm_put_block(struct drm_mm_node *cur);
70extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, 79extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
71 unsigned long size, 80 unsigned long size,