From 2c7111235ca5c3bd23cd824589dfbc0ebd477585 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 13 Dec 2014 22:22:30 -0800 Subject: [PATCH] modesetting: Enable Xv when using glamor This just calls the existing function to create the relevant Xv adaptor and hook it up. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher --- hw/xfree86/drivers/modesetting/driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index cad900063..d9a29827c 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -1103,6 +1103,19 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) xf86DPMSInit(pScreen, xf86DPMSSet, 0); +#ifdef GLAMOR + if (ms->drmmode.glamor) { + XF86VideoAdaptorPtr glamor_adaptor; + + glamor_adaptor = glamor_xv_init(pScreen, 16); + if (glamor_adaptor != NULL) + xf86XVScreenInit(pScreen, &glamor_adaptor, 1); + else + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to initialize XV support.\n"); + } +#endif + if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);