[PATCH xf86-video-amdgpu] Revert "Use render node for DRI3 if available"
Michel Dänzer
michel at daenzer.net
Fri Mar 25 03:00:05 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
This reverts commit ea558e645786b08d75307716036045170e97b43e.
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
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
configure.ac | 2 +-
src/amdgpu_dri3.c | 37 +++----------------------------------
src/amdgpu_probe.h | 1 -
3 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/configure.ac b/configure.ac
index 58b79c5..b11475a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for libraries.
-PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.60])
+PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.58])
PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu])
PKG_CHECK_MODULES(GBM, [gbm])
diff --git a/src/amdgpu_dri3.c b/src/amdgpu_dri3.c
index 65d4899..06d0668 100644
--- a/src/amdgpu_dri3.c
+++ b/src/amdgpu_dri3.c
@@ -39,7 +39,9 @@
#include <fcntl.h>
#include <errno.h>
-static int open_master_node(ScreenPtr screen, int *out)
+
+static int
+amdgpu_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn);
@@ -85,36 +87,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);
- AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn);
- int fd;
-
- fd = open(pAMDGPUEnt->render_node, O_RDWR | O_CLOEXEC);
- if (fd < 0)
- return BadAlloc;
-
- *out = fd;
- return Success;
-}
-
-static int
-amdgpu_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out)
-{
- ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
- AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn);
- int ret = BadAlloc;
-
- if (pAMDGPUEnt->render_node)
- ret = open_render_node(screen, out);
-
- if (ret != Success)
- ret = open_master_node(screen, out);
-
- return ret;
-}
-
static PixmapPtr amdgpu_dri3_pixmap_from_fd(ScreenPtr screen,
int fd,
CARD16 width,
@@ -211,9 +183,6 @@ Bool
amdgpu_dri3_screen_init(ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
- AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn);
-
- pAMDGPUEnt->render_node = drmGetRenderDeviceNameFromFd(pAMDGPUEnt->fd);
if (!dri3_screen_init(screen, &amdgpu_dri3_screen_info)) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
diff --git a/src/amdgpu_probe.h b/src/amdgpu_probe.h
index 6edd4a1..5194f4c 100644
--- a/src/amdgpu_probe.h
+++ b/src/amdgpu_probe.h
@@ -86,7 +86,6 @@ typedef struct {
int fd_wakeup_ref;
unsigned int assigned_crtcs;
struct xf86_platform_device *platform_dev;
- char *render_node;
} AMDGPUEntRec, *AMDGPUEntPtr;
extern const OptionInfoRec *AMDGPUOptionsWeak(void);
--
2.8.0.rc3
More information about the xorg-driver-ati
mailing list