Ver Fonte

msm: ipa3: Changes to fix header offset usage in DDR case

When DDR header table was full not verifying any free offset entries
present in the list with current logic. So adding changes to use
free offset location in DDR when DDR header table was full.

Change-Id: If2d010db178e2388a83b5b63b47d3d05f2c3f7e2
Signed-off-by: Ashok Vuyyuru <[email protected]>
Ashok Vuyyuru há 2 anos atrás
pai
commit
395fcbaab4
1 ficheiros alterados com 6 adições e 6 exclusões
  1. 6 6
      drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c

+ 6 - 6
drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c

@@ -658,14 +658,14 @@ static int __ipa_add_hdr(struct ipa_hdr_add *hdr, bool user,
 				entry->is_lcl = false;
 			}
 
-			if (!entry->is_lcl && (htbl->end + ipa_hdr_bin_sz[bin] > mem_size)) {
-				IPAERR("No space in DDR header buffer! Requested: %d Left: %d name %s, end %d\n",
-					ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
-				goto bad_hdr_len;
-			}
-
 			/* check if DDR free list */
 			if (list_empty(&htbl->head_free_offset_list[bin])) {
+				if (!entry->is_lcl && (htbl->end + ipa_hdr_bin_sz[bin] > mem_size)) {
+					IPAERR("No space in DDR header buffer! Requested: %d Left: %d name %s, end %d\n",
+							ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
+					goto bad_hdr_len;
+				}
+
 				IPADBG_LOW("No free offset in DDR allocating new offset Requested: %d Left: %d name %s, end %d\n",
 						ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
 				goto create_entry;