mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
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: Dave Stevenson <dave.stevenson@raspberrypi.org>
This commit is contained in:
committed by
popcornmix
parent
8cab60966a
commit
1607ebcfa3
@@ -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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user