Commit 481e5397 authored by Dave Stevenson's avatar Dave Stevenson Committed by Greg Kroah-Hartman
Browse files

staging: mmal-vchiq: Make timeout a defined parameter



The timeout period for VPU communications is a useful thing
to extend when debugging.
Set it via a define, rather than a magic number buried in the code.

Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-2-nsaenzjulienne@suse.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95154990
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@
 */
#define VCHIQ_MMAL_MAX_COMPONENTS 64

/*
 * Timeout for synchronous msg responses in seconds.
 * Helpful to increase this if stopping in the VPU debugger.
 */
#define SYNC_MSG_TIMEOUT       3

/*#define FULL_MSG_DUMP 1*/

#ifdef DEBUG
@@ -686,7 +692,7 @@ static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *instance,
	}

	timeout = wait_for_completion_timeout(&msg_context->u.sync.cmplt,
					      3 * HZ);
					      SYNC_MSG_TIMEOUT * HZ);
	if (timeout == 0) {
		pr_err("timed out waiting for sync completion\n");
		ret = -ETIME;