1 From 11937ca9b223ffa394f04940b245b3689172537f Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Mon, 24 Sep 2018 16:57:09 +0100
4 Subject: [PATCH 270/703] staging: mmal-vchiq: Make timeout a defined parameter
6 The timeout period for VPU communications is a useful thing
7 to extend when debugging.
8 Set it via a define, rather than a magic number buried in the code.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 8 +++++++-
13 1 file changed, 7 insertions(+), 1 deletion(-)
15 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
16 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
17 @@ -44,6 +44,12 @@ MODULE_VERSION("0.0.1");
19 #define VCHIQ_MMAL_MAX_COMPONENTS 64
22 + * Timeout for synchronous msg responses in seconds.
23 + * Helpful to increase this if stopping in the VPU debugger.
25 +#define SYNC_MSG_TIMEOUT 3
27 /*#define FULL_MSG_DUMP 1*/
30 @@ -691,7 +697,7 @@ static int send_synchronous_mmal_msg(str
33 timeout = wait_for_completion_timeout(&msg_context->u.sync.cmplt,
35 + SYNC_MSG_TIMEOUT * HZ);
37 pr_err("timed out waiting for sync completion\n");