diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-12-16 01:22:42 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-12-16 02:06:13 -0500 |
commit | 37cb3e08852be92d94e6a65c489bd8afa2e8a15f (patch) | |
tree | 5cddc65127fb04cc8841fe039251ac02cfec1926 | |
parent | 65ec01a9406327f22b1c740f8a42cb93eb676eb5 (diff) |
drm/nouveau: fix bug causing pinned buffers to lose their NO_EVICT flag
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2f5d47021106..0cad6d834eb2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -154,6 +154,11 @@ nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t memtype) | |||
154 | nvbo->placement.busy_placement = nvbo->placements; | 154 | nvbo->placement.busy_placement = nvbo->placements; |
155 | nvbo->placement.num_placement = n; | 155 | nvbo->placement.num_placement = n; |
156 | nvbo->placement.num_busy_placement = n; | 156 | nvbo->placement.num_busy_placement = n; |
157 | |||
158 | if (nvbo->pin_refcnt) { | ||
159 | while (n--) | ||
160 | nvbo->placements[n] |= TTM_PL_FLAG_NO_EVICT; | ||
161 | } | ||
157 | } | 162 | } |
158 | 163 | ||
159 | int | 164 | int |