Skip to content

Commit

Permalink
staging: mmal-vchiq: Make timeout a defined parameter
Browse files Browse the repository at this point in the history
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: Dave Stevenson <dave.stevenson@raspberrypi.org>
  • Loading branch information
6by9 authored and Phil Elwell committed May 28, 2019
1 parent 5cad22b commit e6b5ca5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
Expand Up @@ -43,6 +43,12 @@ MODULE_VERSION("0.0.1");
*/
#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
Expand Down Expand Up @@ -691,7 +697,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;
Expand Down

0 comments on commit e6b5ca5

Please sign in to comment.