diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2014-10-09 02:03:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-10-16 18:34:08 -0400 |
commit | 9ace2ef7b78e573cedead0f08052b028181e6eaf (patch) | |
tree | d121165d26371594863cdcc70b4009825c19506a /drivers/gpu/drm/ttm | |
parent | adfed2b0587289013f8143c54913ddfd44ac1fd3 (diff) |
drm/ttm: Don't skip fpfn check if lpfn is 0 in ttm_bo_mem_compat
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8f5cec67c47d..ba74a11bceb7 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -994,9 +994,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, | |||
994 | 994 | ||
995 | for (i = 0; i < placement->num_placement; i++) { | 995 | for (i = 0; i < placement->num_placement; i++) { |
996 | const struct ttm_place *heap = &placement->placement[i]; | 996 | const struct ttm_place *heap = &placement->placement[i]; |
997 | if (mem->mm_node && heap->lpfn != 0 && | 997 | if (mem->mm_node && |
998 | (mem->start < heap->fpfn || | 998 | (mem->start < heap->fpfn || |
999 | mem->start + mem->num_pages > heap->lpfn)) | 999 | (heap->lpfn != 0 && (mem->start + mem->num_pages) > heap->lpfn))) |
1000 | continue; | 1000 | continue; |
1001 | 1001 | ||
1002 | *new_flags = heap->flags; | 1002 | *new_flags = heap->flags; |
@@ -1007,9 +1007,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, | |||
1007 | 1007 | ||
1008 | for (i = 0; i < placement->num_busy_placement; i++) { | 1008 | for (i = 0; i < placement->num_busy_placement; i++) { |
1009 | const struct ttm_place *heap = &placement->busy_placement[i]; | 1009 | const struct ttm_place *heap = &placement->busy_placement[i]; |
1010 | if (mem->mm_node && heap->lpfn != 0 && | 1010 | if (mem->mm_node && |
1011 | (mem->start < heap->fpfn || | 1011 | (mem->start < heap->fpfn || |
1012 | mem->start + mem->num_pages > heap->lpfn)) | 1012 | (heap->lpfn != 0 && (mem->start + mem->num_pages) > heap->lpfn))) |
1013 | continue; | 1013 | continue; |
1014 | 1014 | ||
1015 | *new_flags = heap->flags; | 1015 | *new_flags = heap->flags; |