Commit 9ace2ef7 authored by Michel Dänzer's avatar Michel Dänzer Committed by Alex Deucher

drm/ttm: Don't skip fpfn check if lpfn is 0 in ttm_bo_mem_compat

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent adfed2b0
...@@ -994,9 +994,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, ...@@ -994,9 +994,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,
for (i = 0; i < placement->num_placement; i++) { for (i = 0; i < placement->num_placement; i++) {
const struct ttm_place *heap = &placement->placement[i]; const struct ttm_place *heap = &placement->placement[i];
if (mem->mm_node && heap->lpfn != 0 && if (mem->mm_node &&
(mem->start < heap->fpfn || (mem->start < heap->fpfn ||
mem->start + mem->num_pages > heap->lpfn)) (heap->lpfn != 0 && (mem->start + mem->num_pages) > heap->lpfn)))
continue; continue;
*new_flags = heap->flags; *new_flags = heap->flags;
...@@ -1007,9 +1007,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, ...@@ -1007,9 +1007,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,
for (i = 0; i < placement->num_busy_placement; i++) { for (i = 0; i < placement->num_busy_placement; i++) {
const struct ttm_place *heap = &placement->busy_placement[i]; const struct ttm_place *heap = &placement->busy_placement[i];
if (mem->mm_node && heap->lpfn != 0 && if (mem->mm_node &&
(mem->start < heap->fpfn || (mem->start < heap->fpfn ||
mem->start + mem->num_pages > heap->lpfn)) (heap->lpfn != 0 && (mem->start + mem->num_pages) > heap->lpfn)))
continue; continue;
*new_flags = heap->flags; *new_flags = heap->flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment