diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2008-04-14 12:10:50 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2008-04-14 12:14:20 +0200 |
commit | c5955c652302d66719984cb5a218cb590c74ad42 (patch) | |
tree | afa829b80105f435dac0f4d908c75cc00397666e /linux-core/drm_bo.c | |
parent | c9b73ef6daff75df27d17260a9fc84e68f1b21b4 (diff) |
Fix buffer object creation validation.
BO lock fixes.
Diffstat (limited to 'linux-core/drm_bo.c')
-rw-r--r-- | linux-core/drm_bo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 0853d748..6f287532 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1244,6 +1244,7 @@ static int drm_buffer_object_map(struct drm_file *file_priv, uint32_t handle, mutex_unlock(&bo->mutex); drm_bo_usage_deref_unlocked(&bo); + return ret; } @@ -1541,8 +1542,9 @@ static int drm_bo_prepare_for_validate(struct drm_buffer_object *bo, ftype, no_wait); } - if (ret && ret != -EAGAIN) + if (ret && ret != -EAGAIN) ret = drm_bo_wait(bo, 0, 1, no_wait, 1); + if (ret) return ret; } @@ -1622,6 +1624,7 @@ out: drm_bo_fill_rep_arg(bo, rep); mutex_unlock(&bo->mutex); + return ret; } EXPORT_SYMBOL(drm_bo_do_validate); @@ -1816,7 +1819,7 @@ int drm_buffer_object_create(struct drm_device *dev, } mutex_unlock(&bo->mutex); - ret = drm_bo_do_validate(bo, 0, 0, hint & DRM_BO_HINT_DONT_BLOCK, + ret = drm_bo_do_validate(bo, 0, 0, hint | DRM_BO_HINT_DONT_FENCE, 0, NULL); if (ret) goto out_err_unlocked; |