msm: kgsl: Skip SMMU PT switch when using default PT

If per-process pagetable is not enabled then current process pagetable
points to default global pt and per-process pagetable ttbr0 config is
set to 0x0. No CP SMMU UPDATE command is required to be submitted to
ringbuffer. So,skip process pagetable switch if current process
pagetable is using default pt.

Change-Id: I85cdfbac704705cd4cb1c5e8a964231a8e66fe88
Signed-off-by: Abhishek Barman <quic_abarman@quicinc.com>
This commit is contained in:
Abhishek Barman 2023-08-18 14:04:44 +05:30 committed by V S Ganga VaraPrasad (VARA) Adabala
parent 6417fd0773
commit 9f784ed363

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include "adreno.h"
@ -109,6 +110,9 @@ static int a3xx_rb_pagetable_switch(struct adreno_device *adreno_dev,
struct kgsl_iommu *iommu = KGSL_IOMMU(device);
int count = 0;
/* Skip pagetable switch if current context is using default PT. */
if (pagetable == device->mmu.defaultpagetable)
return 0;
/*
* Adding an indirect buffer ensures that the prefetch stalls until
* the commands in indirect buffer have completed. We need to stall