diff options
author | Aurora pro automerger <aurora-pro-automerger@google.com> | 2022-09-09 11:28:03 -0700 |
---|---|---|
committer | Jawad AlDhalemi <jaldhalemi@google.com> | 2022-09-19 18:28:24 +0000 |
commit | 2014182f4a8c0ba375f92e808a67222dbd7c2db0 (patch) | |
tree | 7f0ec6c6fbf948dab03be1f7acf0dfac15ed592a | |
parent | 33208ffbc5e55846af03bcf708d7c91ed2934e4a (diff) | |
download | gs201-2014182f4a8c0ba375f92e808a67222dbd7c2db0.tar.gz |
gxp: [Copybara Auto Merge]
gxp: Enable best-fit IOVA allocator
Bug: 241190719
GitOrigin-RevId: 44b2dec0793fac3b4c3b553f3ea7086c318e1ddb
Change-Id: I1089f28248281bc9eccecd193432e5559b55b283
-rw-r--r-- | gxp-dma-iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gxp-dma-iommu.c b/gxp-dma-iommu.c index 9f388c0..97322f5 100644 --- a/gxp-dma-iommu.c +++ b/gxp-dma-iommu.c @@ -5,6 +5,7 @@ * Copyright (C) 2021 Google LLC */ +#include <linux/dma-iommu.h> #include <linux/dma-mapping.h> #include <linux/iommu.h> #include <linux/platform_device.h> @@ -215,6 +216,9 @@ int gxp_dma_init(struct gxp_dev *gxp) goto err_unreg_fault_handler; } + /* Enable best fit algorithm to minimize fragmentation */ + iommu_dma_enable_best_fit_algo(gxp->dev); + gxp->dma_mgr = &(mgr->dma_mgr); return 0; |