drm/ttm: Don't skip fpfn check if lpfn is 0 in ttm_bo_mem_compat
Subsystems (3)
PATCH 1/1 drm/ttm: Don't skip fpfn check if lpfn is 0 in ttm_bo_mem_compat
From: Michel Dänzer <[email protected]>
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +4 -4
@@ -1008,9 +1008,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,for (i =0 ; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))continue ; *new_flags = heap->flags;
@@ -1021,9 +1021,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,for (i =0 ; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))continue ; *new_flags = heap->flags;
Signature · 6 lines
2.1.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 09.10.2014 um 08:03 schrieb Michel Dänzer:
Quoted 3 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +2
-2@@ -1008,9 +1008,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,for (i =0 ; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))continue ; *new_flags = heap->flags;@@ -1021,9 +1021,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,
drivers/gpu/drm/ttm/ttm_bo.c static bool ttm_bo_mem_compat(struct ttm_placement *placement, · line 1029
Quoted 10 lines
drivers/gpu/drm/ttm/ttm_bo.c +2
-2for (i =0 ; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))continue ; *new_flags = heap->flags;
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Christian König
Am 09.10.2014 um 08:03 schrieb Michel Dänzer:
Quoted 4 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>Reviewed-by Christian König <[email protected]>
Thomas, do you want to pull this through the ttm tree or can I take it through radeon?
Alex
Quoted 31 lines
Quoted 31 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +4
-4@@ -1008,9 +1008,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, for (i = 0; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))continue ; *new_flags = heap->flags;@@ -1021,9 +1021,9 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement, for (i = 0; i < placement->num_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 + mem->num_pages > heap->lpfn)) + (heap->lpfn !=0 && (mem->start + mem->num_pages) > heap->lpfn)))
Quoted 8 lines
Quoted 2 lines
drivers/gpu/drm/ttm/ttm_bo.c +0
-0continue ;*new_flags = heap->flags;_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel