aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Perttunen <[email protected]>2024-04-24 05:13:34 +0000
committerThierry Reding <[email protected]>2024-08-29 18:14:29 +0000
commit4ed09565e0873a8ffdf6d71923f485bc778f2988 (patch)
tree99c81a05ce203a36a04ae1408ebadd7500c894f2
parentRevert "drm/tegra: gr3d: Convert into dev_pm_domain_attach|detach_list()" (diff)
downloadkernel-4ed09565e0873a8ffdf6d71923f485bc778f2988.tar.gz
kernel-4ed09565e0873a8ffdf6d71923f485bc778f2988.zip
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/tegra/gem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index b4eb030ea961..189861c6c630 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -520,9 +520,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_unlocked(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);
}