drm/msm: Call drm_prime_gem_destroy to clean up imported GEM object
authorjilai wang <jilaiw@codeaurora.org>
Tue, 7 Apr 2015 17:51:32 +0000 (13:51 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 11 Jun 2015 17:11:02 +0000 (13:11 -0400)
If the GEM object is imported, drm_prime_gem_destroy needs to be
called to clean up dma buffer related information.

Signed-off-by: Jilai Wang <jilaiw@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gem.c

index 52839769eb6c091ba9f64a73e72d89191a3615cb..dfc74a5736a3084c097ee9460e6c4f809ad3ecfc 100644 (file)
@@ -540,6 +540,7 @@ void msm_gem_free_object(struct drm_gem_object *obj)
                if (msm_obj->pages)
                        drm_free_large(msm_obj->pages);
 
+               drm_prime_gem_destroy(obj, msm_obj->sgt);
        } else {
                vunmap(msm_obj->vaddr);
                put_pages(obj);