From: Thomas Zimmermann Date: Thu, 19 Jun 2025 11:27:00 +0000 (+0200) Subject: drm/tegra: Test for imported buffers with drm_gem_is_imported() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f67c360bc73bed0a980652e921ec14a15fcf1bf;p=thirdparty%2Flinux.git drm/tegra: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250619113100.70292-2-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index dbc1394f96b87..8ede07fb7a21d 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -523,7 +523,7 @@ void tegra_bo_free_object(struct drm_gem_object *gem) if (tegra->domain) { tegra_bo_iommu_unmap(tegra, bo); - if (gem->import_attach) { + if (drm_gem_is_imported(gem)) { dma_buf_unmap_attachment_unlocked(gem->import_attach, bo->sgt, DMA_TO_DEVICE); dma_buf_detach(gem->import_attach->dmabuf, gem->import_attach);