Commit Graph

13 Commits (d3f9b3ca1407a66f380a4b58b2e940bf38e5f2c3)

Author SHA1 Message Date
Eric Engestrom 63d06ad3c3 use standard `__typeof__()` instead of GNU extension `typeof()`
And switch to c_std=c99. This simplifies using libdrm as a meson
subproject for mesa.

v2: (dylan)
  - switch to c99 as the standard
  - Fix amdgpu security tests as well

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
2022-01-19 16:08:31 -08:00
Emmanuel Vadot 1600fe1130 tests/nouveau/threaded: adapt ioctl signature for FreeBSD
FreeBSD also use (int, unsigned long int, ...) like GLIBC.

Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2020-04-21 19:26:54 +02:00
Ross Burton cd77f114ca tests/nouveau/threaded: adapt ioctl signature
POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
use (int, unsigned long int, ...) instead.

Use a #ifdef to adapt the replacement function as appropriate.

Signed-off-by: Ross Burton <ross.burton@intel.com>

[Taken from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-11-28 22:01:34 +01:00
Eric Engestrom fc933651b1 Revert "Revert "libdrm: remove autotools support""
The external tooling issue has been fixed, so we can delete autotools
again :)
2019-10-18 18:05:45 +01:00
Marek Olšák 51e3bb5665 Revert "libdrm: remove autotools support"
This reverts commit f057dc91e9.
2019-10-16 17:33:28 -04:00
Eric Engestrom f057dc91e9 libdrm: remove autotools support
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-14 16:07:20 +00:00
Lucas De Marchi 1e3fcc495b autotools: make symbols hidden by default
Now that symbols that should be exported are annotated accordingly, make
all the rest hidden by default.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19 22:46:45 -07:00
Lucas De Marchi ba808253bc meson: make symbols hidden by default
Now that symbols that should be exported are annotated accordingly, make
all the rest hidden by default.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19 22:46:45 -07:00
Eric Engestrom 0926f0af54 meson,configure: include config.h automatically
This will prevent any more missing `#include "config.h"` bug, at the
cost of having to recompile some files that didn't need to be when
changing build options.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-20 18:19:26 +00:00
Dylan Baker 5f7deb5078 Add meson build system
This patch adds a complete meson build system, including tests and
install. It has the necessary hooks to allow it be used as a subproject
for other meson based builds such as mesa.

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-01-12 09:40:48 -08:00
Tomasz Figa 8ef7e5b702 tests: Use -pthread in CFLAGS instead of -lpthread
-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-27 16:18:02 +00:00
Emil Velikov 58459a57fa tests/nouveau: automake: fold C and CPP flags
Since we don't have any C++ souces this should be a no-op. Folding the
two seems to be the common practise throughout the repo.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-27 16:15:45 +00:00
Maarten Lankhorst 5ea6f1c326 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>
2015-03-13 20:26:33 +01:00