提交 23c45e8e 编写于 作者: F Francisco Jerez 提交者: Ben Skeggs

drm/nouveau: Fix sleep while atomic in nouveau_bo_fence().

Reported-by: NPekka Paalanen <pq@iki.fi>
Signed-off-by: NFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 87a326a3
......@@ -942,13 +942,17 @@ nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence)
{
spin_lock(&nvbo->bo.bdev->fence_lock);
__nouveau_fence_unref(&nvbo->bo.sync_obj);
struct nouveau_fence *old_fence;
if (likely(fence))
nvbo->bo.sync_obj = nouveau_fence_ref(fence);
nouveau_fence_ref(fence);
spin_lock(&nvbo->bo.bdev->fence_lock);
old_fence = nvbo->bo.sync_obj;
nvbo->bo.sync_obj = fence;
spin_unlock(&nvbo->bo.bdev->fence_lock);
nouveau_fence_unref(&old_fence);
}
struct ttm_bo_driver nouveau_bo_driver = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册