summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-04-07 10:24:54 -0400
committerOlivier Fourdan <ofourdan@redhat.com>2017-09-22 18:45:59 +0200
commit74126530c0c22cf3e5f8bd2dd2740fded2df098f (patch)
tree6a8165deaac12dde1e3a12fc9b38ce39321ce3cf /hw
parent60ae865a703cb2c51c0b00cd768a46a20d79f0f1 (diff)
xephyr: Check for host XVideo support before trying to use it
Otherwise xcb will treat our attempt to send xv requests as a connection error (quite reasonably: we're asking it to emit a request for which there is no defined major opcode), and we'll die quietly the first time we hit KdBlockhandler. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 14d2fe74f4e51c5b37eab4b7475c804a0340b530)
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/ephyr/ephyrvideo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 31b1eee31..17336ab2b 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -226,6 +226,11 @@ ephyrInitVideo(ScreenPtr pScreen)
return FALSE;
}
+ if (!hostx_has_extension(&xcb_xv_id)) {
+ EPHYR_LOG_ERROR("Host has no XVideo extension\n");
+ return FALSE;
+ }
+
if (!xv_priv) {
xv_priv = ephyrXVPrivNew();
}