diff options
author | Rob Clark <robdclark@gmail.com> | 2014-11-12 15:25:50 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-11-16 14:27:39 -0500 |
commit | 257d06f7043a432774a315223053730f8b170b0e (patch) | |
tree | 63f7eb6d3a506a7c7dd030697171bab8f50711da /drivers/gpu/drm/msm | |
parent | e27c54ffd2b30f9e09f13211869449ec97c6e42f (diff) | |
download | talos-obmc-linux-257d06f7043a432774a315223053730f8b170b0e.tar.gz talos-obmc-linux-257d06f7043a432774a315223053730f8b170b0e.zip |
drm/msm: small mmap offset cleanups
Use pre-computed iova when unmapping, to reduce the places we assume iova
and mmap offset are (at the moment) the same. And get rid of an extra
drm_gem_free_mmap_offset() call (since it is already called from
drm_gem_object_release())
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index aaa7898b0b6d..4a6f0e49d5b5 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -519,13 +519,11 @@ void msm_gem_free_object(struct drm_gem_object *obj) for (id = 0; id < ARRAY_SIZE(msm_obj->domain); id++) { struct msm_mmu *mmu = priv->mmus[id]; if (mmu && msm_obj->domain[id].iova) { - uint32_t offset = (uint32_t)mmap_offset(obj); + uint32_t offset = msm_obj->domain[id].iova; mmu->funcs->unmap(mmu, offset, msm_obj->sgt, obj->size); } } - drm_gem_free_mmap_offset(obj); - if (obj->import_attach) { if (msm_obj->vaddr) dma_buf_vunmap(obj->import_attach->dmabuf, msm_obj->vaddr); |