mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drm/tegra: gem: Open code drm_prime_gem_destroy
Since we aren't using drm_gem_prime_import(_dev), for clarity don't use the corresponding destroy function either. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Change-Id: I024a78a6378d0fa6f0134958904122b8d201d99c Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3090412 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Reviewed-by: Santosh BS <santoshb@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3584ef129e
commit
a050b8203b
@@ -518,9 +518,12 @@ void tegra_bo_free_object(struct drm_gem_object *gem)
|
||||
tegra_bo_iommu_unmap(tegra, bo);
|
||||
|
||||
if (gem->import_attach) {
|
||||
struct dma_buf *dmabuf = gem->import_attach->dmabuf;
|
||||
|
||||
dma_buf_unmap_attachment(gem->import_attach, bo->sgt,
|
||||
DMA_TO_DEVICE);
|
||||
drm_prime_gem_destroy(gem, NULL);
|
||||
dma_buf_detach(dmabuf, gem->import_attach);
|
||||
dma_buf_put(dmabuf);
|
||||
} else {
|
||||
tegra_bo_free(gem->dev, bo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user