msm: kgsl: Declare platform_bus_type as secure for ARM driver
ARM driver supports only one bus for all context banks. In some cases, hypervisor may not be available and GPU SMMU uses ARM driver. This will make all context banks are on non secure bus and kgsl_mmu_bus_secured() returns -EPERM. Make platform_bus_type as secure for ARM driver. Change-Id: I11a637ca2b1ef29cc42c9811cad009312a2879cd Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
This commit is contained in:
parent
ad6f486284
commit
721a66e665
1 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2002,2007-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -334,12 +334,20 @@ kgsl_mmu_pagetable_get_contextidr(struct kgsl_pagetable *pagetable)
|
|||
|
||||
#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);
|
||||
|
@ -351,7 +359,8 @@ static inline struct device *kgsl_mmu_get_ctx(const char *name)
|
|||
#else
|
||||
static inline bool kgsl_mmu_bus_secured(struct device *dev)
|
||||
{
|
||||
return false;
|
||||
/*ARM driver contains all context banks on single bus */
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline struct bus_type *kgsl_mmu_get_bus(struct device *dev)
|
||||
|
|
Loading…
Add table
Reference in a new issue