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

Commit ef2d31d4 authored by Manoj Prabhu B's avatar Manoj Prabhu B
Browse files

memshare: Respond to query qmi always with boot time init value



Query qmi is for a client to know what memshare driver can allocate.
Presently query qmi is responded with what has been allocated.
Modify the response to convey what is initialized at boot time
by parsing dts entries.

Change-Id: I8a06b5df0472e0409d5873c763478db4d41accd2
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 3b501c04
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -631,9 +631,9 @@ static void handle_query_size_req(struct qmi_handle *handle,
		return;
	}

	if (memblock[client_id].size) {
	if (memblock[client_id].init_size) {
		query_resp->size_valid = 1;
		query_resp->size = memblock[client_id].size;
		query_resp->size = memblock[client_id].init_size;
	} else {
		query_resp->size_valid = 1;
		query_resp->size = 0;
@@ -812,7 +812,7 @@ static int memshare_child_probe(struct platform_device *pdev)
	else if (strcmp(name, "wcnss") == 0)
		memblock[num_clients].peripheral = DHMS_MEM_PROC_WCNSS_V01;

	memblock[num_clients].size = size;
	memblock[num_clients].init_size = size;
	memblock[num_clients].client_id = client_id;

  /*
@@ -830,6 +830,7 @@ static int memshare_child_probe(struct platform_device *pdev)
				rc);
			return rc;
		}
		memblock[num_clients].size = size;
		memblock[num_clients].allotted = 1;
		shared_hyp_mapping(num_clients);
	}
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ struct mem_blocks {
	uint32_t guard_band;
	/* Size required for client */
	uint32_t size;
	/* Available memory size for client */
	uint32_t init_size;
	/*
	 * start address of the memory block reserved by server memory
	 * subsystem to client