winsys/radeon: fix bo with virtual address referencing mismatch
authorMartin Andersson <g02maran@gmail.com>
Sat, 2 Feb 2013 16:55:07 +0000 (17:55 +0100)
committerJerome Glisse <jglisse@redhat.com>
Mon, 11 Feb 2013 23:38:00 +0000 (18:38 -0500)
commita37835c8eda017f0c955e0927e7418e7f3ba3b73
tree26a062f420db691a7165946f0be3fa36c728d665
parente776b632c095690763bcbc8164834ed92c21ea5b
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 <g02maran@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c