diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-03-25 11:50:15 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-03-25 11:50:15 +0900 |
commit | 8a6cd4bda05b9569b3dd0a5a75b2cc385b9ecba9 (patch) | |
tree | 90d79b54491247743dd3d3a2f4f08c6021d0feeb /src/radeon_dri3.c | |
parent | ed31cffba0d1bd4b14e5348a1456e4377277059c (diff) |
Revert "Use render node for DRI3 if available"
This reverts commit cd94248ffa7d8fe0b57476f79e7e860dee66d1b0.
It broke VDPAU<->GL interop with DRI3 enabled, because the Gallium VDPAU
code doesn't support DRI3 yet. We can consider re-enabling this once
there is a Mesa release where the Gallium VDPAU code supports DRI3.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94675
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_dri3.c')
-rw-r--r-- | src/radeon_dri3.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c index de97f396..1415a0df 100644 --- a/src/radeon_dri3.c +++ b/src/radeon_dri3.c @@ -39,7 +39,9 @@ #include <fcntl.h> #include <errno.h> -static int open_master_node(ScreenPtr screen, int *out) + +static int +radeon_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(scrn); @@ -84,36 +86,6 @@ static int open_master_node(ScreenPtr screen, int *out) return Success; } -static int open_render_node(ScreenPtr screen, int *out) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn); - int fd; - - fd = open(pRADEONEnt->render_node, O_RDWR | O_CLOEXEC); - if (fd < 0) - return BadAlloc; - - *out = fd; - return Success; -} - -static int -radeon_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out) -{ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn); - int ret = BadAlloc; - - if (pRADEONEnt->render_node) - ret = open_render_node(screen, out); - - if (ret != Success) - ret = open_master_node(screen, out); - - return ret; -} - static PixmapPtr radeon_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 width, @@ -218,9 +190,6 @@ Bool radeon_dri3_screen_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn); - - pRADEONEnt->render_node = drmGetRenderDeviceNameFromFd(pRADEONEnt->fd); if (!dri3_screen_init(screen, &radeon_dri3_screen_info)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, |