aboutsummaryrefslogtreecommitdiffstats
path: root/radeon
diff options
context:
space:
mode:
authorJohn Stultz2018-04-13 18:31:33 -0500
committerJohn Stultz2018-04-13 18:31:33 -0500
commit84f838d71a75125b14d361f0ed7d23a0ac521edf (patch)
treea7694dfdab2ca2b1d32e25071589c7ea0a992bd6 /radeon
parent2f9aea0661550a43c3d2ac33a5bc286870edd34e (diff)
parent35affe89d5f617a972b1cfee00c51cbe9e7c64a2 (diff)
downloadexternal-libdrm-84f838d71a75125b14d361f0ed7d23a0ac521edf.tar.gz
external-libdrm-84f838d71a75125b14d361f0ed7d23a0ac521edf.tar.xz
external-libdrm-84f838d71a75125b14d361f0ed7d23a0ac521edf.zip
Merge remote-tracking branch 'freedesktop/master' into aosp/master
This merges the freedesktop/master branch into aosp/master Change-Id: I3104d45924f67d37808154d04c15518394204478 Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'radeon')
-rw-r--r--radeon/meson.build64
-rwxr-xr-xradeon/radeon-symbol-check2
-rw-r--r--radeon/radeon_bo.c3
-rw-r--r--radeon/radeon_bo_gem.c3
-rw-r--r--radeon/radeon_cs.c3
-rw-r--r--radeon/radeon_cs_gem.c3
-rw-r--r--radeon/radeon_cs_space.c3
-rw-r--r--radeon/radeon_surface.c4
8 files changed, 66 insertions, 19 deletions
diff --git a/radeon/meson.build b/radeon/meson.build
new file mode 100644
index 00000000..b08c7442
--- /dev/null
+++ b/radeon/meson.build
@@ -0,0 +1,64 @@
1# Copyright © 2017-2018 Intel Corporation
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21
22libdrm_radeon = shared_library(
23 'drm_radeon',
24 [
25 files(
26 'radeon_bo_gem.c', 'radeon_cs_gem.c', 'radeon_cs_space.c', 'radeon_bo.c',
27 'radeon_cs.c', 'radeon_surface.c',
28 ),
29 config_file,
30 ],
31 c_args : warn_c_args,
32 include_directories : [inc_root, inc_drm],
33 link_with : libdrm,
34 dependencies : [dep_pthread_stubs, dep_atomic_ops],
35 version : '1.0.1',
36 install : true,
37)
38
39ext_libdrm_radeon = declare_dependency(
40 link_with : [libdrm, libdrm_radeon],
41 include_directories : [inc_drm, include_directories('.')],
42)
43
44install_headers(
45 'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
46 'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
47 subdir : 'libdrm'
48)
49
50pkg.generate(
51 name : 'libdrm_radeon',
52 libraries : libdrm_radeon,
53 subdirs : ['.', 'libdrm'],
54 version : meson.project_version(),
55 requires_private : 'libdrm',
56 description : 'Userspace interface to kernel DRM services for radeon',
57)
58
59test(
60 'radeon-symbol-check',
61 prog_bash,
62 env : env_test,
63 args : [files('radeon-symbol-check'), libdrm_radeon]
64)
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
index 0bf2ffcb..7d79d901 100755
--- a/radeon/radeon-symbol-check
+++ b/radeon/radeon-symbol-check
@@ -3,7 +3,7 @@
3# The following symbols (past the first five) are taken from the public headers. 3# The following symbols (past the first five) are taken from the public headers.
4# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES 4# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
5 5
6FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do 6FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
7( grep -q "^$func$" || echo $func ) <<EOF 7( grep -q "^$func$" || echo $func ) <<EOF
8__bss_start 8__bss_start
9_edata 9_edata
diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c
index 447f9280..821807bc 100644
--- a/radeon/radeon_bo.c
+++ b/radeon/radeon_bo.c
@@ -29,9 +29,6 @@
29 * Dave Airlie 29 * Dave Airlie
30 * Jérôme Glisse <glisse@freedesktop.org> 30 * Jérôme Glisse <glisse@freedesktop.org>
31 */ 31 */
32#ifdef HAVE_CONFIG_H
33#include <config.h>
34#endif
35#include <libdrm_macros.h> 32#include <libdrm_macros.h>
36#include <radeon_bo.h> 33#include <radeon_bo.h>
37#include <radeon_bo_int.h> 34#include <radeon_bo_int.h>
diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c
index fbd453d9..774b26e4 100644
--- a/radeon/radeon_bo_gem.c
+++ b/radeon/radeon_bo_gem.c
@@ -29,9 +29,6 @@
29 * Dave Airlie 29 * Dave Airlie
30 * Jérôme Glisse <glisse@freedesktop.org> 30 * Jérôme Glisse <glisse@freedesktop.org>
31 */ 31 */
32#ifdef HAVE_CONFIG_H
33#include <config.h>
34#endif
35#include <stdio.h> 32#include <stdio.h>
36#include <stdint.h> 33#include <stdint.h>
37#include <stdlib.h> 34#include <stdlib.h>
diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c
index dffb869f..eb7859e5 100644
--- a/radeon/radeon_cs.c
+++ b/radeon/radeon_cs.c
@@ -1,6 +1,3 @@
1#ifdef HAVE_CONFIG_H
2#include <config.h>
3#endif
4#include "libdrm_macros.h" 1#include "libdrm_macros.h"
5#include <stdio.h> 2#include <stdio.h>
6#include "radeon_cs.h" 3#include "radeon_cs.h"
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index f3dccb6c..4d5fc13a 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -29,9 +29,6 @@
29 * Nicolai Haehnle <prefect_@gmx.net> 29 * Nicolai Haehnle <prefect_@gmx.net>
30 * Jérôme Glisse <glisse@freedesktop.org> 30 * Jérôme Glisse <glisse@freedesktop.org>
31 */ 31 */
32#ifdef HAVE_CONFIG_H
33#include "config.h"
34#endif
35#include <assert.h> 32#include <assert.h>
36#include <errno.h> 33#include <errno.h>
37#include <stdlib.h> 34#include <stdlib.h>
diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c
index 69287be5..8531c345 100644
--- a/radeon/radeon_cs_space.c
+++ b/radeon/radeon_cs_space.c
@@ -25,9 +25,6 @@
25 */ 25 */
26/* 26/*
27 */ 27 */
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31#include <assert.h> 28#include <assert.h>
32#include <errno.h> 29#include <errno.h>
33#include <stdlib.h> 30#include <stdlib.h>
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 965be24c..3cafcfcb 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -26,9 +26,6 @@
26 * Authors: 26 * Authors:
27 * Jérôme Glisse <jglisse@redhat.com> 27 * Jérôme Glisse <jglisse@redhat.com>
28 */ 28 */
29#ifdef HAVE_CONFIG_H
30#include <config.h>
31#endif
32#include <stdbool.h> 29#include <stdbool.h>
33#include <assert.h> 30#include <assert.h>
34#include <errno.h> 31#include <errno.h>
@@ -2503,6 +2500,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man,
2503 if (surf->npix_y > 1) { 2500 if (surf->npix_y > 1) {
2504 return -EINVAL; 2501 return -EINVAL;
2505 } 2502 }
2503 /* fallthrough */
2506 case RADEON_SURF_TYPE_2D: 2504 case RADEON_SURF_TYPE_2D:
2507 if (surf->npix_z > 1) { 2505 if (surf->npix_z > 1) {
2508 return -EINVAL; 2506 return -EINVAL;