答复: [PATCH] drm/amdgpu: fix the issue that nodes[0] is not removed from the allocator

Qu, Jim Jim.Qu at amd.com
Tue Nov 1 13:51:36 UTC 2016


Please ignore this patch. I make a mistake.

Thanks
JimQu

________________________________________
发件人: jimqu <Jim.Qu at amd.com>
发送时间: 2016年11月1日 17:21
收件人: amd-gfx at lists.freedesktop.org
抄送: Qu, Jim
主题: [PATCH] drm/amdgpu: fix the issue that nodes[0] is not removed from the allocator

Change-Id: Id960af4bf93036a8a39306c374e2cafdc1bef055
Signed-off-by: JimQu <Jim.Qu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
index 180eed7c..6933f4a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@ -100,7 +100,7 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man,
        enum drm_mm_search_flags sflags = DRM_MM_SEARCH_DEFAULT;
        enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
        unsigned long lpfn, num_nodes, pages_per_node, pages_left;
-       unsigned i;
+       unsigned i, j;
        int r;

        lpfn = place->lpfn;
@@ -155,8 +155,8 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man,
        return 0;

 error:
-       while (i--)
-               drm_mm_remove_node(&nodes[i]);
+       for (j = 0; j < i; j++)
+               drm_mm_remove_node(&nodes[j]);
        spin_unlock(&mgr->lock);

        kfree(nodes);
--
1.9.1



More information about the amd-gfx mailing list