Pinned BOs are supposed to remain in their current location until
unpinned. Display a warning for the supposedly-erroneous case where we
are trying to move such objects.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
goto out;
}
- if (nvbo->pin_refcnt++)
- goto out;
+ if (nvbo->pin_refcnt)
+ goto ref_inc;
nouveau_bo_placement_set(nvbo, memtype, 0);
break;
}
}
+
+ref_inc:
+ nvbo->pin_refcnt++;
+
out:
ttm_bo_unreserve(bo);
return ret;
struct nouveau_drm_tile *new_tile = NULL;
int ret = 0;
+ if (nvbo->pin_refcnt)
+ NV_WARN(drm, "Moving pinned object %p!\n", nvbo);
+
if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
ret = nouveau_bo_vm_bind(bo, new_mem, &new_tile);
if (ret)