Commit 66f9048e authored by Austin Yuan's avatar Austin Yuan

save

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@gmail.com>
parent c27fe40c
...@@ -57,7 +57,7 @@ endif ...@@ -57,7 +57,7 @@ endif
libva_la_SOURCES = va.c va_trace.c libva_la_SOURCES = va.c va_trace.c
libvaincludedir = ${includedir}/va libvaincludedir = ${includedir}/va
libvainclude_HEADERS = va.h va_x11.h va_backend.h va_version.h libvainclude_HEADERS = va.h va_x11.h va_backend.h va_dummy.h va_version.h
DISTCLEANFILES = \ DISTCLEANFILES = \
va_version.h va_version.h
......
...@@ -107,7 +107,7 @@ int drm_open_any(void) ...@@ -107,7 +107,7 @@ int drm_open_any(void)
if (fd < 0) { if (fd < 0) {
fprintf(stderr, "failed to open any drm device\n"); fprintf(stderr, "failed to open any drm device\n");
abort(); //abort();
} }
return fd; return fd;
...@@ -122,7 +122,7 @@ int drm_open_any_master(void) ...@@ -122,7 +122,7 @@ int drm_open_any_master(void)
if (fd < 0) { if (fd < 0) {
fprintf(stderr, "failed to open any drm device\n"); fprintf(stderr, "failed to open any drm device\n");
abort(); //abort();
} }
return fd; return fd;
......
...@@ -97,8 +97,15 @@ static VAStatus va_DisplayContextGetDriverName ( ...@@ -97,8 +97,15 @@ static VAStatus va_DisplayContextGetDriverName (
memset(dri_state, 0, sizeof(*dri_state)); memset(dri_state, 0, sizeof(*dri_state));
dri_state->fd = drm_open_any_master(); dri_state->fd = drm_open_any_master();
if (dri_state->fd < 0) if (dri_state->fd < 0) {
fprintf(stderr, "open DRM device by udev failed, try /dev/dri/card0\n");
dri_state->fd = open("/dev/dri/card0", O_RDWR);
}
if (dri_state->fd < 0) {
fprintf(stderr,"can't open DRM devices\n");
return VA_STATUS_ERROR_UNKNOWN; return VA_STATUS_ERROR_UNKNOWN;
}
if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL
&& geteuid() == getuid()) && geteuid() == getuid())
...@@ -110,7 +117,7 @@ static VAStatus va_DisplayContextGetDriverName ( ...@@ -110,7 +117,7 @@ static VAStatus va_DisplayContextGetDriverName (
*driver_name = strdup(devices[0].driver_name); *driver_name = strdup(devices[0].driver_name);
dri_state->driConnectedFlag = VA_DRI2; dri_state->driConnectedFlag = VA_DUMMY;
return VA_STATUS_SUCCESS; return VA_STATUS_SUCCESS;
} }
......
va_android.h
\ No newline at end of file
...@@ -13,7 +13,8 @@ enum ...@@ -13,7 +13,8 @@ enum
{ {
VA_NONE = 0, VA_NONE = 0,
VA_DRI1 = 1, VA_DRI1 = 1,
VA_DRI2 = 2 VA_DRI2 = 2,
VA_DUMMY = 3
}; };
union dri_buffer union dri_buffer
......
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