diff options
author | Christian König <christian.koenig@amd.com> | 2014-07-03 03:02:23 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-07 21:15:58 -0400 |
commit | e3f202798aaa808e7a38faa8c3a9f0aa93b85cc0 (patch) | |
tree | 3eac926b195d382c73a900c2eae11137aab9cf09 /drivers/gpu/drm/ttm/ttm_bo_manager.c | |
parent | 4e4e7dc55af5aa62497ac060e3cfd143bd4b4db3 (diff) |
drm/ttm: fix handling of TTM_PL_FLAG_TOPDOWN v2
bo->mem.placement is not initialized when ttm_bo_man_get_node is called,
so the flag had no effect at all.
v2: change nouveau and vmwgfx as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_manager.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c index bd850c9f4bca..9e103a4875c8 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_manager.c +++ b/drivers/gpu/drm/ttm/ttm_bo_manager.c | |||
@@ -50,6 +50,7 @@ struct ttm_range_manager { | |||
50 | static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man, | 50 | static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man, |
51 | struct ttm_buffer_object *bo, | 51 | struct ttm_buffer_object *bo, |
52 | struct ttm_placement *placement, | 52 | struct ttm_placement *placement, |
53 | uint32_t flags, | ||
53 | struct ttm_mem_reg *mem) | 54 | struct ttm_mem_reg *mem) |
54 | { | 55 | { |
55 | struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv; | 56 | struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv; |
@@ -67,7 +68,7 @@ static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man, | |||
67 | if (!node) | 68 | if (!node) |
68 | return -ENOMEM; | 69 | return -ENOMEM; |
69 | 70 | ||
70 | if (bo->mem.placement & TTM_PL_FLAG_TOPDOWN) | 71 | if (flags & TTM_PL_FLAG_TOPDOWN) |
71 | aflags = DRM_MM_CREATE_TOP; | 72 | aflags = DRM_MM_CREATE_TOP; |
72 | 73 | ||
73 | spin_lock(&rman->lock); | 74 | spin_lock(&rman->lock); |