From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Desai, Neel" <neel.desai@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 1/1] lib/igt_chamelium: Increase timeout for CaptureVideo
Date: Tue, 16 Apr 2019 16:34:24 +0000 [thread overview]
Message-ID: <ebc43d53b6b05e95c353c1d5ddd56fceead3b279.camel@intel.com> (raw)
In-Reply-To: <669c0091ff05a3969d75418cb0e6c064b2cd6092.1555430824.git.neel.desai@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 3546 bytes --]
On Tue, 2019-04-16 at 09:13 -0700, Neel Desai wrote:
> For some chamelium boards, we observed that the chamelium_rpc()
> call with method_name as CaptureVideo timed out because the display
> resolution read by the FPGA using the VideoDumper did not match the
> resolution in the RX chip. The resolution read by the FPGA from the
> memory was incorrect after 10 seconds and needed more time to
> stabilize
> to the correct value.
>
> So, instead of checking the chamelium->env.fault_occured in the
> chamelium_rpc() funtion, we defer the check in the parent function
> chamelium_capture(). We iterate upto 10 times if chamelium_rpc() with
> method name as CaptureVideo fails thus effectively increasing the
> timeout to 100 seconds instead if 10 seconds. If after 10 iterations,
> chamelium->env.fault_occured is still set, we return an error.
>
> This looks like an issue from Google's end in the FPGA code. This
> patch
> introduces a workaround till we get the issue resolved from Google's
> end.
>
> Signed-off-by: Neel Desai <neel.desai@intel.com>
> ---
> lib/igt_chamelium.c | 33 +++++++++++++++++++++++++++++++--
> 1 file changed, 31 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 02cc9b2c..497d4421 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -301,6 +301,25 @@ static xmlrpc_value *chamelium_rpc(struct
> chamelium *chamelium,
> igt_cleanup_hotplug(monitor_args.mon);
> }
>
> + /*
> + * For some chamelium boards, we observed that the
> + * chamelium_rpc() call with method_name as CaptureVideo timed
> + * out because the display resolution read by the FPGA using
> + * VideoDumper did not match the resolution in the rx chip. The
> + * resolution read by the FPGA from the memory was
> + * incorrect and needed more time to stabilize to the correct
> + * value. So, instead of checking the
> + * chamelium->env.fault_occured here, we defer checking in the
> + * parent (chamelium_capture()) call and retry for 10 times.
> + * This increases the timeout to 100 seconds instead of 10
> + * seconds for CaptureVideo. After 10 iterations of
> + * chamelium_rpc with method_name as CaptureVideo if the
> + * chamelium->env.fault_occured is still set, we return an
> + * error.
> + */
> + if (!strcmp(method_name, "CaptureVideo"))
> + return res;
> +
Why not make this a standard capability for all RPC interaction? What
if we hit this in one of the other calls?
-Stuart
> igt_assert_f(!chamelium->env.fault_occurred,
> "Chamelium RPC call failed: %s\n",
> chamelium->env.fault_string);
> @@ -838,9 +857,19 @@ void chamelium_stop_capture(struct chamelium
> *chamelium, int frame_count)
> void chamelium_capture(struct chamelium *chamelium, struct
> chamelium_port *port,
> int x, int y, int w, int h, int frame_count)
> {
> - xmlrpc_DECREF(chamelium_rpc(chamelium, port, "CaptureVideo",
> + int iter = 0;
> + xmlrpc_value *res;
> + do {
> + res = chamelium_rpc(chamelium, port, "CaptureVideo",
> (w && h) ? "(iiiiii)" : "(iinnnn)",
> - port->id, frame_count, x, y, w,
> h));
> + port->id, frame_count, x, y, w, h);
> + iter++;
> + } while (chamelium->env.fault_occurred && iter < 10);
> +
> + igt_assert_f(!chamelium->env.fault_occurred,
> + "Chamelium RPC call failed: %s\n",
> + chamelium->env.fault_string);
> + xmlrpc_DECREF(res);
> chamelium->capturing_port = port;
> }
>
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3270 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-16 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 16:13 [igt-dev] [PATCH i-g-t 0/1] igt_chamelium: Increase timeout for CaptureVideo Neel Desai
2019-04-16 16:13 ` [igt-dev] [PATCH i-g-t 1/1] lib/igt_chamelium: " Neel Desai
2019-04-16 16:34 ` Summers, Stuart [this message]
2019-04-16 17:36 ` [igt-dev] ✓ Fi.CI.BAT: success for igt_chamelium: " Patchwork
2019-04-17 2:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebc43d53b6b05e95c353c1d5ddd56fceead3b279.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=neel.desai@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox