6168d078f8f9b2bdf9ac328ebb2b12e3b6409b44
[openwrt/staging/lynxis.git] /
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
5
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.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
11 ---
12 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 8 +++++++-
13 1 file changed, 7 insertions(+), 1 deletion(-)
14
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");
18 */
19 #define VCHIQ_MMAL_MAX_COMPONENTS 64
20
21 +/*
22 + * Timeout for synchronous msg responses in seconds.
23 + * Helpful to increase this if stopping in the VPU debugger.
24 + */
25 +#define SYNC_MSG_TIMEOUT 3
26 +
27 /*#define FULL_MSG_DUMP 1*/
28
29 #ifdef DEBUG
30 @@ -691,7 +697,7 @@ static int send_synchronous_mmal_msg(str
31 }
32
33 timeout = wait_for_completion_timeout(&msg_context->u.sync.cmplt,
34 - 3 * HZ);
35 + SYNC_MSG_TIMEOUT * HZ);
36 if (timeout == 0) {
37 pr_err("timed out waiting for sync completion\n");
38 ret = -ETIME;