mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 21:45:01 +08:00
drm/exynos: drop struct_mutex from exynos_gem_map_sgt_with_dma
The sg table isn't refcounted, there's no corresponding locking for unmapping and drm_map_sg is ok with being called concurrently. So drop the locking since it doesn't protect anything. Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-8-git-send-email-daniel.vetter@ffwll.ch
This commit is contained in:
parent
91263622f1
commit
8e97d9ef36
@ -388,16 +388,12 @@ int exynos_gem_map_sgt_with_dma(struct drm_device *drm_dev,
|
|||||||
{
|
{
|
||||||
int nents;
|
int nents;
|
||||||
|
|
||||||
mutex_lock(&drm_dev->struct_mutex);
|
|
||||||
|
|
||||||
nents = dma_map_sg(to_dma_dev(drm_dev), sgt->sgl, sgt->nents, dir);
|
nents = dma_map_sg(to_dma_dev(drm_dev), sgt->sgl, sgt->nents, dir);
|
||||||
if (!nents) {
|
if (!nents) {
|
||||||
DRM_ERROR("failed to map sgl with dma.\n");
|
DRM_ERROR("failed to map sgl with dma.\n");
|
||||||
mutex_unlock(&drm_dev->struct_mutex);
|
|
||||||
return nents;
|
return nents;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&drm_dev->struct_mutex);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user