Commit 943686a9 authored by Austin Yuan's avatar Austin Yuan

Follow up the change of "LIBVA_DRIVER_NAME", remove it from va_android.cpp

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@gmail.com>
parent cb2ba3ed
......@@ -47,12 +47,6 @@
static VADisplayContextP pDisplayContexts = NULL;
static int vaDisplayIsValid (VADisplay dpy)
{
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
return pDisplayContext && (pDisplayContext->vadpy_magic == VA_DISPLAY_MAGIC) && pDisplayContext->vaIsValid(pDisplayContext);
}
static int open_device (char *dev_name)
{
struct stat st;
......@@ -85,7 +79,7 @@ static int open_device (char *dev_name)
static int va_DisplayContextIsValid (
VADisplayContextP pDisplayContext
)
)
{
VADisplayContextP ctx = pDisplayContexts;
......@@ -149,16 +143,10 @@ static VAStatus va_DisplayContextGetDriverName (
return VA_STATUS_ERROR_UNKNOWN;
}
if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL
&& geteuid() == getuid()) {
/* don't allow setuid apps to use LIBVA_DRIVER_NAME */
*driver_name = strdup(driver_name_env);
return VA_STATUS_SUCCESS;
} else { /* TBD: other vendor driver names */
/* TBD: other vendor driver names */
vendor_id = devices[0].vendor_id;
device_id = devices[0].device_id;
*driver_name = strdup(devices[0].driver_name);
}
dri_state->driConnectedFlag = VA_DUMMY;
......@@ -174,6 +162,7 @@ static VAStatus va_DisplayContextGetDriverName (
struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
char *driver_name_env;
int vendor_id, device_id;
int i = 0;
struct {
int vendor_id;
......@@ -193,13 +182,7 @@ static VAStatus va_DisplayContextGetDriverName (
return VA_STATUS_ERROR_UNKNOWN;
}
if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL
&& geteuid() == getuid()) {
/* don't allow setuid apps to use LIBVA_DRIVER_NAME */
*driver_name = strdup(driver_name_env);
return VA_STATUS_SUCCESS;
} else { /* TBD: other vendor driver names */
int i = 0;
/* TBD: other vendor driver names */
while (devices[i].device_id != 0) {
if ((devices[i].vendor_id == vendor_id) &&
......@@ -216,7 +199,6 @@ static VAStatus va_DisplayContextGetDriverName (
return VA_STATUS_ERROR_UNKNOWN;
}
}
printf("DRM device is opened, loading driver %s for device 0x%04x:0x%04x\n",
driver_name, vendor_id, device_id);
......
......@@ -47,8 +47,6 @@
status = vtable->va##func##GLX args; \
} while (0)
// Check VADisplay is valid (from libva.so.*)
int vaDisplayIsValid(VADisplay dpy);
// Destroy VA/GLX display context
static void va_DisplayContextDestroy(VADisplayContextP pDisplayContext)
......
......@@ -159,6 +159,8 @@ const char *vaErrorStr(VAStatus error_status);
*/
typedef void* NativeDisplay; /* window system dependent */
int vaDisplayIsValid(VADisplay dpy);
/*
* Initialize the library
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment