Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424051335.2872574-1-cyndis@kapsi.fi

authored by

Mikko Perttunen and committed by
Thierry Reding
4ed09565 3cb6e7c2

+4 -1
+4 -1
drivers/gpu/drm/tegra/gem.c
··· 520 520 tegra_bo_iommu_unmap(tegra, bo); 521 521 522 522 if (gem->import_attach) { 523 + struct dma_buf *dmabuf = gem->import_attach->dmabuf; 524 + 523 525 dma_buf_unmap_attachment_unlocked(gem->import_attach, bo->sgt, 524 526 DMA_TO_DEVICE); 525 - drm_prime_gem_destroy(gem, NULL); 527 + dma_buf_detach(dmabuf, gem->import_attach); 528 + dma_buf_put(dmabuf); 526 529 } else { 527 530 tegra_bo_free(gem->dev, bo); 528 531 }