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

Commit 6c0b7d51 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: ADSPRPC: Reduce timeout while opening device



When opening new device, wait for pending list to be empty for a
maximum of half second instead of the existing 5secs.

Change-Id: I2d0a96034b71986484da9581331c3989bc619abc
Acked-by: default avatarVishnu Karthik D <vikarthi@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 0de9a1a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@
#define VMID_ADSP_Q6    6

#define RPC_TIMEOUT	(5 * HZ)
#define OPEN_TIMEOUT    (0.5 * HZ)
#define BALIGN		128
#define NUM_CHANNELS	3		/*1 compute 1 cpz 1 mdsp*/
#define NUM_SESSIONS	8		/*8 compute*/
@@ -2010,9 +2011,9 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)

	if (me->pending_free) {
		event = wait_event_interruptible_timeout(wait_queue,
						!me->pending_free, RPC_TIMEOUT);
				!me->pending_free, OPEN_TIMEOUT);
		if (event == 0)
			pr_err("timed out..list is still not empty\n");
			pr_err("fastrpc:timed out..list is still not empty\n");
	}

	VERIFY(err, fl = kzalloc(sizeof(*fl), GFP_KERNEL));