Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc26ea7b authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Remove code for CONFIG_QCOM_IOMMU



In older kernel versions, CONFIG_QCOM_IOMMU was used to identify
the QCOM version of the IOMMU that some versions of the graphics
driver used.  In 4.19 the same config option is used to idenitfy
a different version of a QCOM iommu driver but not the one that
KGSL expects. Remove this unused code.

Change-Id: Ic0dedbadb33cce4e8aa0b7ccac7ae2e67bd6bd92
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 73d8db9e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 */
#ifndef __KGSL_IOMMU_H
#define __KGSL_IOMMU_H

#ifdef CONFIG_QCOM_IOMMU
#include <linux/qcom_iommu.h>
#endif
#include <linux/of.h>
#include "kgsl.h"

+1 −27
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2002,2007-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2002,2007-2019, The Linux Foundation. All rights reserved.
 */
#ifndef __KGSL_MMU_H
#define __KGSL_MMU_H
@@ -394,31 +394,6 @@ kgsl_mmu_pagetable_get_contextidr(struct kgsl_pagetable *pagetable)
	return 0;
}

#ifdef CONFIG_QCOM_IOMMU
#include <linux/qcom_iommu.h>
#ifndef CONFIG_ARM_SMMU
static inline bool kgsl_mmu_bus_secured(struct device *dev)
{
	struct bus_type *bus = msm_iommu_get_bus(dev);

	return (bus == &msm_iommu_sec_bus_type) ? true : false;
}
#else
static inline bool kgsl_mmu_bus_secured(struct device *dev)
{
	/* ARM driver contains all context banks on single bus */
	return true;
}
#endif /* CONFIG_ARM_SMMU */
static inline struct bus_type *kgsl_mmu_get_bus(struct device *dev)
{
	return msm_iommu_get_bus(dev);
}
static inline struct device *kgsl_mmu_get_ctx(const char *name)
{
	return msm_iommu_get_ctx(name);
}
#else
static inline bool kgsl_mmu_bus_secured(struct device *dev)
{
	/*ARM driver contains all context banks on single bus */
@@ -433,6 +408,5 @@ static inline struct device *kgsl_mmu_get_ctx(const char *name)
{
	return ERR_PTR(-ENODEV);
}
#endif

#endif /* __KGSL_MMU_H */