summaryrefslogtreecommitdiff
path: root/tests/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2014-09-12 13:48:36 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-09-15 14:51:07 +0100
commit743af59669386cb6e063fa4bd85f0a0b2da86295 (patch)
tree96ed2aa1b31ff80bb277b9d739728dbce721353d /tests/radeon/radeon_ttm.c
parent63fc571863aa646834004fae2a8aee1326b775dc (diff)
intel: make bufmgr_gem shareable from different API
When using Mesa and LibVA in the same process, one would like to be able bind buffers from the output of the decoder to a GL texture through an EGLImage. LibVA can reuse buffers allocated by Gbm through a file descriptor. It will then wrap it into a drm_intel_bo with drm_intel_bo_gem_create_from_prime(). The problem at the moment is that both library get a different drm_intel_bufmgr object when they call drm_intel_bufmgr_gem_init() even though they're using the same drm file descriptor. As a result, instead of manipulating the same buffer object for a given file descriptor, they get 2 different drm_intel_bo objects and 2 different refcounts, leading one of the library to get errors from the kernel on invalid BO when one of the 2 library is done with a shared buffer. This patch modifies drm_intel_bufmgr_gem_init() so, given a file descriptor, it will look for an already existing drm_intel_bufmgr using the same file descriptor and return that object. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'tests/radeon/radeon_ttm.c')
0 files changed, 0 insertions, 0 deletions