mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
camera: Enable deferred unmapping for vi/isp
Enable deferred dma buffer unmapping for vi/isp devices Bug 4067905 Change-Id: I193f762d580d1e0477137f57195b2cb81d4b9d91 Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910545 Tested-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d4d60fd1f8
commit
c9146a4fd9
@@ -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 <asm/ioctls.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/module.h>
|
||||
@@ -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:
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/module.h>
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user