[PATCH xserver] xephyr: Check for host XVideo support before trying to use it

2017-04-07 Thread Adam Jackson
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 
---
 hw/kdrive/ephyr/ephyrvideo.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 9c9c78d..671a0dd 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();
 }
-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] xephyr: Check for host XVideo support before trying to use it

2017-04-07 Thread Eric Anholt
Adam Jackson  writes:

> 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.

Reviewed-by: Eric Anholt 


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel