diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 1fbb2eea5e88..4cd4007e68fa 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -849,7 +849,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
| 849 | int i, ret; | 849 | int i, ret; |
| 850 | 850 | ||
| 851 | mem->mm_node = NULL; | 851 | mem->mm_node = NULL; |
| 852 | for (i = 0; i <= placement->num_placement; ++i) { | 852 | for (i = 0; i < placement->num_placement; ++i) { |
| 853 | ret = ttm_mem_type_from_flags(placement->placement[i], | 853 | ret = ttm_mem_type_from_flags(placement->placement[i], |
| 854 | &mem_type); | 854 | &mem_type); |
| 855 | if (ret) | 855 | if (ret) |
| @@ -900,8 +900,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
| 900 | if (!type_found) | 900 | if (!type_found) |
| 901 | return -EINVAL; | 901 | return -EINVAL; |
| 902 | 902 | ||
| 903 | for (i = 0; i <= placement->num_busy_placement; ++i) { | 903 | for (i = 0; i < placement->num_busy_placement; ++i) { |
| 904 | ret = ttm_mem_type_from_flags(placement->placement[i], | 904 | ret = ttm_mem_type_from_flags(placement->busy_placement[i], |
| 905 | &mem_type); | 905 | &mem_type); |
| 906 | if (ret) | 906 | if (ret) |
| 907 | return ret; | 907 | return ret; |
| @@ -911,7 +911,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
| 911 | if (!ttm_bo_mt_compatible(man, | 911 | if (!ttm_bo_mt_compatible(man, |
| 912 | bo->type == ttm_bo_type_user, | 912 | bo->type == ttm_bo_type_user, |
| 913 | mem_type, | 913 | mem_type, |
| 914 | placement->placement[i], | 914 | placement->busy_placement[i], |
| 915 | &cur_flags)) | 915 | &cur_flags)) |
| 916 | continue; | 916 | continue; |
| 917 | 917 | ||
| @@ -921,7 +921,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
| 921 | * Use the access and other non-mapping-related flag bits from | 921 | * Use the access and other non-mapping-related flag bits from |
| 922 | * the memory placement flags to the current flags | 922 | * the memory placement flags to the current flags |
| 923 | */ | 923 | */ |
| 924 | ttm_flag_masked(&cur_flags, placement->placement[i], | 924 | ttm_flag_masked(&cur_flags, placement->busy_placement[i], |
| 925 | ~TTM_PL_MASK_MEMTYPE); | 925 | ~TTM_PL_MASK_MEMTYPE); |
| 926 | 926 | ||
| 927 | ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem, | 927 | ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem, |
