Explorar el Código

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

qctecmdr hace 3 años
padre
commit
c439d2fadc
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      msm/sde/sde_vm_common.c

+ 2 - 1
msm/sde/sde_vm_common.c

@@ -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: