mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-14 13:03:17 -04:00
drm/msm/gem: Remove useless locking in GEM import
The locking has changed a few times over the years, and this extra locking was the mistake of evolution. Harmless but useless. Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/743087/ Message-ID: <20260729155609.20190-11-robin.clark@oss.qualcomm.com>
This commit is contained in:
@@ -1310,22 +1310,17 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
||||
npages = size / PAGE_SIZE;
|
||||
|
||||
msm_obj = to_msm_bo(obj);
|
||||
msm_gem_lock(obj);
|
||||
msm_obj->pages = kvmalloc_objs(struct page *, npages);
|
||||
if (!msm_obj->pages) {
|
||||
msm_gem_unlock(obj);
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = drm_prime_sg_to_page_array(sgt, msm_obj->pages, npages);
|
||||
if (ret) {
|
||||
msm_gem_unlock(obj);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
msm_gem_unlock(obj);
|
||||
|
||||
drm_gem_lru_move_tail(&priv->lru.pinned, obj);
|
||||
|
||||
mutex_lock(&priv->obj_lock);
|
||||
|
||||
Reference in New Issue
Block a user