| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If code calls va_isDRI2Connected multiple times there is no protection
against calling open(device_name, O_RDWR) again and losing the reference
to the original file descriptor.
A recent change (bc8a12) calls the method twice each time libva is
initialized, thus causing a leak of device file descriptors.
This change moves the initializing of the fd and auth_type to the
creation of the dri_state and then checks to see if they have already
been initialized. If so, the method va_isDRIConnected returns true
and fills in driver_name.
|
|
|
|
|
|
| |
Fixes #396
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
|
|
|
|
|
| |
Map the i965 DRI driver to iHD and i965 vaapi
driver candidates.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
|
|
|
|
| |
Otherwise it might dereference a freed pointer in the next loop
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
|
|
|
|
|
|
|
| |
This will be required to set common options on a newly-created driver
context.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
| |
Remove -DLINUX macro definition as compiler parameters because it is
not used.
Fixes: #147
|
|
|
|
|
|
|
|
|
| |
- /va/x11/dri2_util.c:
> libva-1.8.3/va/x11/dri2_util.c:218: check_after_deref: Null-checking
> "device_name" suggests that it may be null, but it has already been
> dereferenced on all paths leading to the check.
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
|
| |
The reserved bytest must be set to 0, then we can add new fields to those
structures in future without worrying about the API compatibility too
much.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
| |
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
| |
Add "va_" prefix to trace_flag, fool_codec and fool_postp to avoid
polluting the global namespace.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
| |
This is slightly cleaner, and will be required to set common
options on a newly-created display.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
| |
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notify user an error if user provides --enable-x11/--enable-glx/--enable-egl/--enable-wayland
however the requirement can't be met. drm has been checked mandatorily
in the script
v2: Remove XEXT_CFLAGS/XFIXES_CFLAGS from va/x11/Makefile.am and use
$X11_PKG_ERRORS in the error message if the requirement is met for VA/X11
This fixes https://github.com/01org/libva/issues/68
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The display server doesn't support the big picture, so the returned
buffer is NULL. The fix returns a NULL buffer instead of assertion fault
in libva-x11, the backend driver should handle this case in a right way
as well.
This fixes https://github.com/01org/libva/issues/51
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By passing divisor=0, we imply we do not care about synchronisation of
this request to the vertical refresh - the spec says that if we miss the
target frame, the swap will be presented as quickly as possible and may
forgo waiting until the next vblank. By using divisor=1, we request that
the swap be presented upon the vertical refresh immediately following
recipe, enforcing the synchronisation to vblank and avoiding tearing.
Reported-and-tested-by: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
dri2_util.c: In function 'dri2Close':
dri2_util.c:171:33: warning: suggest braces around empty body in an 'if'
statement [-Wempty-body]
if (dri_state->base.fd >= 0);
^
Introduced-by: commit fffeffb8a78fffbb6a May 30 2011
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=61603
Signed-off-by: Alexandr <pankoAA@ya.ru>
|
|
|
|
|
|
|
|
|
|
| |
device.
Applications run in a different account than the logged in user will not have permission
to access /dev/dri/card0 but may be able to work without it, particularly if VA-API was
brought in through a general framework such as GStreamer.
Signed-off-by: Francois Gouget <fgouget@free.fr>
|
|
|
|
| |
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling vaTerminate() after the pixmaps, given to vaPutSurface(), have
been destroyed results in errors coming from the X server.
These errors happens because LibVA tries to destroy the DRI2Drawables
related to the XPixmaps passed to vaPutSurface(). VA_DRI2Error() has
some code to catch these errors and ignore them. The problem is that
LibX11 doesn't trigger the extension error handlers unless you're
waiting for a response using _XReply(), and there is no defined answer
to a DRI2DestroyDrawable message in the DRI2 protocol.
The attached patch tries to work around that issue by checking whether
the XPixmap is still alive before proceeding with DRI2DestroyDrawable.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
|
|
|
|
|
| |
Otherwise i may be 32 after enter the loop and access
dri_state->drawable_hash[32].
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The following are not part of the API thus should be hidden.
- dri2Close
- VA_FGLRXGetClientDriverName
- VA_NVCTRLQueryDirectRenderingCapable
- VA_NVCTRLGetClientDriverName
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
File: va_x11.c
Function: va_DisplayContextGetDriverName -> va_DRI2GetDriverName -> dri2_util.c:isDRI2Connected
Line: 154 -> 84 -> dri2_util.c:184
Code:
TRACEBACK
va_x11.c:151: driver_name is NULL
va_x11.c:154: 'driver_name' is passed to function 'va_DRI2GetDriverName'.
dri2_util.c:84: 'driver_name' is passed to function 'isDRI2Connected'.
dri2_util.c:184: 'driver_name' is explicitly dereferenced.
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
(cherry picked from commit c87699f32c6c79905a2fd8675cd19f22e1f4b024)
|
|
|
|
|
| |
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
(cherry picked from commit 15a0fca64456d8c7de1f7aca2cb747c4929690cd)
|
|
|
|
|
|
|
|
|
| |
error: 'AM_CONFIG_HEADER': this macro is obsolete.
You should use the 'AC_CONFIG_HEADERS' macro instead.
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
changed NO_CONFIGURE to NOCONFIGURE to be consistent with other packages
|
|
|
|
|
|
|
| |
Fix build dependencies for all backends (DRM, X11, GLX, EGL, Wayland),
especially when they don't live in standard locations.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
| |
Make it possible to easily find how the VA display was created. This
helps implement multiple backends in VA drivers. e.g. X11, Wayland
while keeping a single generated binary.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
| |
VADriverContext.drm_state holds data structures derived from struct
drm_state, thus also including struct dri_state for VA/X11 drivers.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
| |
Add <va/va_drmcommon.h> header for DRM-based drivers to use common
base utilities and data structures. So far, only the DRM state is
shared so that to maintain binary compatibility.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was work-in-progress and it turned out to be less efficient
than a dedicated API that could allow direct texturing from YUV
components.
This reverts the following commits:
30b5e62: fix license template for Makefile.am
d1acbc9: add the missing license header to some files
fc8f1b8: include va_egl.h instead of va.h
c3ab994: array bound check
7b663dc: update the VA/EGL implementation in VAAPI
0851426: move va_egl.h to va/ to avoid compile error
1cda440: VA/EGL interfaces
af294d1: fix compiling error if GLESv1_CM isn't installed in the default location
2a4fcff: fix the number of the allocated elements
2f484d7: update VA/EGL test case as well
2ac9bac: a test case to use VA/EGL interfaces
731d575: new hooks to create/free native pixmap
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
| |
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
|
|
|
|
| |
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
| |
vaGetDisplay() belongs to winsys headers.
This reverts commit 52c87f898b210cddde70231021097c5a0bb6fdc3.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
| |
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
| |
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
| |
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
VA_FGLRXGetClientDriverName() used to return success even if no
valid driver name was found, thus returning a NULL driver name.
Also fixed the X display name matching routine to filter out the
screen number, which may not be in the string, and make sure to
compare screen numbers from what ADL returns too.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
|
| |
remove va_fool_getframe.c which looks strange
correct some coding style for file va.c
simplify va_fool.c for both decode and encode
refine the surface dump of va_trace.c
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
This patch fixes the following error.
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 137 (DRI2)
Minor opcode of failed request: 4 (DRI2DestroyDrawable)
Resource id in failed request: 0x4800001
Serial number of failed request: 30
Current serial number in output stream: 32
The X drawable can die before we notice it in free_drawable_hashtable(),
called through vaTerminate(). This patch is ported from Mesa (GLX/DRI2).
Regards,
Gwenole.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Signed-off-by: Edgar Hucek <gimli@dark-green.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
| |
We should use _XReplay. _XSend will introduce more CPU usage
Signed-off-by: Edgar Hucek <gimli@dark-green.com>
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
|
|
|
|
|
|
|
|
|
| |
1) add free_drawable
2) clean the license of Android.mk
3) define VA_ROTATION_270 to 3 instead of 4
Signed-off-by: Zhaohan Ren <zhaohan.ren@intel.com>
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
|
|
|
|
|
|
|
|
| |
Previously a VA display will be shared if a native display is shared by
multiple threads, it will casue some thread safety issue in a multi-threaded
program.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
| |
2) va_dri2.c: use _XSend instead of _XReply which is time-consuming
3) trace message for vaPutSurface/vaInitialize/vaTerminate
Signed-off-by: Guoliang Ji <guoliangx.ji@intel.com>
Signed-off-by: Zhaohan Ren <zhaohan.ren@intel.com>
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
|
| |
|
| |
|