>From 06c37e84627d0d49985c9e056d3fcf6a78bddd0d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko <i.gnatenko.brain@xxxxxxxxx> Date: Sun, 24 Nov 2013 20:27:24 +0400 Subject: [PATCH] xwayland: device isn't even open that explains why drmGetCap fails and it advertises no Prime capabilities Since d9769c193765ac303ad4d4760e57ff368df1f663 DRI_PRIME=1 works isn't correctly. 1. $ xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0x0 crtcs: 2 outputs: 4 associated providers: 0 name:Intel Provider 1: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 0 name:radeon 2. $ xrandr --setprovideroffloadsink 0x55 0x7b X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 139 (RANDR) Minor opcode of failed request: 34 () Value in failed request: 0x7b Serial number of failed request: 16 Current serial number in output stream: 17 Reported-and-tested-by: Kirill Rusinov <carasin.berlogue@xxxxxxx> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@xxxxxxxxx> Signed-off-by: Axel Davy <davyaxel@xxxxxxx> Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1033903 --- src/uxa/intel_driver.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index 1c38075..c5d85c8 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -549,6 +549,12 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) intel->PciInfo = xf86GetPciInfoForEntity(intel->pEnt->index); + if (!xorgWayland && (!intel_open_drm_master(scrn))) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to become DRM master.\n"); + return FALSE; + } + scrn->monitor = scrn->confScreen->monitor; scrn->progClock = TRUE; scrn->rgbBits = 8; @@ -604,14 +610,13 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) } intel->drmSubFD = xwl_screen_get_drm_fd(intel->xwl_screen); + + if (!intel->xwl_screen && !intel_open_drm_master(scrn)) + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "Failed to become DRM master.\n"); } #endif - if (!intel->xwl_screen && !intel_open_drm_master(scrn)) - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "Failed to become DRM master.\n"); - - if (!intel_init_bufmgr(intel)) { PreInitCleanup(scrn); return FALSE; -- 1.8.4.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx