This would allow to catch driver callback error of not properly
setting the eviction placement structure.

Signed-off-by: Jerome Glisse <jgli...@redhat.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 640fb26..cf88347 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -584,6 +584,10 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool 
interruptible,
        evict_mem = bo->mem;
        evict_mem.mm_node = NULL;
 
+       placement.fpfn = 0;
+       placement.lpfn = 0;
+       placement.num_placement = 0;
+       placement.num_busy_placement = 0;
        bdev->driver->evict_flags(bo, &placement);
        ret = ttm_bo_mem_space(bo, &placement, &evict_mem, interruptible,
                                no_wait);
-- 
1.6.5.2


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to