diff options
author | Martin Andersson <[email protected]> | 2013-02-02 17:55:07 +0100 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2013-02-11 18:38:00 -0500 |
commit | a37835c8eda017f0c955e0927e7418e7f3ba3b73 (patch) | |
tree | 26a062f420db691a7165946f0be3fa36c728d665 /src | |
parent | e776b632c095690763bcbc8164834ed92c21ea5b (diff) |
winsys/radeon: fix bo with virtual address referencing mismatch
If the same context try to flink and open the object, use the
same bo struct instead of opening a new gem handle for the object.
This way we avoid avoid having 2 different handle pointing to the
same kernel object which can latter lead to trouble with virtual
address.
Fix:
https://bugs.freedesktop.org/show_bug.cgi?id=60200
Signed-off-by: Martin Andersson <[email protected]>
Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index bb6e954c542..2d41c267ff7 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -963,6 +963,10 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer, whandle->handle = bo->handle; } + pipe_mutex_lock(bo->mgr->bo_handles_mutex); + util_hash_table_set(bo->mgr->bo_handles, (void*)(uintptr_t)whandle->handle, bo); + pipe_mutex_unlock(bo->mgr->bo_handles_mutex); + whandle->stride = stride; return TRUE; } |