summaryrefslogtreecommitdiff
path: root/va/x11/va_x11.c
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@gmail.com>2010-07-26 11:01:25 +0800
committerAustin Yuan <shengquan.yuan@gmail.com>2010-07-26 11:01:25 +0800
commita40d12d88ea696d6544b2602e2625ad3203f54d1 (patch)
treed057fbf6f7e4caad108ad054f36538c35f9dc613 /va/x11/va_x11.c
parent016c719c13f19a310e1a9114d602b6cd0f3db5ab (diff)
parent6772bdb4406edaf55da2e3604003c9eafff31c36 (diff)
Diffstat (limited to 'va/x11/va_x11.c')
-rw-r--r--va/x11/va_x11.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
index 7f8fbd6..cbd2614 100644
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -31,6 +31,7 @@
#include "va_dri2.h"
#include "va_dricommon.h"
#include "va_nvctrl.h"
+#include "va_fglrx.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -130,6 +131,24 @@ static VAStatus va_NVCTRL_GetDriverName (
return VA_STATUS_SUCCESS;
}
+static VAStatus va_FGLRX_GetDriverName (
+ VADisplayContextP pDisplayContext,
+ char **driver_name
+)
+{
+ VADriverContextP ctx = pDisplayContext->pDriverContext;
+ int driver_major, driver_minor, driver_patch;
+ Bool result;
+
+ result = VA_FGLRXGetClientDriverName(ctx->native_dpy, ctx->x11_screen,
+ &driver_major, &driver_minor,
+ &driver_patch, driver_name);
+ if (!result)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ return VA_STATUS_SUCCESS;
+}
+
static VAStatus va_DisplayContextGetDriverName (
VADisplayContextP pDisplayContext,
char **driver_name
@@ -145,7 +164,8 @@ static VAStatus va_DisplayContextGetDriverName (
vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name);
if (vaStatus != VA_STATUS_SUCCESS)
vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name);
-
+ if (vaStatus != VA_STATUS_SUCCESS)
+ vaStatus = va_FGLRX_GetDriverName(pDisplayContext, driver_name);
return vaStatus;
}