diff options
author | Maarten Lankhorst | 2015-02-26 04:54:03 -0600 |
---|---|---|
committer | Maarten Lankhorst | 2015-03-13 14:26:33 -0500 |
commit | 5ea6f1c32628887c9df0c53bc8c199eb12633fec (patch) | |
tree | f466d5ed08d547ebb20da6ccc6fa1cbb2efc3785 /tests/Makefile.am | |
parent | 7caa442e761ab5e48698c937aea9ce18f4522ecb (diff) | |
download | external-libgbm-5ea6f1c32628887c9df0c53bc8c199eb12633fec.tar.gz external-libgbm-5ea6f1c32628887c9df0c53bc8c199eb12633fec.tar.xz external-libgbm-5ea6f1c32628887c9df0c53bc8c199eb12633fec.zip |
nouveau: make nouveau importing global buffers completely thread-safe, with tests
While I've closed off most races in a previous patch, a small race still existed
where importing then unreffing cound cause an invalid bo. Add a test for this case.
Racing sequence fixed:
- thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock.
- thread 2 increases refcount to 1.
- thread 2 decreases refcount to zero, blocks on acquiring nvdev->lock.
At this point the 2 threads will clean up the same bo.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Reviewed-By: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index d5269f94..94fcc080 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -31,6 +31,10 @@ check_PROGRAMS = \ | |||
31 | dristat \ | 31 | dristat \ |
32 | drmstat | 32 | drmstat |
33 | 33 | ||
34 | if HAVE_NOUVEAU | ||
35 | SUBDIRS += nouveau | ||
36 | endif | ||
37 | |||
34 | if HAVE_LIBUDEV | 38 | if HAVE_LIBUDEV |
35 | 39 | ||
36 | check_LTLIBRARIES = libdrmtest.la | 40 | check_LTLIBRARIES = libdrmtest.la |