Procházet zdrojové kódy

disp: msm: sde: modify the args for sid switch call

Modify the size of SID's passed as an argument during
scm call as per client requirement.

Change-Id: Idd3bb57a8f9e0a4e7eb6a23d96bfa5b68510063a
Signed-off-by: Jayaprakash <[email protected]>
Jayaprakash před 5 roky
rodič
revize
19253d6e19
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      msm/sde/sde_kms.c

+ 6 - 1
msm/sde/sde_kms.c

@@ -299,7 +299,12 @@ static int _sde_kms_scm_call(struct sde_kms *sde_kms, int vmid)
 
 		sec_sid = (uint32_t *) shm.vaddr;
 		mem_addr = shm.paddr;
-		mem_size = shm.size;
+		/**
+		 * SMMUSecureModeSwitch requires the size to be number of SID's
+		 * but shm allocates size in pages. Modify the args as per
+		 * client requirement.
+		 */
+		mem_size = sizeof(uint32_t) * num_sids;
 	} else {
 		sec_sid = kcalloc(num_sids, sizeof(uint32_t), GFP_KERNEL);
 		if (!sec_sid)