summaryrefslogtreecommitdiff
path: root/x11-drivers/ati-userspace/files/check-for-iommu-only-if-iommu-is-supported.patch
blob: 7932487388f68f09461dc1c13764ef0330ca486a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 1633d55aa0fb9c2ceb0ae1eab15bdec5066d35ae Mon Sep 17 00:00:00 2001
From: Emil Karlson <jekarlson@gmail.com>
Date: Fri, 2 Aug 2013 01:18:41 +0300
Subject: [PATCH 1/3] Check for iommu only, if iommu is supported.

---
 common/lib/modules/fglrx/build_mod/kcl_iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/lib/modules/fglrx/build_mod/kcl_iommu.c b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
index c6602dd..803455c 100755
--- a/common/lib/modules/fglrx/build_mod/kcl_iommu.c
+++ b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
@@ -183,11 +183,13 @@ void ATI_API_CALL KCL_IOMMU_UnbindPasid( KCL_PCI_DevHandle pcidev,int pasid)
  */
 int ATI_API_CALL KCL_IOMMU_CheckInfo( KCL_PCI_DevHandle pcidev)
 {
+#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
     struct pci_dev* pdev = (struct pci_dev*)pcidev;
-    if ( pdev->dev.archdata.iommu )
+	if ( pdev->dev.archdata.iommu )
     {
         return 1;
     }
+#endif
     return 0;
 }
 
-- 
1.8.1.5