Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f9fc841 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qseecom: change to use QSECOM_TA heap to load TA"

parents 2ba11554 56293e7f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -4119,9 +4119,15 @@ static int __qseecom_allocate_img_data(struct ion_handle **pihandle,
	ion_phys_addr_t pa;
	struct ion_handle *ihandle = NULL;
	u8 *img_data = NULL;
	int retry = 0;

	do {
		if (retry++)
			msleep(QSEECOM_TA_ION_ALLOCATE_DELAY);
		ihandle = ion_alloc(qseecom.ion_clnt, fw_size,
			SZ_4K, ION_HEAP(ION_QSECOM_HEAP_ID), 0);
			SZ_4K, ION_HEAP(ION_QSECOM_TA_HEAP_ID), 0);
	} while (IS_ERR_OR_NULL(ihandle) &&
			(retry <= QSEECOM_TA_ION_ALLOCATE_MAX_ATTEMP));

	if (IS_ERR_OR_NULL(ihandle)) {
		pr_err("ION alloc failed\n");
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@
#define MAX_ION_FD  4
#define MAX_APP_NAME_SIZE  64
#define QSEECOM_HASH_SIZE  32

/* qseecom_ta_heap allocation retry delay (ms) and max attemp count */
#define QSEECOM_TA_ION_ALLOCATE_DELAY           50
#define QSEECOM_TA_ION_ALLOCATE_MAX_ATTEMP      20

/*
 * struct qseecom_register_listener_req -
 *      for register listener ioctl request