parent
c5955c6523
commit
1ad1bd5bd9
|
@ -1225,11 +1225,13 @@ static int drm_buffer_object_map(struct drm_file *file_priv, uint32_t handle,
|
||||||
bo->priv_flags &= ~_DRM_BO_FLAG_UNLOCKED;
|
bo->priv_flags &= ~_DRM_BO_FLAG_UNLOCKED;
|
||||||
|
|
||||||
ret = drm_bo_wait(bo, 0, 1, no_wait, 1);
|
ret = drm_bo_wait(bo, 0, 1, no_wait, 1);
|
||||||
|
if (unlikely(ret))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (bo->mem.flags & DRM_BO_FLAG_CACHED_MAPPED)
|
if (bo->mem.flags & DRM_BO_FLAG_CACHED_MAPPED)
|
||||||
drm_bo_evict_cached(bo);
|
drm_bo_evict_cached(bo);
|
||||||
|
|
||||||
} while (bo->priv_flags & _DRM_BO_FLAG_UNLOCKED);
|
} while (unlikely(bo->priv_flags & _DRM_BO_FLAG_UNLOCKED));
|
||||||
|
|
||||||
atomic_inc(&bo->mapped);
|
atomic_inc(&bo->mapped);
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
@ -1242,6 +1244,7 @@ static int drm_buffer_object_map(struct drm_file *file_priv, uint32_t handle,
|
||||||
} else
|
} else
|
||||||
drm_bo_fill_rep_arg(bo, rep);
|
drm_bo_fill_rep_arg(bo, rep);
|
||||||
|
|
||||||
|
out:
|
||||||
mutex_unlock(&bo->mutex);
|
mutex_unlock(&bo->mutex);
|
||||||
drm_bo_usage_deref_unlocked(&bo);
|
drm_bo_usage_deref_unlocked(&bo);
|
||||||
|
|
||||||
|
@ -1610,7 +1613,7 @@ int drm_bo_do_validate(struct drm_buffer_object *bo,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
} while(bo->priv_flags & _DRM_BO_FLAG_UNLOCKED);
|
} while(unlikely(bo->priv_flags & _DRM_BO_FLAG_UNLOCKED));
|
||||||
|
|
||||||
ret = drm_buffer_object_validate(bo,
|
ret = drm_buffer_object_validate(bo,
|
||||||
fence_class,
|
fence_class,
|
||||||
|
|
Loading…
Reference in New Issue