summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-12-10 00:14:27 +0300
committerDave Airlie <airlied@redhat.com>2009-12-10 08:09:08 +0300
commit7cb7d1d7b650c9764c8a1b00e2b43d932acde779 (patch)
tree03ef9da23aeb3bf878877e6f4b54485908072ac5 /drivers/gpu
parentcf0fe4566dcc0c5bd9b7da8c9a53e712593db118 (diff)
downloadlinux-7cb7d1d7b650c9764c8a1b00e2b43d932acde779.tar.xz
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 <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c4
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 640fb265dd5a..cf8834779f55 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);