Merge "drm/msm: Take the mutex before calling msm_gem_new_impl"

This commit is contained in:
Linux Build Service Account 2017-03-23 09:44:47 -07:00 committed by Gerrit - the friendly Code Review server
commit c2f18b4fd0
2 changed files with 4 additions and 2 deletions

View file

@ -750,7 +750,10 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
size = PAGE_ALIGN(size);
mutex_lock(&dev->struct_mutex);
ret = msm_gem_new_impl(dev, size, MSM_BO_WC, &obj);
mutex_unlock(&dev->struct_mutex);
if (ret)
goto fail;

View file

@ -576,8 +576,7 @@ int msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
if (submit->bos[i].flags & MSM_SUBMIT_BO_READ)
msm_gem_move_to_active(&msm_obj->base, gpu, false, submit->fence);
if (submit->bos[i].flags & MSM_SUBMIT_BO_WRITE)
else if (submit->bos[i].flags & MSM_SUBMIT_BO_WRITE)
msm_gem_move_to_active(&msm_obj->base, gpu, true, submit->fence);
}