Merge "disp: msm: sde: update atomic check for VM_ACQUIRE state"

This commit is contained in:
qctecmdr
2022-07-17 21:59:39 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
*/
@@ -318,7 +319,7 @@ int sde_vm_request_valid(struct sde_kms *sde_kms,
rc = -EINVAL;
break;
case VM_REQ_ACQUIRE:
if (old_state != VM_REQ_RELEASE)
if ((old_state != VM_REQ_RELEASE) || (vm_owns_hw && !sde_in_trusted_vm(sde_kms)))
rc = -EINVAL;
break;
default: