mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
iommu/arm-smmu: Fix atomic domain handling
Query if a domain is atomic or not after initializing the domain, as opposed to before, when the domain properties have not been finalized. Change-Id: Ib2f05156268a16cccb410e263de957d9eb2070ae Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
2b275308a1
commit
f785b675ce
1 changed files with 1 additions and 3 deletions
|
|
@ -2740,8 +2740,6 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
|
|||
struct iommu_fwspec *fwspec = dev->iommu_fwspec;
|
||||
struct arm_smmu_device *smmu;
|
||||
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
|
||||
bool atomic_domain = test_bit(DOMAIN_ATTR_ATOMIC,
|
||||
smmu_domain->attributes);
|
||||
int s1_bypass = 0;
|
||||
|
||||
if (!fwspec || fwspec->ops != &arm_smmu_ops.iommu_ops) {
|
||||
|
|
@ -2808,7 +2806,7 @@ out_power_off:
|
|||
* Keep an additional vote for non-atomic power until domain is
|
||||
* detached
|
||||
*/
|
||||
if (!ret && atomic_domain) {
|
||||
if (!ret && test_bit(DOMAIN_ATTR_ATOMIC, smmu_domain->attributes)) {
|
||||
WARN_ON(arm_smmu_power_on(smmu->pwr));
|
||||
arm_smmu_power_off_atomic(smmu, smmu->pwr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue