From f72e5e22e0055e2b42de04723930d001d4d15adb Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 14 Dec 2018 14:57:08 -0800 Subject: [PATCH] vtest: deprecate protocol version 0 Signed-off-by: Gurchetan Singh Reviewed-By: Gert Wollny --- vtest/vtest_renderer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index 84f8d09..eed4469 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -233,6 +233,16 @@ int vtest_protocol_version(UNUSED uint32_t length_dw) renderer.protocol_version = MIN2(version_buf[VCMD_PROTOCOL_VERSION_VERSION], VTEST_PROTOCOL_VERSION); + /* + * We've deprecated protocol version 1. All of it's called sites are being + * moved protocol version 2. If the server supports version 2 and the guest + * supports verison 1, fall back to version 0. + */ + if (renderer.protocol_version == 1) { + printf("Older guest Mesa detected, fallbacking to protocol version 0\n"); + renderer.protocol_version = 0; + } + hdr_buf[VTEST_CMD_LEN] = VCMD_PROTOCOL_VERSION_SIZE; hdr_buf[VTEST_CMD_ID] = VCMD_PROTOCOL_VERSION;