drm/mm: add "best_match" flag to drm_mm_insert_node()
Add a "best_match" flag similar to the drm_mm_search_*() helpers so we can convert TTM to use them in follow up patches. We can also inline the non-generic helpers and move them into the header to allow compile-time optimizations. To make calls to drm_mm_{search,insert}_node() more readable, this converts the boolean argument to a flagset. There are pending patches that add additional flags for top-down allocators and more. v2: - use flag parameter instead of boolean "best_match" - convert *_search_free() helpers to also use flags argument Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
此提交包含在:
@@ -109,7 +109,8 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file,
|
||||
if (pool == AGP_TYPE) {
|
||||
retval = drm_mm_insert_node(&dev_priv->agp_mm,
|
||||
&item->mm_node,
|
||||
mem->size, 0);
|
||||
mem->size, 0,
|
||||
DRM_MM_SEARCH_DEFAULT);
|
||||
offset = item->mm_node.start;
|
||||
} else {
|
||||
#if defined(CONFIG_FB_SIS) || defined(CONFIG_FB_SIS_MODULE)
|
||||
@@ -121,7 +122,8 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file,
|
||||
#else
|
||||
retval = drm_mm_insert_node(&dev_priv->vram_mm,
|
||||
&item->mm_node,
|
||||
mem->size, 0);
|
||||
mem->size, 0,
|
||||
DRM_MM_SEARCH_DEFAULT);
|
||||
offset = item->mm_node.start;
|
||||
#endif
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者