diff --git a/drivers/video/tegra/host/isp/isp5.c b/drivers/video/tegra/host/isp/isp5.c index 814c7652..fc29b72c 100644 --- a/drivers/video/tegra/host/isp/isp5.c +++ b/drivers/video/tegra/host/isp/isp5.c @@ -2,13 +2,14 @@ /* * ISP5 driver * - * Copyright (c) 2017-2022, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2017-2023, NVIDIA Corporation. All rights reserved. */ #include #include #include #include +#include #include #include #include @@ -139,6 +140,11 @@ int isp5_priv_early_probe(struct platform_device *pdev) /* A bit was stolen */ (void) dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(39)); +#ifdef CONFIG_DMABUF_DEFERRED_UNMAPPING + if (dma_buf_defer_unmapping(dev, true) < 0) + dev_warn(dev, "Failed to set deferred dma buffer unmapping\n"); +#endif + return 0; error: diff --git a/drivers/video/tegra/host/vi/vi5.c b/drivers/video/tegra/host/vi/vi5.c index a59ad06f..f98486a4 100644 --- a/drivers/video/tegra/host/vi/vi5.c +++ b/drivers/video/tegra/host/vi/vi5.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -181,6 +182,11 @@ int vi5_priv_early_probe(struct platform_device *pdev) (void) dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(39)); +#ifdef CONFIG_DMABUF_DEFERRED_UNMAPPING + if (dma_buf_defer_unmapping(dev, true) < 0) + dev_warn(dev, "Failed to set deferred dma buffer unmapping\n"); +#endif + return 0; put_vi: