From: Jerome Glisse Date: Wed, 9 Dec 2009 21:14:27 +0000 (+0100) Subject: drm/ttm: Initialize eviction placement in case the driver callback doesn't X-Git-Tag: v2.6.33-rc1~323^2~1^2~4 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=7cb7d1d7b650c9764c8a1b00e2b43d932acde779;p=net-next-2.6.git drm/ttm: Initialize eviction placement in case the driver callback doesn't This would allow to catch driver callback error of not properly setting the eviction placement structure. Signed-off-by: Jerome Glisse Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 640fb265dd5..cf8834779f5 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);