All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro
@ 2015-04-01 16:15 Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
                   ` (24 more replies)
  0 siblings, 25 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Hi all,

As mentioned by Alan, some compilers do not like it when the symbol 
declaration and definition differ wrt their visibility attribute.

Afaict there are three ways to handle this;
 - Add the drm_public macro into the public headers, and annotate the 
declarations.
 - Use version script to limit the exported symbols.
 - Remove the drm_public macro/VISIBILITY_CFLAGS and annotate the 
private symbols.

From the above three I believe that 3) is the better one as:
 - it does not add drm_public to the library API,
 - does not rely on features that some platform may be missing (or 
require singling out every platform in the configure.ac script).

So I've went ahead with 3), added a few tests and wired them to
`make check' so that one can easily catch problems.

I have checked that the libraries do not export any new symbols and the 
scripts work as intended nearly a dozen times :-)

The whole series can be found in branch reannotate-symbols at
https://github.com/evelikov/libdrm

Cheers,
Emil


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-08  0:18   ` Alan Coopersmith
  2015-04-01 16:15 ` [PATCH libdrm 02/24] radeon: remove empty function declarations Emil Velikov
                   ` (23 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Alan Coopersmith, Thierry Reding, emil.l.velikov

The former does not imply the latter and vice-versa. One such example is
the Sun compiler.

v2: Add missing closing brakets. (Alan)

Cc: Alan Coopersmith <alan.coopersmith@oracle.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 configure.ac | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 155d577..76cf91e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,12 +415,17 @@ if test "x$GCC" = xyes; then
 
     # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
     CFLAGS=$save_CFLAGS
+    AC_SUBST([VISIBILITY_CFLAGS])
+fi
 
-    if test "x$VISIBILITY_CFLAGS" != x; then
-        AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler has -fvisibility support])
-    fi
+AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([
+    int foo_default( void ) __attribute__((visibility("default")));
+    int foo_hidden( void ) __attribute__((visibility("hidden")));
+])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]));
 
-    AC_SUBST([VISIBILITY_CFLAGS])
+if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then
+    AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))])
 fi
 
 AC_SUBST(WARN_CFLAGS)
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 17:30   ` Jerome Glisse
  2015-04-01 16:15 ` [PATCH libdrm 03/24] radeon: remove unused functions Emil Velikov
                   ` (22 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov

Missing definition and unused since their introduction.

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/radeon/bof.h b/radeon/bof.h
index 014affb..cb829a1 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -51,10 +51,6 @@ typedef struct bof {
 	long		offset;
 } bof_t;
 
-extern int bof_file_flush(bof_t *root);
-extern bof_t *bof_file_new(const char *filename);
-extern int bof_object_dump(bof_t *object, const char *filename);
-
 /* object */
 extern bof_t *bof_object(void);
 extern bof_t *bof_object_get(bof_t *object, const char *keyname);
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 03/24] radeon: remove unused functions
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 02/24] radeon: remove empty function declarations Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 17:31   ` Jerome Glisse
  2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
                   ` (21 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov

Namely bof_load_file, bof_print, bof_object_get. Unused since their
introduction according to git log.

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.c | 53 -----------------------------------------------------
 radeon/bof.h |  3 ---
 2 files changed, 56 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 0598cc6..6f3760a 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -61,18 +61,6 @@ bof_t *bof_object(void)
 	return object;
 }
 
-bof_t *bof_object_get(bof_t *object, const char *keyname)
-{
-	unsigned i;
-
-	for (i = 0; i < object->array_size; i += 2) {
-		if (!strcmp(object->array[i]->value, keyname)) {
-			return object->array[i + 1];
-		}
-	}
-	return NULL;
-}
-
 int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
 {
 	bof_t *key;
@@ -271,11 +259,6 @@ static void bof_print_rec(bof_t *bof, int level, int entry)
 	}
 }
 
-void bof_print(bof_t *bof)
-{
-	bof_print_rec(bof, 0, 0);
-}
-
 static int bof_read(bof_t *root, FILE *file, long end, int level)
 {
 	bof_t *bof = NULL;
@@ -333,42 +316,6 @@ out_err:
 	return -EINVAL;
 }
 
-bof_t *bof_load_file(const char *filename)
-{
-	bof_t *root = bof_object();
-	int r;
-
-	if (root == NULL) {
-		fprintf(stderr, "%s failed to create root object\n", __func__);
-		return NULL;
-	}
-	root->file = fopen(filename, "r");
-	if (root->file == NULL)
-		goto out_err;
-	r = fseek(root->file, 0L, SEEK_SET);
-	if (r) {
-		fprintf(stderr, "%s failed to seek into file %s\n", __func__, filename);
-		goto out_err;
-	}
-	root->offset = ftell(root->file);
-	r = fread(&root->type, 4, 1, root->file);
-	if (r != 1)
-		goto out_err;
-	r = fread(&root->size, 4, 1, root->file);
-	if (r != 1)
-		goto out_err;
-	r = fread(&root->array_size, 4, 1, root->file);
-	if (r != 1)
-		goto out_err;
-	r = bof_read(root, root->file, root->offset + root->size, 2);
-	if (r)
-		goto out_err;
-	return root;
-out_err:
-	bof_decref(root);
-	return NULL;
-}
-
 void bof_incref(bof_t *bof)
 {
 	bof->refcount++;
diff --git a/radeon/bof.h b/radeon/bof.h
index cb829a1..8e952c1 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -53,7 +53,6 @@ typedef struct bof {
 
 /* object */
 extern bof_t *bof_object(void);
-extern bof_t *bof_object_get(bof_t *object, const char *keyname);
 extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
 /* array */
 extern bof_t *bof_array(void);
@@ -72,9 +71,7 @@ extern int32_t bof_int32_value(bof_t *bof);
 /* common functions */
 extern void bof_decref(bof_t *bof);
 extern void bof_incref(bof_t *bof);
-extern bof_t *bof_load_file(const char *filename);
 extern int bof_dump_file(bof_t *bof, const char *filename);
-extern void bof_print(bof_t *bof);
 
 static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
 static inline int bof_is_blob(bof_t *bof){return (bof->type == BOF_TYPE_BLOB);}
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (2 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 03/24] radeon: remove unused functions Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 17:31   ` Jerome Glisse
  2015-04-01 17:32   ` Jerome Glisse
  2015-04-01 16:15 ` [PATCH libdrm 05/24] radeon: remove more unused functions Emil Velikov
                   ` (20 subsequent siblings)
  24 siblings, 2 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov

Used locally in bof.c.

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.c | 96 ++++++++++++++++++++++++++++++------------------------------
 radeon/bof.h |  3 --
 2 files changed, 48 insertions(+), 51 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 6f3760a..20901a0 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -45,6 +45,54 @@ static int bof_entry_grow(bof_t *bof)
 	return 0;
 }
 
+static void bof_incref(bof_t *bof)
+{
+	bof->refcount++;
+}
+
+void bof_decref(bof_t *bof)
+{
+	unsigned i;
+
+	if (bof == NULL)
+		return;
+	if (--bof->refcount > 0)
+		return;
+	for (i = 0; i < bof->array_size; i++) {
+		bof_decref(bof->array[i]);
+		bof->array[i] = NULL;
+	}
+	bof->array_size = 0;
+	if (bof->file) {
+		fclose(bof->file);
+		bof->file = NULL;
+	}
+	free(bof->array);
+	free(bof->value);
+	free(bof);
+}
+
+/*
+ * string
+ */
+static bof_t *bof_string(const char *value)
+{
+	bof_t *string = bof_object();
+
+	if (string == NULL)
+		return NULL;
+	string->type = BOF_TYPE_STRING;
+	string->size = strlen(value) + 1;
+	string->value = calloc(1, string->size);
+	if (string->value == NULL) {
+		bof_decref(string);
+		return NULL;
+	}
+	strcpy(string->value, value);
+	string->size += 12;
+	return string;
+}
+
 /*
  * object 
  */
@@ -160,27 +208,6 @@ void *bof_blob_value(bof_t *bof)
 }
 
 /*
- * string
- */
-bof_t *bof_string(const char *value)
-{
-	bof_t *string = bof_object();
-
-	if (string == NULL)
-		return NULL;
-	string->type = BOF_TYPE_STRING;
-	string->size = strlen(value) + 1;
-	string->value = calloc(1, string->size);
-	if (string->value == NULL) {
-		bof_decref(string);
-		return NULL;
-	}
-	strcpy(string->value, value);
-	string->size += 12;
-	return string;
-}
-
-/*
  *  int32
  */
 bof_t *bof_int32(int32_t value)
@@ -316,33 +343,6 @@ out_err:
 	return -EINVAL;
 }
 
-void bof_incref(bof_t *bof)
-{
-	bof->refcount++;
-}
-
-void bof_decref(bof_t *bof)
-{
-	unsigned i;
-
-	if (bof == NULL)
-		return;
-	if (--bof->refcount > 0)
-		return;
-	for (i = 0; i < bof->array_size; i++) {
-		bof_decref(bof->array[i]);
-		bof->array[i] = NULL;
-	}
-	bof->array_size = 0;
-	if (bof->file) {
-		fclose(bof->file);
-		bof->file = NULL;
-	}
-	free(bof->array);
-	free(bof->value);
-	free(bof);
-}
-
 static int bof_file_write(bof_t *bof, FILE *file)
 {
 	unsigned i;
diff --git a/radeon/bof.h b/radeon/bof.h
index 8e952c1..4dae923 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -63,14 +63,11 @@ extern unsigned bof_array_size(bof_t *bof);
 extern bof_t *bof_blob(unsigned size, void *value);
 extern unsigned bof_blob_size(bof_t *bof);
 extern void *bof_blob_value(bof_t *bof);
-/* string */
-extern bof_t *bof_string(const char *value);
 /* int32 */
 extern bof_t *bof_int32(int32_t value);
 extern int32_t bof_int32_value(bof_t *bof);
 /* common functions */
 extern void bof_decref(bof_t *bof);
-extern void bof_incref(bof_t *bof);
 extern int bof_dump_file(bof_t *bof, const char *filename);
 
 static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 05/24] radeon: remove more unused functions
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (3 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 17:32   ` Jerome Glisse
  2015-04-01 16:15 ` [PATCH libdrm 06/24] radeon: remove no-longer used static functions Emil Velikov
                   ` (19 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov

bof_array_{get,size} and bof_blob_{size,value}. All of which unused
since their introduction with commit 78de69713d7(drm/radeon: add new cs
command stream dumping facilities)

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.c | 28 ----------------------------
 radeon/bof.h |  4 ----
 2 files changed, 32 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 20901a0..9c7997f 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -158,20 +158,6 @@ int bof_array_append(bof_t *array, bof_t *value)
 	return 0;
 }
 
-bof_t *bof_array_get(bof_t *bof, unsigned i)
-{
-	if (!bof_is_array(bof) || i >= bof->array_size)
-		return NULL;
-	return bof->array[i];
-}
-
-unsigned bof_array_size(bof_t *bof)
-{
-	if (!bof_is_array(bof))
-		return 0;
-	return bof->array_size;
-}
-
 /*
  * blob
  */
@@ -193,20 +179,6 @@ bof_t *bof_blob(unsigned size, void *value)
 	return blob;
 }
 
-unsigned bof_blob_size(bof_t *bof)
-{
-	if (!bof_is_blob(bof))
-		return 0;
-	return bof->size - 12;
-}
-
-void *bof_blob_value(bof_t *bof)
-{
-	if (!bof_is_blob(bof))
-		return NULL;
-	return bof->value;
-}
-
 /*
  *  int32
  */
diff --git a/radeon/bof.h b/radeon/bof.h
index 4dae923..8108dd5 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -57,12 +57,8 @@ extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
 /* array */
 extern bof_t *bof_array(void);
 extern int bof_array_append(bof_t *array, bof_t *value);
-extern bof_t *bof_array_get(bof_t *bof, unsigned i);
-extern unsigned bof_array_size(bof_t *bof);
 /* blob */
 extern bof_t *bof_blob(unsigned size, void *value);
-extern unsigned bof_blob_size(bof_t *bof);
-extern void *bof_blob_value(bof_t *bof);
 /* int32 */
 extern bof_t *bof_int32(int32_t value);
 extern int32_t bof_int32_value(bof_t *bof);
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 06/24] radeon: remove no-longer used static functions
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (4 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 05/24] radeon: remove more unused functions Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 07/24] radeon: annotate the private symbols Emil Velikov
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

The users of bof_print_rec and bof_read(bof_print and bof_load_file
respectively) were removed with earlier commit. With the former two
gone, two more functions become unused - bof_print_bof and bof_indent.
Remove those as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.c | 110 -----------------------------------------------------------
 1 file changed, 110 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 9c7997f..92f4b91 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -205,116 +205,6 @@ int32_t bof_int32_value(bof_t *bof)
 	return *((uint32_t*)bof->value);
 }
 
-/*
- *  common
- */
-static void bof_indent(int level)
-{
-	int i;
-
-	for (i = 0; i < level; i++)
-		fprintf(stderr, " ");
-}
-
-static void bof_print_bof(bof_t *bof, int level, int entry)
-{
-	bof_indent(level);
-	if (bof == NULL) {
-		fprintf(stderr, "--NULL-- for entry %d\n", entry);
-		return;
-	}
-	switch (bof->type) {
-	case BOF_TYPE_STRING:
-		fprintf(stderr, "%p string [%s %d]\n", bof, (char*)bof->value, bof->size);
-		break;
-	case BOF_TYPE_INT32:
-		fprintf(stderr, "%p int32 [%d %d]\n", bof, *(int*)bof->value, bof->size);
-		break;
-	case BOF_TYPE_BLOB:
-		fprintf(stderr, "%p blob [%d]\n", bof, bof->size);
-		break;
-	case BOF_TYPE_NULL:
-		fprintf(stderr, "%p null [%d]\n", bof, bof->size);
-		break;
-	case BOF_TYPE_OBJECT:
-		fprintf(stderr, "%p object [%d %d]\n", bof, bof->array_size / 2, bof->size);
-		break;
-	case BOF_TYPE_ARRAY:
-		fprintf(stderr, "%p array [%d %d]\n", bof, bof->array_size, bof->size);
-		break;
-	default:
-		fprintf(stderr, "%p unknown [%d]\n", bof, bof->type);
-		return;
-	}
-}
-
-static void bof_print_rec(bof_t *bof, int level, int entry)
-{
-	unsigned i;
-
-	bof_print_bof(bof, level, entry);
-	for (i = 0; i < bof->array_size; i++) {
-		bof_print_rec(bof->array[i], level + 2, i);
-	}
-}
-
-static int bof_read(bof_t *root, FILE *file, long end, int level)
-{
-	bof_t *bof = NULL;
-	int r;
-
-	if (ftell(file) >= end) {
-		return 0;
-	}
-	r = bof_entry_grow(root);
-	if (r)
-		return r;
-	bof = bof_object();
-	if (bof == NULL)
-		return -ENOMEM;
-	bof->offset = ftell(file);
-	r = fread(&bof->type, 4, 1, file);
-	if (r != 1)
-		goto out_err;
-	r = fread(&bof->size, 4, 1, file);
-	if (r != 1)
-		goto out_err;
-	r = fread(&bof->array_size, 4, 1, file);
-	if (r != 1)
-		goto out_err;
-	switch (bof->type) {
-	case BOF_TYPE_STRING:
-	case BOF_TYPE_INT32:
-	case BOF_TYPE_BLOB:
-		bof->value = calloc(1, bof->size - 12);
-		if (bof->value == NULL) {
-			goto out_err;
-		}
-		r = fread(bof->value, bof->size - 12, 1, file);
-		if (r != 1) {
-			fprintf(stderr, "error reading %d\n", bof->size - 12);
-			goto out_err;
-		}
-		break;
-	case BOF_TYPE_NULL:
-		return 0;
-	case BOF_TYPE_OBJECT:
-	case BOF_TYPE_ARRAY:
-		r = bof_read(bof, file, bof->offset + bof->size, level + 2);
-		if (r)
-			goto out_err;
-		break;
-	default:
-		fprintf(stderr, "invalid type %d\n", bof->type);
-		goto out_err;
-	}
-	root->array[root->centry++] = bof;
-	return bof_read(root, file, end, level);
-out_err:
-	bof_decref(bof);
-	return -EINVAL;
-}
-
 static int bof_file_write(bof_t *bof, FILE *file)
 {
 	unsigned i;
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 07/24] radeon: annotate the private symbols
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (5 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 06/24] radeon: remove no-longer used static functions Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-02  2:48   ` Michel Dänzer
  2015-04-01 16:15 ` [PATCH libdrm 08/24] radeon: add symbols test Emil Velikov
                   ` (17 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Michel Dänzer, emil.l.velikov

They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/bof.c | 22 +++++++++++++---------
 radeon/bof.h | 23 ++++++++++++++---------
 2 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 92f4b91..2b29b89 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -23,6 +23,10 @@
  * Authors:
  *      Jerome Glisse
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
@@ -50,7 +54,7 @@ static void bof_incref(bof_t *bof)
 	bof->refcount++;
 }
 
-void bof_decref(bof_t *bof)
+drm_private void bof_decref(bof_t *bof)
 {
 	unsigned i;
 
@@ -96,7 +100,7 @@ static bof_t *bof_string(const char *value)
 /*
  * object 
  */
-bof_t *bof_object(void)
+drm_private bof_t *bof_object(void)
 {
 	bof_t *object;
 
@@ -109,7 +113,7 @@ bof_t *bof_object(void)
 	return object;
 }
 
-int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
+drm_private int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
 {
 	bof_t *key;
 	int r;
@@ -133,7 +137,7 @@ int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
 /*
  * array
  */
-bof_t *bof_array(void)
+drm_private bof_t *bof_array(void)
 {
 	bof_t *array = bof_object();
 
@@ -144,7 +148,7 @@ bof_t *bof_array(void)
 	return array;
 }
 
-int bof_array_append(bof_t *array, bof_t *value)
+drm_private int bof_array_append(bof_t *array, bof_t *value)
 {
 	int r;
 	if (array->type != BOF_TYPE_ARRAY)
@@ -161,7 +165,7 @@ int bof_array_append(bof_t *array, bof_t *value)
 /*
  * blob
  */
-bof_t *bof_blob(unsigned size, void *value)
+drm_private bof_t *bof_blob(unsigned size, void *value)
 {
 	bof_t *blob = bof_object();
 
@@ -182,7 +186,7 @@ bof_t *bof_blob(unsigned size, void *value)
 /*
  *  int32
  */
-bof_t *bof_int32(int32_t value)
+drm_private bof_t *bof_int32(int32_t value)
 {
 	bof_t *int32 = bof_object();
 
@@ -200,7 +204,7 @@ bof_t *bof_int32(int32_t value)
 	return int32;
 }
 
-int32_t bof_int32_value(bof_t *bof)
+drm_private int32_t bof_int32_value(bof_t *bof)
 {
 	return *((uint32_t*)bof->value);
 }
@@ -245,7 +249,7 @@ static int bof_file_write(bof_t *bof, FILE *file)
 	return 0;
 }
 
-int bof_dump_file(bof_t *bof, const char *filename)
+drm_private int bof_dump_file(bof_t *bof, const char *filename)
 {
 	unsigned i;
 	int r = 0;
diff --git a/radeon/bof.h b/radeon/bof.h
index 8108dd5..b7632b4 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -26,8 +26,13 @@
 #ifndef BOF_H
 #define BOF_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdint.h>
+#include "libdrm.h"
 
 #define BOF_TYPE_STRING		0
 #define BOF_TYPE_NULL		1
@@ -52,19 +57,19 @@ typedef struct bof {
 } bof_t;
 
 /* object */
-extern bof_t *bof_object(void);
-extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
+drm_private extern bof_t *bof_object(void);
+drm_private extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
 /* array */
-extern bof_t *bof_array(void);
-extern int bof_array_append(bof_t *array, bof_t *value);
+drm_private extern bof_t *bof_array(void);
+drm_private extern int bof_array_append(bof_t *array, bof_t *value);
 /* blob */
-extern bof_t *bof_blob(unsigned size, void *value);
+drm_private extern bof_t *bof_blob(unsigned size, void *value);
 /* int32 */
-extern bof_t *bof_int32(int32_t value);
-extern int32_t bof_int32_value(bof_t *bof);
+drm_private extern bof_t *bof_int32(int32_t value);
+drm_private extern int32_t bof_int32_value(bof_t *bof);
 /* common functions */
-extern void bof_decref(bof_t *bof);
-extern int bof_dump_file(bof_t *bof, const char *filename);
+drm_private extern void bof_decref(bof_t *bof);
+drm_private extern int bof_dump_file(bof_t *bof, const char *filename);
 
 static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
 static inline int bof_is_blob(bof_t *bof){return (bof->type == BOF_TYPE_BLOB);}
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 08/24] radeon: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (6 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 07/24] radeon: annotate the private symbols Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 09/24] freedreno: annotate the private symbols Emil Velikov
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Will allow us to catch when the library exports more symbols than
the ones in the public headers.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 radeon/Makefile.am         |  3 ++-
 radeon/radeon-symbol-check | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100755 radeon/radeon-symbol-check

diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 5cca394..54abd9e 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -44,4 +44,5 @@ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_radeon.pc
 
-EXTRA_DIST = Android.mk
+TESTS = radeon-symbol-check
+EXTRA_DIST = Android.mk $(TESTS)
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
new file mode 100755
index 0000000..0bf2ffc
--- /dev/null
+++ b/radeon/radeon-symbol-check
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+radeon_bo_debug
+radeon_bo_get_handle
+radeon_bo_get_src_domain
+radeon_bo_get_tiling
+radeon_bo_is_busy
+radeon_bo_is_referenced_by_cs
+radeon_bo_is_static
+radeon_bo_manager_gem_ctor
+radeon_bo_manager_gem_dtor
+radeon_bo_map
+radeon_bo_open
+radeon_bo_ref
+radeon_bo_set_tiling
+radeon_bo_unmap
+radeon_bo_unref
+radeon_bo_wait
+radeon_cs_begin
+radeon_cs_create
+radeon_cs_destroy
+radeon_cs_emit
+radeon_cs_end
+radeon_cs_erase
+radeon_cs_get_id
+radeon_cs_manager_gem_ctor
+radeon_cs_manager_gem_dtor
+radeon_cs_need_flush
+radeon_cs_print
+radeon_cs_set_limit
+radeon_cs_space_add_persistent_bo
+radeon_cs_space_check
+radeon_cs_space_check_with_bo
+radeon_cs_space_reset_bos
+radeon_cs_space_set_flush
+radeon_cs_write_reloc
+radeon_gem_bo_open_prime
+radeon_gem_get_kernel_name
+radeon_gem_get_reloc_in_cs
+radeon_gem_name_bo
+radeon_gem_prime_share_bo
+radeon_gem_set_domain
+radeon_surface_best
+radeon_surface_init
+radeon_surface_manager_free
+radeon_surface_manager_new
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 09/24] freedreno: annotate the private symbols
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (7 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 08/24] radeon: add symbols test Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 10/24] freedreno: add symbols test Emil Velikov
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 freedreno/freedreno_bo.c         |  2 +-
 freedreno/freedreno_device.c     |  2 +-
 freedreno/freedreno_priv.h       |  4 ++--
 freedreno/kgsl/kgsl_bo.c         | 11 ++++++-----
 freedreno/kgsl/kgsl_device.c     |  2 +-
 freedreno/kgsl/kgsl_pipe.c       | 18 +++++++++++-------
 freedreno/kgsl/kgsl_priv.h       | 33 +++++++++++++++++++--------------
 freedreno/kgsl/kgsl_ringbuffer.c |  2 +-
 freedreno/msm/msm_bo.c           |  4 ++--
 freedreno/msm/msm_device.c       |  2 +-
 freedreno/msm/msm_pipe.c         |  3 ++-
 freedreno/msm/msm_priv.h         | 11 ++++++-----
 freedreno/msm/msm_ringbuffer.c   |  2 +-
 13 files changed, 54 insertions(+), 42 deletions(-)

diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 9089c93..c56fdbd 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -81,7 +81,7 @@ static struct fd_bo * bo_from_handle(struct fd_device *dev,
 }
 
 /* Frees older cached buffers.  Called under table_lock */
-void fd_cleanup_bo_cache(struct fd_device *dev, time_t time)
+drm_private void fd_cleanup_bo_cache(struct fd_device *dev, time_t time)
 {
 	int i;
 
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index e8b5f60..09b2302 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -145,7 +145,7 @@ static void fd_device_del_impl(struct fd_device *dev)
 	dev->funcs->destroy(dev);
 }
 
-void fd_device_del_locked(struct fd_device *dev)
+drm_private void fd_device_del_locked(struct fd_device *dev)
 {
 	if (!atomic_dec_and_test(&dev->refcnt))
 		return;
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 8e072d9..2d0fa6d 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -92,10 +92,10 @@ struct fd_device {
 	int closefd;        /* call close(fd) upon destruction */
 };
 
-void fd_cleanup_bo_cache(struct fd_device *dev, time_t time);
+drm_private void fd_cleanup_bo_cache(struct fd_device *dev, time_t time);
 
 /* for where @table_lock is already held: */
-void fd_device_del_locked(struct fd_device *dev);
+drm_private void fd_device_del_locked(struct fd_device *dev);
 
 struct fd_pipe_funcs {
 	struct fd_ringbuffer * (*ringbuffer_new)(struct fd_pipe *pipe, uint32_t size);
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index fab3350..f151186 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -131,7 +131,7 @@ static struct fd_bo_funcs funcs = {
 };
 
 /* allocate a buffer handle: */
-int kgsl_bo_new_handle(struct fd_device *dev,
+drm_private int kgsl_bo_new_handle(struct fd_device *dev,
 		uint32_t size, uint32_t flags, uint32_t *handle)
 {
 	struct drm_kgsl_gem_create req = {
@@ -155,7 +155,7 @@ int kgsl_bo_new_handle(struct fd_device *dev,
 }
 
 /* allocate a new buffer object */
-struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
+drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
 		uint32_t size, uint32_t handle)
 {
 	struct kgsl_bo *kgsl_bo;
@@ -218,7 +218,7 @@ fail:
 	return NULL;
 }
 
-uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset)
+drm_private uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset)
 {
 	struct fd_bo *bo = &kgsl_bo->base;
 	if (!kgsl_bo->gpuaddr) {
@@ -267,7 +267,8 @@ uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset)
  * _emit_reloc()..
  */
 
-void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo, uint32_t timestamp)
+drm_private void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo,
+		uint32_t timestamp)
 {
 	struct fd_bo *bo = &kgsl_bo->base;
 	if (bo->name) {
@@ -285,7 +286,7 @@ void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo, uint32_t timestamp)
 	}
 }
 
-uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *kgsl_bo)
+drm_private uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *kgsl_bo)
 {
 	struct fd_bo *bo = &kgsl_bo->base;
 	uint32_t timestamp = 0;
diff --git a/freedreno/kgsl/kgsl_device.c b/freedreno/kgsl/kgsl_device.c
index 5f2dfea..8352d60 100644
--- a/freedreno/kgsl/kgsl_device.c
+++ b/freedreno/kgsl/kgsl_device.c
@@ -49,7 +49,7 @@ static struct fd_device_funcs funcs = {
 		.destroy = kgsl_device_destroy,
 };
 
-struct fd_device * kgsl_device_new(int fd)
+drm_private struct fd_device * kgsl_device_new(int fd)
 {
 	struct kgsl_device *kgsl_dev;
 	struct fd_device *dev;
diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c
index 1a795ba..fc76b2b 100644
--- a/freedreno/kgsl/kgsl_pipe.c
+++ b/freedreno/kgsl/kgsl_pipe.c
@@ -75,7 +75,8 @@ static int kgsl_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
 	return ret;
 }
 
-int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, uint32_t *timestamp)
+drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe,
+		uint32_t *timestamp)
 {
 	struct kgsl_cmdstream_readtimestamp req = {
 			.type = KGSL_TIMESTAMP_RETIRED
@@ -113,13 +114,13 @@ static struct fd_pipe_funcs funcs = {
 		.destroy = kgsl_pipe_destroy,
 };
 
-int is_kgsl_pipe(struct fd_pipe *pipe)
+drm_private int is_kgsl_pipe(struct fd_pipe *pipe)
 {
 	return pipe->funcs == &funcs;
 }
 
 /* add buffer to submit list when it is referenced in cmdstream: */
-void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe,
+drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe,
 		struct kgsl_bo *kgsl_bo)
 {
 	struct fd_pipe *pipe = &kgsl_pipe->base;
@@ -134,7 +135,7 @@ void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe,
 }
 
 /* prepare buffers on submit list before flush: */
-void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe)
+drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe)
 {
 	struct fd_pipe *pipe = &kgsl_pipe->base;
 	struct kgsl_bo *kgsl_bo = NULL;
@@ -150,7 +151,8 @@ void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe)
 }
 
 /* process buffers on submit list after flush: */
-void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp)
+drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe,
+		uint32_t timestamp)
 {
 	struct fd_pipe *pipe = &kgsl_pipe->base;
 	struct kgsl_bo *kgsl_bo = NULL, *tmp;
@@ -168,7 +170,8 @@ void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp)
 		kgsl_pipe_process_pending(kgsl_pipe, timestamp);
 }
 
-void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp)
+drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe,
+		uint32_t timestamp)
 {
 	struct fd_pipe *pipe = &kgsl_pipe->base;
 	struct kgsl_bo *kgsl_bo = NULL, *tmp;
@@ -201,7 +204,8 @@ static int getprop(int fd, enum kgsl_property_type type,
 	} } while (0)
 
 
-struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
+drm_private struct fd_pipe * kgsl_pipe_new(struct fd_device *dev,
+		enum fd_pipe_id id)
 {
 	static const char *paths[] = {
 			[FD_PIPE_3D] = "/dev/kgsl-3d0",
diff --git a/freedreno/kgsl/kgsl_priv.h b/freedreno/kgsl/kgsl_priv.h
index 56dc21a..6ab6496 100644
--- a/freedreno/kgsl/kgsl_priv.h
+++ b/freedreno/kgsl/kgsl_priv.h
@@ -73,7 +73,7 @@ static inline struct kgsl_pipe * to_kgsl_pipe(struct fd_pipe *x)
 	return (struct kgsl_pipe *)x;
 }
 
-int is_kgsl_pipe(struct fd_pipe *pipe);
+drm_private int is_kgsl_pipe(struct fd_pipe *pipe);
 
 struct kgsl_bo {
 	struct fd_bo base;
@@ -91,25 +91,30 @@ static inline struct kgsl_bo * to_kgsl_bo(struct fd_bo *x)
 }
 
 
-struct fd_device * kgsl_device_new(int fd);
+drm_private struct fd_device * kgsl_device_new(int fd);
 
-int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, uint32_t *timestamp);
-void kgsl_pipe_add_submit(struct kgsl_pipe *pipe, struct kgsl_bo *bo);
-void kgsl_pipe_pre_submit(struct kgsl_pipe *pipe);
-void kgsl_pipe_post_submit(struct kgsl_pipe *pipe, uint32_t timestamp);
-void kgsl_pipe_process_pending(struct kgsl_pipe *pipe, uint32_t timestamp);
-struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, enum fd_pipe_id id);
+drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe,
+		uint32_t *timestamp);
+drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *pipe,
+		struct kgsl_bo *bo);
+drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *pipe);
+drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *pipe,
+		uint32_t timestamp);
+drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *pipe,
+		uint32_t timestamp);
+drm_private struct fd_pipe * kgsl_pipe_new(struct fd_device *dev,
+		enum fd_pipe_id id);
 
-struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe,
+drm_private struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe,
 		uint32_t size);
 
-int kgsl_bo_new_handle(struct fd_device *dev,
+drm_private int kgsl_bo_new_handle(struct fd_device *dev,
 		uint32_t size, uint32_t flags, uint32_t *handle);
-struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
+drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
 		uint32_t size, uint32_t handle);
 
-uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *bo, uint32_t offset);
-void kgsl_bo_set_timestamp(struct kgsl_bo *bo, uint32_t timestamp);
-uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *bo);
+drm_private uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *bo, uint32_t offset);
+drm_private void kgsl_bo_set_timestamp(struct kgsl_bo *bo, uint32_t timestamp);
+drm_private uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *bo);
 
 #endif /* KGSL_PRIV_H_ */
diff --git a/freedreno/kgsl/kgsl_ringbuffer.c b/freedreno/kgsl/kgsl_ringbuffer.c
index d1e8321..f013307 100644
--- a/freedreno/kgsl/kgsl_ringbuffer.c
+++ b/freedreno/kgsl/kgsl_ringbuffer.c
@@ -199,7 +199,7 @@ static struct fd_ringbuffer_funcs funcs = {
 		.destroy = kgsl_ringbuffer_destroy,
 };
 
-struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe,
+drm_private struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe,
 		uint32_t size)
 {
 	struct kgsl_ringbuffer *kgsl_ring;
diff --git a/freedreno/msm/msm_bo.c b/freedreno/msm/msm_bo.c
index 0cac1c6..fbd82df 100644
--- a/freedreno/msm/msm_bo.c
+++ b/freedreno/msm/msm_bo.c
@@ -104,7 +104,7 @@ static struct fd_bo_funcs funcs = {
 };
 
 /* allocate a buffer handle: */
-int msm_bo_new_handle(struct fd_device *dev,
+drm_private int msm_bo_new_handle(struct fd_device *dev,
 		uint32_t size, uint32_t flags, uint32_t *handle)
 {
 	struct drm_msm_gem_new req = {
@@ -124,7 +124,7 @@ int msm_bo_new_handle(struct fd_device *dev,
 }
 
 /* allocate a new buffer object */
-struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
+drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
 		uint32_t size, uint32_t handle)
 {
 	struct msm_bo *msm_bo;
diff --git a/freedreno/msm/msm_device.c b/freedreno/msm/msm_device.c
index b9c5a3e..81077e1 100644
--- a/freedreno/msm/msm_device.c
+++ b/freedreno/msm/msm_device.c
@@ -49,7 +49,7 @@ static struct fd_device_funcs funcs = {
 		.destroy = msm_device_destroy,
 };
 
-struct fd_device * msm_device_new(int fd)
+drm_private struct fd_device * msm_device_new(int fd)
 {
 	struct msm_device *msm_dev;
 	struct fd_device *dev;
diff --git a/freedreno/msm/msm_pipe.c b/freedreno/msm/msm_pipe.c
index 6955f2c..ddc975e 100644
--- a/freedreno/msm/msm_pipe.c
+++ b/freedreno/msm/msm_pipe.c
@@ -103,7 +103,8 @@ static uint64_t get_param(struct fd_device *dev, uint32_t pipe, uint32_t param)
 	return req.value;
 }
 
-struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
+drm_private struct fd_pipe * msm_pipe_new(struct fd_device *dev,
+		enum fd_pipe_id id)
 {
 	static const uint32_t pipe_id[] = {
 			[FD_PIPE_3D] = MSM_PIPE_3D0,
diff --git a/freedreno/msm/msm_priv.h b/freedreno/msm/msm_priv.h
index 75ae883..94d2357 100644
--- a/freedreno/msm/msm_priv.h
+++ b/freedreno/msm/msm_priv.h
@@ -46,7 +46,7 @@ static inline struct msm_device * to_msm_device(struct fd_device *x)
 	return (struct msm_device *)x;
 }
 
-struct fd_device * msm_device_new(int fd);
+drm_private struct fd_device * msm_device_new(int fd);
 
 struct msm_pipe {
 	struct fd_pipe base;
@@ -61,9 +61,10 @@ static inline struct msm_pipe * to_msm_pipe(struct fd_pipe *x)
 	return (struct msm_pipe *)x;
 }
 
-struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id);
+drm_private struct fd_pipe * msm_pipe_new(struct fd_device *dev,
+		enum fd_pipe_id id);
 
-struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
+drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
 		uint32_t size);
 
 struct msm_bo {
@@ -79,9 +80,9 @@ static inline struct msm_bo * to_msm_bo(struct fd_bo *x)
 	return (struct msm_bo *)x;
 }
 
-int msm_bo_new_handle(struct fd_device *dev,
+drm_private int msm_bo_new_handle(struct fd_device *dev,
 		uint32_t size, uint32_t flags, uint32_t *handle);
-struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
+drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
 		uint32_t size, uint32_t handle);
 
 static inline void get_abs_timeout(struct drm_msm_timespec *tv, uint32_t ms)
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index 6a4043f..6ee85bd 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -318,7 +318,7 @@ static struct fd_ringbuffer_funcs funcs = {
 		.destroy = msm_ringbuffer_destroy,
 };
 
-struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
+drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
 		uint32_t size)
 {
 	struct msm_ringbuffer *msm_ring;
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 10/24] freedreno: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (8 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 09/24] freedreno: annotate the private symbols Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds Emil Velikov
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 freedreno/Makefile.am            |  3 ++-
 freedreno/freedreno-symbol-check | 52 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100755 freedreno/freedreno-symbol-check

diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index 407ab70..27e6aa6 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -24,4 +24,5 @@ libdrm_freedrenocommoninclude_HEADERS = $(LIBDRM_FREEDRENO_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_freedreno.pc
 
-EXTRA_DIST = Android.mk
+TESTS = freedreno-symbol-check
+EXTRA_DIST = Android.mk $(TESTS)
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
new file mode 100755
index 0000000..7115448
--- /dev/null
+++ b/freedreno/freedreno-symbol-check
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+fd_bo_cpu_fini
+fd_bo_cpu_prep
+fd_bo_del
+fd_bo_dmabuf
+fd_bo_from_dmabuf
+fd_bo_from_fbdev
+fd_bo_from_handle
+fd_bo_from_name
+fd_bo_get_name
+fd_bo_handle
+fd_bo_map
+fd_bo_new
+fd_bo_ref
+fd_bo_size
+fd_device_del
+fd_device_new
+fd_device_new_dup
+fd_device_ref
+fd_pipe_del
+fd_pipe_get_param
+fd_pipe_new
+fd_pipe_wait
+fd_ringbuffer_del
+fd_ringbuffer_emit_reloc_ring
+fd_ringbuffer_flush
+fd_ringbuffer_new
+fd_ringbuffer_reloc
+fd_ringbuffer_reset
+fd_ringbuffer_set_parent
+fd_ringbuffer_timestamp
+fd_ringmarker_del
+fd_ringmarker_dwords
+fd_ringmarker_flush
+fd_ringmarker_mark
+fd_ringmarker_new
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (9 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 10/24] freedreno: add symbols test Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-09 14:56   ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 12/24] intel: remove unused mmFindBlock Emil Velikov
                   ` (13 subsequent siblings)
  24 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Added with commit 57b4c4c32d3(Move the renaming of mm.c symbols to
symbol duplication/collision with ones that are available elsewhere.

As the public/private symbols of libdrm are properly annotated neither
one of the symbols will end up in the global name-space, thus should no
longer be required.

Eric,
Does this sound correct, or there is something more subtle in there ?

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/mm.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/intel/mm.h b/intel/mm.h
index 8a5235b..a6ee102 100644
--- a/intel/mm.h
+++ b/intel/mm.h
@@ -38,16 +38,6 @@ struct mem_block {
 	unsigned int reserved:1;
 };
 
-/* Rename the variables in the drm copy of this code so that it doesn't
- * conflict with mesa or whoever else has copied it around.
- */
-#define mmInit drm_mmInit
-#define mmAllocMem drm_mmAllocMem
-#define mmFreeMem drm_mmFreeMem
-#define mmFindBlock drm_mmFindBlock
-#define mmDestroy drm_mmDestroy
-#define mmDumpMemInfo drm_mmDumpMemInfo
-
 /** 
  * input: total size in bytes
  * return: a heap pointer if OK, NULL if error
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 12/24] intel: remove unused mmFindBlock
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (10 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 13/24] intel: annotate the private symbols Emil Velikov
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

The function was never part of the public API and a release or so back
was hidden from the global name-space (list of exported symbols).

According to git log this function was never used internally.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/mm.c | 12 ------------
 intel/mm.h |  7 -------
 2 files changed, 19 deletions(-)

diff --git a/intel/mm.c b/intel/mm.c
index 1069745..10b74bf 100644
--- a/intel/mm.c
+++ b/intel/mm.c
@@ -191,18 +191,6 @@ struct mem_block *mmAllocMem(struct mem_block *heap, int size, int align2,
 	return p;
 }
 
-struct mem_block *mmFindBlock(struct mem_block *heap, int start)
-{
-	struct mem_block *p;
-
-	for (p = heap->next; p != heap; p = p->next) {
-		if (p->ofs == start)
-			return p;
-	}
-
-	return NULL;
-}
-
 static int Join2Blocks(struct mem_block *p)
 {
 	/* XXX there should be some assertions here */
diff --git a/intel/mm.h b/intel/mm.h
index a6ee102..c7dd8b0 100644
--- a/intel/mm.h
+++ b/intel/mm.h
@@ -65,13 +65,6 @@ extern struct mem_block *mmAllocMem(struct mem_block *heap, int size,
 extern int mmFreeMem(struct mem_block *b);
 
 /**
- * Free block starts at offset
- * input: pointer to a heap, start offset
- * return: pointer to a block
- */
-extern struct mem_block *mmFindBlock(struct mem_block *heap, int start);
-
-/**
  * destroy MM
  */
 extern void mmDestroy(struct mem_block *mmInit);
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 13/24] intel: annotate the private symbols
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (11 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 12/24] intel: remove unused mmFindBlock Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 14/24] intel: add symbols test Emil Velikov
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, emil.l.velikov

They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/mm.c | 17 +++++++++++------
 intel/mm.h | 19 +++++++++++++------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/intel/mm.c b/intel/mm.c
index 10b74bf..9c67660 100644
--- a/intel/mm.c
+++ b/intel/mm.c
@@ -22,13 +22,18 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <assert.h>
 
 #include "xf86drm.h"
+#include "libdrm.h"
 #include "mm.h"
 
-void mmDumpMemInfo(const struct mem_block *heap)
+drm_private void mmDumpMemInfo(const struct mem_block *heap)
 {
 	drmMsg("Memory heap %p:\n", (void *)heap);
 	if (heap == 0) {
@@ -54,7 +59,7 @@ void mmDumpMemInfo(const struct mem_block *heap)
 	drmMsg("End of memory blocks\n");
 }
 
-struct mem_block *mmInit(int ofs, int size)
+drm_private struct mem_block *mmInit(int ofs, int size)
 {
 	struct mem_block *heap, *block;
 
@@ -159,8 +164,8 @@ static struct mem_block *SliceBlock(struct mem_block *p,
 	return p;
 }
 
-struct mem_block *mmAllocMem(struct mem_block *heap, int size, int align2,
-			     int startSearch)
+drm_private struct mem_block *mmAllocMem(struct mem_block *heap, int size,
+					 int align2, int startSearch)
 {
 	struct mem_block *p;
 	const int mask = (1 << align2) - 1;
@@ -215,7 +220,7 @@ static int Join2Blocks(struct mem_block *p)
 	return 0;
 }
 
-int mmFreeMem(struct mem_block *b)
+drm_private int mmFreeMem(struct mem_block *b)
 {
 	if (!b)
 		return 0;
@@ -242,7 +247,7 @@ int mmFreeMem(struct mem_block *b)
 	return 0;
 }
 
-void mmDestroy(struct mem_block *heap)
+drm_private void mmDestroy(struct mem_block *heap)
 {
 	struct mem_block *p;
 
diff --git a/intel/mm.h b/intel/mm.h
index c7dd8b0..01813a5 100644
--- a/intel/mm.h
+++ b/intel/mm.h
@@ -29,6 +29,12 @@
 #ifndef MM_H
 #define MM_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "libdrm.h"
+
 struct mem_block {
 	struct mem_block *next, *prev;
 	struct mem_block *next_free, *prev_free;
@@ -42,7 +48,7 @@ struct mem_block {
  * input: total size in bytes
  * return: a heap pointer if OK, NULL if error
  */
-extern struct mem_block *mmInit(int ofs, int size);
+drm_private extern struct mem_block *mmInit(int ofs, int size);
 
 /**
  * Allocate 'size' bytes with 2^align2 bytes alignment,
@@ -54,24 +60,25 @@ extern struct mem_block *mmInit(int ofs, int size);
  *		startSearch = linear offset from start of heap to begin search
  * return: pointer to the allocated block, 0 if error
  */
-extern struct mem_block *mmAllocMem(struct mem_block *heap, int size,
-				    int align2, int startSearch);
+drm_private extern struct mem_block *mmAllocMem(struct mem_block *heap,
+						int size, int align2,
+						int startSearch);
 
 /**
  * Free block starts at offset
  * input: pointer to a block
  * return: 0 if OK, -1 if error
  */
-extern int mmFreeMem(struct mem_block *b);
+drm_private extern int mmFreeMem(struct mem_block *b);
 
 /**
  * destroy MM
  */
-extern void mmDestroy(struct mem_block *mmInit);
+drm_private extern void mmDestroy(struct mem_block *mmInit);
 
 /**
  * For debuging purpose.
  */
-extern void mmDumpMemInfo(const struct mem_block *mmInit);
+drm_private extern void mmDumpMemInfo(const struct mem_block *mmInit);
 
 #endif
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 14/24] intel: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (12 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 13/24] intel: annotate the private symbols Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 15/24] nouveau: annotate the private symbols Emil Velikov
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/Makefile.am        |  6 ++--
 intel/intel-symbol-check | 88 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+), 2 deletions(-)
 create mode 100755 intel/intel-symbol-check

diff --git a/intel/Makefile.am b/intel/Makefile.am
index 22a45f0..09bfbae 100644
--- a/intel/Makefile.am
+++ b/intel/Makefile.am
@@ -60,7 +60,8 @@ BATCHES = \
 	tests/gen7-3d.batch
 
 TESTS = \
-	$(BATCHES:.batch=.batch.sh)
+	$(BATCHES:.batch=.batch.sh) \
+	intel-symbol-check
 
 EXTRA_DIST = \
 	$(BATCHES) \
@@ -68,7 +69,8 @@ EXTRA_DIST = \
 	$(BATCHES:.batch=.batch-ref.txt) \
 	$(BATCHES:.batch=.batch-ref.txt) \
 	tests/test-batch.sh \
-	Android.mk
+	Android.mk \
+	$(TESTS)
 
 test_decode_LDADD = libdrm_intel.la ../libdrm.la
 
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
new file mode 100755
index 0000000..c555e6d
--- /dev/null
+++ b/intel/intel-symbol-check
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBDRM_INTEL_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+drm_intel_bo_alloc
+drm_intel_bo_alloc_for_render
+drm_intel_bo_alloc_tiled
+drm_intel_bo_alloc_userptr
+drm_intel_bo_busy
+drm_intel_bo_disable_reuse
+drm_intel_bo_emit_reloc
+drm_intel_bo_emit_reloc_fence
+drm_intel_bo_exec
+drm_intel_bo_fake_alloc_static
+drm_intel_bo_fake_disable_backing_store
+drm_intel_bo_flink
+drm_intel_bo_gem_create_from_name
+drm_intel_bo_gem_create_from_prime
+drm_intel_bo_gem_export_to_prime
+drm_intel_bo_get_subdata
+drm_intel_bo_get_tiling
+drm_intel_bo_is_reusable
+drm_intel_bo_madvise
+drm_intel_bo_map
+drm_intel_bo_mrb_exec
+drm_intel_bo_pin
+drm_intel_bo_reference
+drm_intel_bo_references
+drm_intel_bo_set_tiling
+drm_intel_bo_subdata
+drm_intel_bo_unmap
+drm_intel_bo_unpin
+drm_intel_bo_unreference
+drm_intel_bo_wait_rendering
+drm_intel_bufmgr_check_aperture_space
+drm_intel_bufmgr_destroy
+drm_intel_bufmgr_fake_contended_lock_take
+drm_intel_bufmgr_fake_evict_all
+drm_intel_bufmgr_fake_init
+drm_intel_bufmgr_fake_set_exec_callback
+drm_intel_bufmgr_fake_set_fence_callback
+drm_intel_bufmgr_fake_set_last_dispatch
+drm_intel_bufmgr_gem_enable_fenced_relocs
+drm_intel_bufmgr_gem_enable_reuse
+drm_intel_bufmgr_gem_get_devid
+drm_intel_bufmgr_gem_init
+drm_intel_bufmgr_gem_set_aub_annotations
+drm_intel_bufmgr_gem_set_aub_dump
+drm_intel_bufmgr_gem_set_aub_filename
+drm_intel_bufmgr_gem_set_vma_cache_size
+drm_intel_bufmgr_set_debug
+drm_intel_decode
+drm_intel_decode_context_alloc
+drm_intel_decode_context_free
+drm_intel_decode_set_batch_pointer
+drm_intel_decode_set_dump_past_end
+drm_intel_decode_set_head_tail
+drm_intel_decode_set_output_file
+drm_intel_gem_bo_aub_dump_bmp
+drm_intel_gem_bo_clear_relocs
+drm_intel_gem_bo_context_exec
+drm_intel_gem_bo_get_reloc_count
+drm_intel_gem_bo_map_gtt
+drm_intel_gem_bo_map_unsynchronized
+drm_intel_gem_bo_start_gtt_access
+drm_intel_gem_bo_unmap_gtt
+drm_intel_gem_bo_wait
+drm_intel_gem_context_create
+drm_intel_gem_context_destroy
+drm_intel_get_aperture_sizes
+drm_intel_get_eu_total
+drm_intel_get_pipe_from_crtc_id
+drm_intel_get_reset_stats
+drm_intel_get_subslice_total
+drm_intel_reg_read
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 15/24] nouveau: annotate the private symbols
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (13 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 14/24] intel: add symbols test Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 16/24] nouveau: add symbols test Emil Velikov
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov, Ben Skeggs

They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 nouveau/abi16.c   | 14 +++++++-------
 nouveau/nouveau.c |  2 +-
 nouveau/private.h | 18 +++++++++---------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index ae13821..538f3a7 100644
--- a/nouveau/abi16.c
+++ b/nouveau/abi16.c
@@ -33,7 +33,7 @@
 #include "private.h"
 
 
-int
+drm_private int
 abi16_chan_nv04(struct nouveau_object *obj)
 {
 	struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
@@ -54,7 +54,7 @@ abi16_chan_nv04(struct nouveau_object *obj)
 	return 0;
 }
 
-int
+drm_private int
 abi16_chan_nvc0(struct nouveau_object *obj)
 {
 	struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
@@ -75,7 +75,7 @@ abi16_chan_nvc0(struct nouveau_object *obj)
 	return 0;
 }
 
-int
+drm_private int
 abi16_chan_nve0(struct nouveau_object *obj)
 {
 	struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
@@ -101,7 +101,7 @@ abi16_chan_nve0(struct nouveau_object *obj)
 	return 0;
 }
 
-int
+drm_private int
 abi16_engobj(struct nouveau_object *obj)
 {
 	struct drm_nouveau_grobj_alloc req = {
@@ -120,7 +120,7 @@ abi16_engobj(struct nouveau_object *obj)
 	return 0;
 }
 
-int
+drm_private int
 abi16_ntfy(struct nouveau_object *obj)
 {
 	struct nv04_notify *ntfy = obj->data;
@@ -141,7 +141,7 @@ abi16_ntfy(struct nouveau_object *obj)
 	return 0;
 }
 
-void
+drm_private void
 abi16_bo_info(struct nouveau_bo *bo, struct drm_nouveau_gem_info *info)
 {
 	struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
@@ -175,7 +175,7 @@ abi16_bo_info(struct nouveau_bo *bo, struct drm_nouveau_gem_info *info)
 	}
 }
 
-int
+drm_private int
 abi16_bo_init(struct nouveau_bo *bo, uint32_t alignment,
 	      union nouveau_bo_config *config)
 {
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 2d95b74..5c8a0ec 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -45,7 +45,7 @@
 #include "private.h"
 
 #ifdef DEBUG
-uint32_t nouveau_debug = 0;
+drm_private uint32_t nouveau_debug = 0;
 
 static void
 debug_init(char *args)
diff --git a/nouveau/private.h b/nouveau/private.h
index bf9db04..74d604e 100644
--- a/nouveau/private.h
+++ b/nouveau/private.h
@@ -10,7 +10,7 @@
 #include "nouveau.h"
 
 #ifdef DEBUG
-uint32_t nouveau_debug;
+drm_private uint32_t nouveau_debug;
 #define dbg_on(lvl) (nouveau_debug & (1 << lvl))
 #define dbg(lvl, fmt, args...) do {                                            \
 	if (dbg_on((lvl)))                                                     \
@@ -114,13 +114,13 @@ int
 nouveau_device_open_existing(struct nouveau_device **, int, int, drm_context_t);
 
 /* abi16.c */
-int  abi16_chan_nv04(struct nouveau_object *);
-int  abi16_chan_nvc0(struct nouveau_object *);
-int  abi16_chan_nve0(struct nouveau_object *);
-int  abi16_engobj(struct nouveau_object *);
-int  abi16_ntfy(struct nouveau_object *);
-void abi16_bo_info(struct nouveau_bo *, struct drm_nouveau_gem_info *);
-int  abi16_bo_init(struct nouveau_bo *, uint32_t alignment,
-		   union nouveau_bo_config *);
+drm_private int  abi16_chan_nv04(struct nouveau_object *);
+drm_private int  abi16_chan_nvc0(struct nouveau_object *);
+drm_private int  abi16_chan_nve0(struct nouveau_object *);
+drm_private int  abi16_engobj(struct nouveau_object *);
+drm_private int  abi16_ntfy(struct nouveau_object *);
+drm_private void abi16_bo_info(struct nouveau_bo *, struct drm_nouveau_gem_info *);
+drm_private int  abi16_bo_init(struct nouveau_bo *, uint32_t alignment,
+			       union nouveau_bo_config *);
 
 #endif
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 16/24] nouveau: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (14 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 15/24] nouveau: annotate the private symbols Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 17/24] libkms: annotate private symbols Emil Velikov
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 nouveau/Makefile.am          |  3 ++-
 nouveau/nouveau-symbol-check | 52 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100755 nouveau/nouveau-symbol-check

diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
index 1ca235d..2f61351 100644
--- a/nouveau/Makefile.am
+++ b/nouveau/Makefile.am
@@ -21,4 +21,5 @@ libdrm_nouveauinclude_HEADERS = $(LIBDRM_NOUVEAU_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_nouveau.pc
 
-EXTRA_DIST = Android.mk
+TESTS = nouveau-symbol-check
+EXTRA_DIST = Android.mk $(TESTS)
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
new file mode 100755
index 0000000..0fef563
--- /dev/null
+++ b/nouveau/nouveau-symbol-check
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBDRM_NOUVEAU_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+nouveau_bo_map
+nouveau_bo_name_get
+nouveau_bo_name_ref
+nouveau_bo_new
+nouveau_bo_prime_handle_ref
+nouveau_bo_ref
+nouveau_bo_set_prime
+nouveau_bo_wait
+nouveau_bo_wrap
+nouveau_bufctx_del
+nouveau_bufctx_mthd
+nouveau_bufctx_new
+nouveau_bufctx_refn
+nouveau_bufctx_reset
+nouveau_client_del
+nouveau_client_new
+nouveau_device_del
+nouveau_device_open
+nouveau_device_open_existing
+nouveau_device_wrap
+nouveau_getparam
+nouveau_object_del
+nouveau_object_find
+nouveau_object_new
+nouveau_pushbuf_bufctx
+nouveau_pushbuf_data
+nouveau_pushbuf_del
+nouveau_pushbuf_kick
+nouveau_pushbuf_new
+nouveau_pushbuf_refd
+nouveau_pushbuf_refn
+nouveau_pushbuf_reloc
+nouveau_pushbuf_space
+nouveau_pushbuf_validate
+nouveau_setparam
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 17/24] libkms: annotate private symbols
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (15 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 16/24] nouveau: add symbols test Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 18/24] libkms: add symbols test Emil Velikov
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 libkms/api.c      |  3 +++
 libkms/dumb.c     |  2 +-
 libkms/exynos.c   |  2 +-
 libkms/intel.c    |  2 +-
 libkms/internal.h | 19 ++++++++++++-------
 libkms/linux.c    |  4 ++--
 libkms/nouveau.c  |  2 +-
 libkms/radeon.c   |  2 +-
 libkms/vmwgfx.c   |  2 +-
 9 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/libkms/api.c b/libkms/api.c
index b512c42..a07a242 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -29,9 +29,12 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "libdrm.h"
 #include "internal.h"
 
 int kms_create(int fd, struct kms_driver **out)
diff --git a/libkms/dumb.c b/libkms/dumb.c
index f9c16e1..e252d8c 100644
--- a/libkms/dumb.c
+++ b/libkms/dumb.c
@@ -190,7 +190,7 @@ dumb_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 dumb_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/exynos.c b/libkms/exynos.c
index 1123482..db65f81 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -185,7 +185,7 @@ exynos_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 exynos_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/intel.c b/libkms/intel.c
index 51a7fd2..a539df2 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -216,7 +216,7 @@ intel_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 intel_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/internal.h b/libkms/internal.h
index f831b57..e7d5c46 100644
--- a/libkms/internal.h
+++ b/libkms/internal.h
@@ -29,6 +29,11 @@
 #ifndef INTERNAL_H_
 #define INTERNAL_H_
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "libdrm.h"
 #include "libkms.h"
 
 struct kms_driver
@@ -62,18 +67,18 @@ struct kms_bo
 	unsigned handle;
 };
 
-int linux_create(int fd, struct kms_driver **out);
+drm_private int linux_create(int fd, struct kms_driver **out);
 
-int vmwgfx_create(int fd, struct kms_driver **out);
+drm_private int vmwgfx_create(int fd, struct kms_driver **out);
 
-int intel_create(int fd, struct kms_driver **out);
+drm_private int intel_create(int fd, struct kms_driver **out);
 
-int dumb_create(int fd, struct kms_driver **out);
+drm_private int dumb_create(int fd, struct kms_driver **out);
 
-int nouveau_create(int fd, struct kms_driver **out);
+drm_private int nouveau_create(int fd, struct kms_driver **out);
 
-int radeon_create(int fd, struct kms_driver **out);
+drm_private int radeon_create(int fd, struct kms_driver **out);
 
-int exynos_create(int fd, struct kms_driver **out);
+drm_private int exynos_create(int fd, struct kms_driver **out);
 
 #endif
diff --git a/libkms/linux.c b/libkms/linux.c
index 77a0bbe..06dbc42 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -39,9 +39,9 @@
 #include <xf86drm.h>
 #include <string.h>
 #include <unistd.h>
-
 #include <sys/stat.h>
 
+#include "libdrm.h"
 #include "internal.h"
 
 #define PATH_SIZE 512
@@ -225,7 +225,7 @@ linux_from_udev(int fd, struct kms_driver **out)
 }
 #endif
 
-int
+drm_private int
 linux_create(int fd, struct kms_driver **out)
 {
 	if (!dumb_create(fd, out))
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 228903f..7f57f21 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -198,7 +198,7 @@ nouveau_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 nouveau_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/radeon.c b/libkms/radeon.c
index 9383a0a..f0d5db6 100644
--- a/libkms/radeon.c
+++ b/libkms/radeon.c
@@ -219,7 +219,7 @@ radeon_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 radeon_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index bc04133..3c99ea3 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -185,7 +185,7 @@ vmwgfx_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 vmwgfx_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 18/24] libkms: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (16 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 17/24] libkms: annotate private symbols Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 19/24] exynos: " Emil Velikov
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 libkms/Makefile.am      |  3 ++-
 libkms/kms-symbol-check | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100755 libkms/kms-symbol-check

diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 4baf4fc..6c0ab7a 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -43,4 +43,5 @@ libkmsinclude_HEADERS = $(LIBKMS_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libkms.pc
 
-EXTRA_DIST = Android.mk
+TESTS = kms-symbol-check
+EXTRA_DIST = Android.mk $(TESTS)
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
new file mode 100755
index 0000000..658b269
--- /dev/null
+++ b/libkms/kms-symbol-check
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+kms_bo_create
+kms_bo_destroy
+kms_bo_get_prop
+kms_bo_map
+kms_bo_unmap
+kms_create
+kms_destroy
+kms_get_prop
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 19/24] exynos: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (17 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 18/24] libkms: add symbols test Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 20/24] omap: " Emil Velikov
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 exynos/Makefile.am         |  3 +++
 exynos/exynos-symbol-check | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100755 exynos/exynos-symbol-check

diff --git a/exynos/Makefile.am b/exynos/Makefile.am
index a9da0ff..0136a61 100644
--- a/exynos/Makefile.am
+++ b/exynos/Makefile.am
@@ -23,3 +23,6 @@ libdrm_exynosinclude_HEADERS = exynos_drmif.h
 
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_exynos.pc
+
+TESTS = exynos-symbol-check
+EXTRA_DIST = $(TESTS)
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
new file mode 100755
index 0000000..1a1be89
--- /dev/null
+++ b/exynos/exynos-symbol-check
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.am/libdrm_exynos*_HEADERS
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+exynos_bo_create
+exynos_bo_destroy
+exynos_bo_from_name
+exynos_bo_get_info
+exynos_bo_get_name
+exynos_bo_handle
+exynos_bo_map
+exynos_device_create
+exynos_device_destroy
+exynos_prime_fd_to_handle
+exynos_prime_handle_to_fd
+exynos_vidi_connection
+g2d_blend
+g2d_copy
+g2d_copy_with_scale
+g2d_exec
+g2d_fini
+g2d_init
+g2d_scale_and_blend
+g2d_solid_fill
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 20/24] omap: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (18 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 19/24] exynos: " Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 21/24] tegra: " Emil Velikov
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 omap/Makefile.am       |  3 +++
 omap/omap-symbol-check | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100755 omap/omap-symbol-check

diff --git a/omap/Makefile.am b/omap/Makefile.am
index d6f5298..b34fba6 100644
--- a/omap/Makefile.am
+++ b/omap/Makefile.am
@@ -20,3 +20,6 @@ libdrm_omapinclude_HEADERS = omap_drmif.h
 
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_omap.pc
+
+TESTS = omap-symbol-check
+EXTRA_DIST = $(TESTS)
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
new file mode 100755
index 0000000..759c84b
--- /dev/null
+++ b/omap/omap-symbol-check
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+omap_bo_cpu_fini
+omap_bo_cpu_prep
+omap_bo_del
+omap_bo_dmabuf
+omap_bo_from_dmabuf
+omap_bo_from_name
+omap_bo_get_name
+omap_bo_handle
+omap_bo_map
+omap_bo_new
+omap_bo_new_tiled
+omap_bo_ref
+omap_bo_size
+omap_device_del
+omap_device_new
+omap_device_ref
+omap_get_param
+omap_set_param
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 21/24] tegra: add symbols test
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (19 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 20/24] omap: " Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h Emil Velikov
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 tegra/Makefile.am        |  3 +++
 tegra/tegra-symbol-check | 30 ++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100755 tegra/tegra-symbol-check

diff --git a/tegra/Makefile.am b/tegra/Makefile.am
index a647487..efa14f9 100644
--- a/tegra/Makefile.am
+++ b/tegra/Makefile.am
@@ -21,3 +21,6 @@ libdrm_tegrainclude_HEADERS = tegra.h
 
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_tegra.pc
+
+TESTS = tegra-symbol-check
+EXTRA_DIST = $(TESTS)
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
new file mode 100755
index 0000000..4020831
--- /dev/null
+++ b/tegra/tegra-symbol-check
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+drm_tegra_bo_get_flags
+drm_tegra_bo_get_handle
+drm_tegra_bo_get_tiling
+drm_tegra_bo_map
+drm_tegra_bo_new
+drm_tegra_bo_ref
+drm_tegra_bo_set_flags
+drm_tegra_bo_set_tiling
+drm_tegra_bo_unmap
+drm_tegra_bo_unref
+drm_tegra_bo_wrap
+drm_tegra_close
+drm_tegra_new
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (20 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 21/24] tegra: " Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 23/24] drm: remove no longer needed VISIBILITY_CFLAGS Emil Velikov
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Provide a more meaningful name, considering what it does.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 Makefile.sources           |  2 +-
 exynos/exynos_drm.c        |  2 +-
 exynos/exynos_fimg2d.c     |  2 +-
 freedreno/freedreno_priv.h |  2 +-
 intel/intel_bufmgr.c       |  2 +-
 intel/intel_bufmgr_fake.c  |  2 +-
 intel/intel_bufmgr_gem.c   |  2 +-
 intel/intel_decode.c       |  2 +-
 intel/mm.c                 |  2 +-
 intel/mm.h                 |  2 +-
 intel/test_decode.c        |  2 +-
 libdrm.h                   | 89 ----------------------------------------------
 libdrm_macros.h            | 89 ++++++++++++++++++++++++++++++++++++++++++++++
 libkms/api.c               |  2 +-
 libkms/dumb.c              |  2 +-
 libkms/exynos.c            |  2 +-
 libkms/intel.c             |  2 +-
 libkms/internal.h          |  2 +-
 libkms/linux.c             |  2 +-
 libkms/nouveau.c           |  2 +-
 libkms/radeon.c            |  2 +-
 libkms/vmwgfx.c            |  2 +-
 nouveau/nouveau.c          |  2 +-
 nouveau/private.h          |  2 +-
 omap/omap_drm.c            |  2 +-
 radeon/bof.h               |  2 +-
 radeon/radeon_bo.c         |  2 +-
 radeon/radeon_bo_gem.c     |  2 +-
 radeon/radeon_cs.c         |  2 +-
 radeon/radeon_cs_gem.c     |  2 +-
 radeon/radeon_cs_space.c   |  2 +-
 radeon/radeon_surface.c    |  6 ++--
 tegra/private.h            |  2 +-
 tests/modetest/buffers.c   |  2 +-
 xf86drm.c                  |  2 +-
 35 files changed, 124 insertions(+), 124 deletions(-)
 delete mode 100644 libdrm.h
 create mode 100644 libdrm_macros.h

diff --git a/Makefile.sources b/Makefile.sources
index 566f7b5..8747ccd 100644
--- a/Makefile.sources
+++ b/Makefile.sources
@@ -5,7 +5,7 @@ LIBDRM_FILES := \
 	xf86drmSL.c \
 	xf86drmMode.c \
 	xf86atomic.h \
-	libdrm.h \
+	libdrm_macros.h \
 	libdrm_lists.h
 
 LIBDRM_H_FILES := \
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index c5dd948..5d07ea7 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -38,7 +38,7 @@
 
 #include <xf86drm.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "exynos_drm.h"
 #include "exynos_drmif.h"
 
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index fc605ed..cb422e8 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -24,7 +24,7 @@
 
 #include <xf86drm.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "exynos_drm.h"
 #include "fimg2d_reg.h"
 #include "exynos_fimg2d.h"
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 2d0fa6d..3c194fb 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -44,7 +44,7 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 #include "xf86atomic.h"
 
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index 234cd13..a95771d 100644
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
@@ -37,7 +37,7 @@
 #include <drm.h>
 #include <i915_drm.h>
 #include <pciaccess.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "intel_bufmgr.h"
 #include "intel_bufmgr_priv.h"
 #include "xf86drm.h"
diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index c4828fa..d0c2d74 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -49,7 +49,7 @@
 #include "drm.h"
 #include "i915_drm.h"
 #include "mm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "libdrm_lists.h"
 
 /* Support gcc's __FUNCTION__ for people using other compilers */
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 5a67f53..201da08 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -56,7 +56,7 @@
 #ifndef ETIME
 #define ETIME ETIMEDOUT
 #endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "libdrm_lists.h"
 #include "intel_bufmgr.h"
 #include "intel_bufmgr_priv.h"
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 7d5cbe5..8759760 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -33,7 +33,7 @@
 #include <stdarg.h>
 #include <string.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 #include "intel_chipset.h"
 #include "intel_bufmgr.h"
diff --git a/intel/mm.c b/intel/mm.c
index 9c67660..954e9dc 100644
--- a/intel/mm.c
+++ b/intel/mm.c
@@ -30,7 +30,7 @@
 #include <assert.h>
 
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "mm.h"
 
 drm_private void mmDumpMemInfo(const struct mem_block *heap)
diff --git a/intel/mm.h b/intel/mm.h
index 01813a5..8d83743 100644
--- a/intel/mm.h
+++ b/intel/mm.h
@@ -33,7 +33,7 @@
 #include "config.h"
 #endif
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 struct mem_block {
 	struct mem_block *next, *prev;
diff --git a/intel/test_decode.c b/intel/test_decode.c
index 93f47ef..bef86bb 100644
--- a/intel/test_decode.c
+++ b/intel/test_decode.c
@@ -34,7 +34,7 @@
 #include <sys/stat.h>
 #include <err.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "intel_bufmgr.h"
 #include "intel_chipset.h"
 
diff --git a/libdrm.h b/libdrm.h
deleted file mode 100644
index 6c3cd59..0000000
--- a/libdrm.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright © 2014 NVIDIA Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef LIBDRM_LIBDRM_H
-#define LIBDRM_LIBDRM_H
-
-#if defined(HAVE_VISIBILITY)
-#  define drm_private __attribute__((visibility("hidden")))
-#  define drm_public __attribute__((visibility("default")))
-#else
-#  define drm_private
-#  define drm_public
-#endif
-
-
-/**
- * Static (compile-time) assertion.
- * Basically, use COND to dimension an array.  If COND is false/zero the
- * array size will be -1 and we'll get a compilation error.
- */
-#define STATIC_ASSERT(COND) \
-   do { \
-      (void) sizeof(char [1 - 2*!(COND)]); \
-   } while (0)
-
-
-#include <sys/mman.h>
-
-#if defined(ANDROID) && !defined(__LP64__)
-#include <errno.h> /* for EINVAL */
-
-extern void *__mmap2(void *, size_t, int, int, int, size_t);
-
-static inline void *drm_mmap(void *addr, size_t length, int prot, int flags,
-                             int fd, loff_t offset)
-{
-   /* offset must be aligned to 4096 (not necessarily the page size) */
-   if (offset & 4095) {
-      errno = EINVAL;
-      return MAP_FAILED;
-   }
-
-   return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
-}
-
-#  define drm_munmap(addr, length) \
-              munmap(addr, length)
-
-
-#else
-
-/* assume large file support exists */
-#  define drm_mmap(addr, length, prot, flags, fd, offset) \
-              mmap(addr, length, prot, flags, fd, offset)
-
-
-static inline int drm_munmap(void *addr, size_t length)
-{
-   /* Copied from configure code generated by AC_SYS_LARGEFILE */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
-                     (((off_t) 1 << 31) << 31))
-   STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
-                 LARGE_OFF_T % 2147483647 == 1);
-#undef LARGE_OFF_T
-
-   return munmap(addr, length);
-}
-#endif
-
-#endif
diff --git a/libdrm_macros.h b/libdrm_macros.h
new file mode 100644
index 0000000..6c3cd59
--- /dev/null
+++ b/libdrm_macros.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright © 2014 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef LIBDRM_LIBDRM_H
+#define LIBDRM_LIBDRM_H
+
+#if defined(HAVE_VISIBILITY)
+#  define drm_private __attribute__((visibility("hidden")))
+#  define drm_public __attribute__((visibility("default")))
+#else
+#  define drm_private
+#  define drm_public
+#endif
+
+
+/**
+ * Static (compile-time) assertion.
+ * Basically, use COND to dimension an array.  If COND is false/zero the
+ * array size will be -1 and we'll get a compilation error.
+ */
+#define STATIC_ASSERT(COND) \
+   do { \
+      (void) sizeof(char [1 - 2*!(COND)]); \
+   } while (0)
+
+
+#include <sys/mman.h>
+
+#if defined(ANDROID) && !defined(__LP64__)
+#include <errno.h> /* for EINVAL */
+
+extern void *__mmap2(void *, size_t, int, int, int, size_t);
+
+static inline void *drm_mmap(void *addr, size_t length, int prot, int flags,
+                             int fd, loff_t offset)
+{
+   /* offset must be aligned to 4096 (not necessarily the page size) */
+   if (offset & 4095) {
+      errno = EINVAL;
+      return MAP_FAILED;
+   }
+
+   return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
+}
+
+#  define drm_munmap(addr, length) \
+              munmap(addr, length)
+
+
+#else
+
+/* assume large file support exists */
+#  define drm_mmap(addr, length, prot, flags, fd, offset) \
+              mmap(addr, length, prot, flags, fd, offset)
+
+
+static inline int drm_munmap(void *addr, size_t length)
+{
+   /* Copied from configure code generated by AC_SYS_LARGEFILE */
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
+                     (((off_t) 1 << 31) << 31))
+   STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
+                 LARGE_OFF_T % 2147483647 == 1);
+#undef LARGE_OFF_T
+
+   return munmap(addr, length);
+}
+#endif
+
+#endif
diff --git a/libkms/api.c b/libkms/api.c
index a07a242..354d8a2 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -34,7 +34,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "internal.h"
 
 int kms_create(int fd, struct kms_driver **out)
diff --git a/libkms/dumb.c b/libkms/dumb.c
index e252d8c..b95a072 100644
--- a/libkms/dumb.c
+++ b/libkms/dumb.c
@@ -38,7 +38,7 @@
 
 #include <sys/ioctl.h>
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 struct dumb_bo
 {
diff --git a/libkms/exynos.c b/libkms/exynos.c
index db65f81..5de2e5a 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -25,7 +25,7 @@
 #include <sys/ioctl.h>
 #include "xf86drm.h"
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "exynos_drm.h"
 
 struct exynos_bo
diff --git a/libkms/intel.c b/libkms/intel.c
index a539df2..3d8ca05 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -38,7 +38,7 @@
 
 #include <sys/ioctl.h>
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 #include "i915_drm.h"
 
diff --git a/libkms/internal.h b/libkms/internal.h
index e7d5c46..905f5b1 100644
--- a/libkms/internal.h
+++ b/libkms/internal.h
@@ -33,7 +33,7 @@
 #include "config.h"
 #endif
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "libkms.h"
 
 struct kms_driver
diff --git a/libkms/linux.c b/libkms/linux.c
index 06dbc42..4d47148 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -41,7 +41,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "internal.h"
 
 #define PATH_SIZE 512
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 7f57f21..d10e0fd 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -38,7 +38,7 @@
 
 #include <sys/ioctl.h>
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 #include "nouveau_drm.h"
 
diff --git a/libkms/radeon.c b/libkms/radeon.c
index f0d5db6..aaeeaf3 100644
--- a/libkms/radeon.c
+++ b/libkms/radeon.c
@@ -38,7 +38,7 @@
 
 #include <sys/ioctl.h>
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 #include "radeon_drm.h"
 
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index 3c99ea3..6a24fd4 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -36,7 +36,7 @@
 #include "internal.h"
 
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "vmwgfx_drm.h"
 
 struct vmwgfx_bo
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 5c8a0ec..9d12091 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -37,7 +37,7 @@
 
 #include <xf86drm.h>
 #include <xf86atomic.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "libdrm_lists.h"
 #include "nouveau_drm.h"
 
diff --git a/nouveau/private.h b/nouveau/private.h
index 74d604e..e9439f3 100644
--- a/nouveau/private.h
+++ b/nouveau/private.h
@@ -1,7 +1,7 @@
 #ifndef __NOUVEAU_LIBDRM_PRIVATE_H__
 #define __NOUVEAU_LIBDRM_PRIVATE_H__
 
-#include <libdrm.h>
+#include <libdrm_macros.h>
 #include <xf86drm.h>
 #include <xf86atomic.h>
 #include <pthread.h>
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 8b4ec46..7bc8984 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -39,7 +39,7 @@
 #include <unistd.h>
 #include <pthread.h>
 
-#include <libdrm.h>
+#include <libdrm_macros.h>
 #include <xf86drm.h>
 #include <xf86atomic.h>
 
diff --git a/radeon/bof.h b/radeon/bof.h
index b7632b4..6f2474d 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -32,7 +32,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 #define BOF_TYPE_STRING		0
 #define BOF_TYPE_NULL		1
diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c
index 865e3f7..02a2d83 100644
--- a/radeon/radeon_bo.c
+++ b/radeon/radeon_bo.c
@@ -32,7 +32,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <libdrm.h>
+#include <libdrm_macros.h>
 #include <radeon_bo.h>
 #include <radeon_bo_int.h>
 
diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c
index e78303a..b48cf54 100644
--- a/radeon/radeon_bo_gem.c
+++ b/radeon/radeon_bo_gem.c
@@ -37,7 +37,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 #include "xf86atomic.h"
 #include "drm.h"
diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c
index fe5bbce..142b71f 100644
--- a/radeon/radeon_cs.c
+++ b/radeon/radeon_cs.c
@@ -1,7 +1,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include <stdio.h>
 #include "radeon_cs.h"
 #include "radeon_cs_int.h"
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index 705ee05..86e0855 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -44,7 +44,7 @@
 #include "radeon_cs_gem.h"
 #include "radeon_bo_gem.h"
 #include "drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 #include "xf86atomic.h"
 #include "radeon_drm.h"
diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c
index cca650b..1a6ea28 100644
--- a/radeon/radeon_cs_space.c
+++ b/radeon/radeon_cs_space.c
@@ -31,7 +31,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <stdlib.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "radeon_cs.h"
 #include "radeon_bo_int.h"
 #include "radeon_cs_int.h"
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index bd9ee6d..fd75b16 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -37,7 +37,7 @@
 #include <string.h>
 #include <sys/ioctl.h>
 #include "drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 #include "radeon_drm.h"
 #include "radeon_surface.h"
@@ -785,7 +785,7 @@ static int eg_surface_init_1d_miptrees(struct radeon_surface_manager *surf_man,
 {
     unsigned zs_flags = RADEON_SURF_ZBUFFER | RADEON_SURF_SBUFFER;
     int r, is_depth_stencil = (surf->flags & zs_flags) == zs_flags;
-    /* Old libdrm headers didn't have stencil_level in it. This prevents crashes. */
+    /* Old libdrm_macros.headers didn't have stencil_level in it. This prevents crashes. */
     struct radeon_surface_level tmp[RADEON_SURF_MAX_LEVEL];
     struct radeon_surface_level *stencil_level =
         (surf->flags & RADEON_SURF_HAS_SBUFFER_MIPTREE) ? surf->stencil_level : tmp;
@@ -807,7 +807,7 @@ static int eg_surface_init_2d_miptrees(struct radeon_surface_manager *surf_man,
 {
     unsigned zs_flags = RADEON_SURF_ZBUFFER | RADEON_SURF_SBUFFER;
     int r, is_depth_stencil = (surf->flags & zs_flags) == zs_flags;
-    /* Old libdrm headers didn't have stencil_level in it. This prevents crashes. */
+    /* Old libdrm_macros.headers didn't have stencil_level in it. This prevents crashes. */
     struct radeon_surface_level tmp[RADEON_SURF_MAX_LEVEL];
     struct radeon_surface_level *stencil_level =
         (surf->flags & RADEON_SURF_HAS_SBUFFER_MIPTREE) ? surf->stencil_level : tmp;
diff --git a/tegra/private.h b/tegra/private.h
index 9b6bc93..bb6c1a5 100644
--- a/tegra/private.h
+++ b/tegra/private.h
@@ -28,7 +28,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include <libdrm.h>
+#include <libdrm_macros.h>
 #include <xf86atomic.h>
 
 #include "tegra.h"
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index e4e8149..878b64e 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -39,7 +39,7 @@
 #include "drm.h"
 #include "drm_fourcc.h"
 
-#include "libdrm.h"
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 
 #include "buffers.h"
diff --git a/xf86drm.c b/xf86drm.c
index e73cddd..9ae5071 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -62,7 +62,7 @@
 #endif
 
 #include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #define DRM_MAJOR 145
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 23/24] drm: remove no longer needed VISIBILITY_CFLAGS
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (21 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-01 16:15 ` [PATCH libdrm 24/24] drm: remove drm_public macro Emil Velikov
  2015-04-21 15:41 ` [PATCH libdrm 00/24] Annotate private symbols, drop " Emil Velikov
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov, Michel Dänzer, Ben Skeggs, Thierry Reding

With earlier commits we've annotated the private symbols, thus
we no longer require the -fvisibility=hidden CFLAGS.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 configure.ac          | 15 ---------------
 exynos/Makefile.am    |  1 -
 freedreno/Makefile.am |  1 -
 intel/Makefile.am     |  1 -
 nouveau/Makefile.am   |  1 -
 omap/Makefile.am      |  1 -
 radeon/Makefile.am    |  1 -
 tegra/Makefile.am     |  1 -
 8 files changed, 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index 76cf91e..c25a813 100644
--- a/configure.ac
+++ b/configure.ac
@@ -403,21 +403,6 @@ AC_ARG_WITH([kernel-source],
 	    [kernel_source="$with_kernel_source"])
 AC_SUBST(kernel_source)
 
-dnl Add flags for gcc and g++
-if test "x$GCC" = xyes; then
-    # Enable -fvisibility=hidden if using a gcc that supports it
-    save_CFLAGS="$CFLAGS"
-    AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
-    VISIBILITY_CFLAGS="-fvisibility=hidden"
-    CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
-                   [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]);
-
-    # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
-    CFLAGS=$save_CFLAGS
-    AC_SUBST([VISIBILITY_CFLAGS])
-fi
-
 AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([
     int foo_default( void ) __attribute__((visibility("default")));
diff --git a/exynos/Makefile.am b/exynos/Makefile.am
index 0136a61..f99f898 100644
--- a/exynos/Makefile.am
+++ b/exynos/Makefile.am
@@ -1,6 +1,5 @@
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	-I$(top_srcdir)/include/drm
diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index 27e6aa6..0720867 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -3,7 +3,6 @@ include Makefile.sources
 
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	-I$(top_srcdir)/include/drm
diff --git a/intel/Makefile.am b/intel/Makefile.am
index 09bfbae..de3baab 100644
--- a/intel/Makefile.am
+++ b/intel/Makefile.am
@@ -26,7 +26,6 @@ include Makefile.sources
 
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	$(PCIACCESS_CFLAGS) \
diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
index 2f61351..25ea6dc 100644
--- a/nouveau/Makefile.am
+++ b/nouveau/Makefile.am
@@ -2,7 +2,6 @@ include Makefile.sources
 
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	-I$(top_srcdir)/include/drm \
diff --git a/omap/Makefile.am b/omap/Makefile.am
index b34fba6..599bb9d 100644
--- a/omap/Makefile.am
+++ b/omap/Makefile.am
@@ -1,6 +1,5 @@
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	-I$(top_srcdir)/include/drm
diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 54abd9e..ab3cd08 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -26,7 +26,6 @@ include Makefile.sources
 
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
-	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
 	-I$(top_srcdir)/include/drm
diff --git a/tegra/Makefile.am b/tegra/Makefile.am
index efa14f9..fb40be5 100644
--- a/tegra/Makefile.am
+++ b/tegra/Makefile.am
@@ -4,7 +4,6 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = \
 	@PTHREADSTUBS_CFLAGS@ \
-	$(VISIBILITY_CFLAGS) \
 	$(WARN_CFLAGS)
 
 libdrm_tegra_ladir = $(libdir)
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH libdrm 24/24] drm: remove drm_public macro
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (22 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 23/24] drm: remove no longer needed VISIBILITY_CFLAGS Emil Velikov
@ 2015-04-01 16:15 ` Emil Velikov
  2015-04-21 15:41 ` [PATCH libdrm 00/24] Annotate private symbols, drop " Emil Velikov
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov, Michel Dänzer, Ben Skeggs, Thierry Reding

Some compilers (like the Oracle Studio), require that the function
declaration must be annotated with the same visibility attribute as the
definition. As annotating functions with drm_public is no longer
required just remove the macro.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 configure.ac                     |  5 ++--
 exynos/exynos_drm.c              | 24 ++++++++--------
 exynos/exynos_fimg2d.c           | 16 +++++------
 freedreno/freedreno_bo.c         | 26 ++++++++---------
 freedreno/freedreno_device.c     |  8 +++---
 freedreno/freedreno_pipe.c       |  8 +++---
 freedreno/freedreno_ringbuffer.c | 26 ++++++++---------
 freedreno/kgsl/kgsl_bo.c         |  2 +-
 intel/intel_bufmgr.c             | 60 ++++++++++++++++++++--------------------
 intel/intel_bufmgr_fake.c        | 16 +++++------
 intel/intel_bufmgr_gem.c         | 52 +++++++++++++++++-----------------
 intel/intel_decode.c             | 14 +++++-----
 libdrm_macros.h                  |  2 --
 nouveau/bufctx.c                 | 10 +++----
 nouveau/nouveau.c                | 40 +++++++++++++--------------
 nouveau/pushbuf.c                | 20 +++++++-------
 omap/omap_drm.c                  | 36 ++++++++++++------------
 radeon/radeon_bo.c               | 28 +++++++++----------
 radeon/radeon_bo_gem.c           | 16 +++++------
 radeon/radeon_cs.c               | 24 ++++++++--------
 radeon/radeon_cs_gem.c           |  4 +--
 radeon/radeon_cs_space.c         |  8 +++---
 radeon/radeon_surface.c          |  8 +++---
 tegra/tegra.c                    | 13 ---------
 24 files changed, 225 insertions(+), 241 deletions(-)

diff --git a/configure.ac b/configure.ac
index c25a813..e715262 100644
--- a/configure.ac
+++ b/configure.ac
@@ -403,14 +403,13 @@ AC_ARG_WITH([kernel-source],
 	    [kernel_source="$with_kernel_source"])
 AC_SUBST(kernel_source)
 
-AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))])
+AC_MSG_CHECKING([whether $CC supports __attribute__(("hidden"))])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([
-    int foo_default( void ) __attribute__((visibility("default")));
     int foo_hidden( void ) __attribute__((visibility("hidden")));
 ])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]));
 
 if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then
-    AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))])
+    AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))])
 fi
 
 AC_SUBST(WARN_CFLAGS)
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index 5d07ea7..df9b8ed 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -49,7 +49,7 @@
  *
  * if true, return the device object else NULL.
  */
-drm_public struct exynos_device * exynos_device_create(int fd)
+struct exynos_device * exynos_device_create(int fd)
 {
 	struct exynos_device *dev;
 
@@ -70,7 +70,7 @@ drm_public struct exynos_device * exynos_device_create(int fd)
  *
  * @dev: exynos drm device object.
  */
-drm_public void exynos_device_destroy(struct exynos_device *dev)
+void exynos_device_destroy(struct exynos_device *dev)
 {
 	free(dev);
 }
@@ -88,7 +88,7 @@ drm_public void exynos_device_destroy(struct exynos_device *dev)
  *
  * if true, return a exynos buffer object else NULL.
  */
-drm_public struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
+struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
 					       size_t size, uint32_t flags)
 {
 	struct exynos_bo *bo;
@@ -142,7 +142,7 @@ fail:
  *
  * if true, return 0 else negative.
  */
-drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
+int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
 				  size_t *size, uint32_t *flags)
 {
 	int ret;
@@ -168,7 +168,7 @@ drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
  *
  * @bo: a exynos buffer object to be destroyed.
  */
-drm_public void exynos_bo_destroy(struct exynos_bo *bo)
+void exynos_bo_destroy(struct exynos_bo *bo)
 {
 	if (!bo)
 		return;
@@ -200,7 +200,7 @@ drm_public void exynos_bo_destroy(struct exynos_bo *bo)
  * if true, return a exynos buffer object else NULL.
  *
  */
-drm_public struct exynos_bo *
+struct exynos_bo *
 exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
 {
 	struct exynos_bo *bo;
@@ -243,7 +243,7 @@ err_free_bo:
  *
  * if true, return 0 else negative.
  */
-drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
+int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
 {
 	if (!bo->name) {
 		struct drm_gem_flink req = {
@@ -266,7 +266,7 @@ drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
 	return 0;
 }
 
-drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo)
+uint32_t exynos_bo_handle(struct exynos_bo *bo)
 {
 	return bo->handle;
 }
@@ -279,7 +279,7 @@ drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo)
  *
  * if true, user pointer mmaped else NULL.
  */
-drm_public void *exynos_bo_map(struct exynos_bo *bo)
+void *exynos_bo_map(struct exynos_bo *bo)
 {
 	if (!bo->vaddr) {
 		struct exynos_device *dev = bo->dev;
@@ -316,7 +316,7 @@ drm_public void *exynos_bo_map(struct exynos_bo *bo)
  *
  * @return: 0 on success, -1 on error, and errno will be set
  */
-drm_public int
+int
 exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)
 {
 	return drmPrimeHandleToFD(dev->fd, handle, 0, fd);
@@ -331,7 +331,7 @@ exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)
  *
  * @return: 0 on success, -1 on error, and errno will be set
  */
-drm_public int
+int
 exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
 {
 	return drmPrimeFDToHandle(dev->fd, fd, handle);
@@ -354,7 +354,7 @@ exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
  *
  * if true, return 0 else negative.
  */
-drm_public int
+int
 exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
 		       uint32_t ext, void *edid)
 {
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index cb422e8..86ae898 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -224,7 +224,7 @@ static int g2d_flush(struct g2d_context *ctx)
  *
  * fd: a file descriptor to an opened drm device.
  */
-drm_public struct g2d_context *g2d_init(int fd)
+struct g2d_context *g2d_init(int fd)
 {
 	struct drm_exynos_g2d_get_ver ver;
 	struct g2d_context *ctx;
@@ -252,7 +252,7 @@ drm_public struct g2d_context *g2d_init(int fd)
 	return ctx;
 }
 
-drm_public void g2d_fini(struct g2d_context *ctx)
+void g2d_fini(struct g2d_context *ctx)
 {
 	if (ctx)
 		free(ctx);
@@ -263,7 +263,7 @@ drm_public void g2d_fini(struct g2d_context *ctx)
  *
  * @ctx: a pointer to g2d_context structure.
  */
-drm_public int g2d_exec(struct g2d_context *ctx)
+int g2d_exec(struct g2d_context *ctx)
 {
 	struct drm_exynos_g2d_exec exec;
 	int ret;
@@ -295,7 +295,7 @@ drm_public int g2d_exec(struct g2d_context *ctx)
  * @w: width value to buffer filled with given color data.
  * @h: height value to buffer filled with given color data.
  */
-drm_public int
+int
 g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
 			unsigned int x, unsigned int y, unsigned int w,
 			unsigned int h)
@@ -350,7 +350,7 @@ g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
  * @w: width value to source and destination buffers.
  * @h: height value to source and destination buffers.
  */
-drm_public int
+int
 g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
 		struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
 		unsigned int dst_x, unsigned dst_y, unsigned int w,
@@ -440,7 +440,7 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
  * @negative: indicate that it uses color negative to source and
  *	destination buffers.
  */
-drm_public int
+int
 g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
 				struct g2d_image *dst, unsigned int src_x,
 				unsigned int src_y, unsigned int src_w,
@@ -548,7 +548,7 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
  * @h: height value to source and destination buffer.
  * @op: blend operation type.
  */
-drm_public int
+int
 g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
 		struct g2d_image *dst, unsigned int src_x,
 		unsigned int src_y, unsigned int dst_x, unsigned int dst_y,
@@ -659,7 +659,7 @@ g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
  * @dst_h: height value to destination buffer.
  * @op: blend operation type.
  */
-drm_public int
+int
 g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
 		struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
 		unsigned int src_w, unsigned int src_h, unsigned int dst_x,
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index c56fdbd..517a2f8 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -167,7 +167,7 @@ static struct fd_bo *find_in_bucket(struct fd_device *dev,
 }
 
 
-drm_public struct fd_bo *
+struct fd_bo *
 fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
 {
 	struct fd_bo *bo = NULL;
@@ -201,7 +201,7 @@ fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
 	return bo;
 }
 
-drm_public struct fd_bo *
+struct fd_bo *
 fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size)
 {
 	struct fd_bo *bo = NULL;
@@ -220,7 +220,7 @@ out_unlock:
 	return bo;
 }
 
-drm_public struct fd_bo *
+struct fd_bo *
 fd_bo_from_dmabuf(struct fd_device *dev, int fd)
 {
 	struct drm_prime_handle req = {
@@ -239,7 +239,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd)
 	return fd_bo_from_handle(dev, req.handle, size);
 }
 
-drm_public struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
+struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
 {
 	struct drm_gem_open req = {
 			.name = name,
@@ -272,13 +272,13 @@ out_unlock:
 	return bo;
 }
 
-drm_public struct fd_bo * fd_bo_ref(struct fd_bo *bo)
+struct fd_bo * fd_bo_ref(struct fd_bo *bo)
 {
 	atomic_inc(&bo->refcnt);
 	return bo;
 }
 
-drm_public void fd_bo_del(struct fd_bo *bo)
+void fd_bo_del(struct fd_bo *bo)
 {
 	struct fd_device *dev = bo->dev;
 
@@ -342,7 +342,7 @@ static void bo_del(struct fd_bo *bo)
 	bo->funcs->destroy(bo);
 }
 
-drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
+int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
 {
 	if (!bo->name) {
 		struct drm_gem_flink req = {
@@ -365,12 +365,12 @@ drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
 	return 0;
 }
 
-drm_public uint32_t fd_bo_handle(struct fd_bo *bo)
+uint32_t fd_bo_handle(struct fd_bo *bo)
 {
 	return bo->handle;
 }
 
-drm_public int fd_bo_dmabuf(struct fd_bo *bo)
+int fd_bo_dmabuf(struct fd_bo *bo)
 {
 	if (!bo->fd) {
 		struct drm_prime_handle req = {
@@ -389,12 +389,12 @@ drm_public int fd_bo_dmabuf(struct fd_bo *bo)
 	return dup(bo->fd);
 }
 
-drm_public uint32_t fd_bo_size(struct fd_bo *bo)
+uint32_t fd_bo_size(struct fd_bo *bo)
 {
 	return bo->size;
 }
 
-drm_public void * fd_bo_map(struct fd_bo *bo)
+void * fd_bo_map(struct fd_bo *bo)
 {
 	if (!bo->map) {
 		uint64_t offset;
@@ -416,12 +416,12 @@ drm_public void * fd_bo_map(struct fd_bo *bo)
 }
 
 /* a bit odd to take the pipe as an arg, but it's a, umm, quirk of kgsl.. */
-drm_public int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
+int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
 {
 	return bo->funcs->cpu_prep(bo, pipe, op);
 }
 
-drm_public void fd_bo_cpu_fini(struct fd_bo *bo)
+void fd_bo_cpu_fini(struct fd_bo *bo)
 {
 	bo->funcs->cpu_fini(bo);
 }
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index 09b2302..3bc4cb2 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -80,7 +80,7 @@ init_cache_buckets(struct fd_device *dev)
 	}
 }
 
-drm_public struct fd_device * fd_device_new(int fd)
+struct fd_device * fd_device_new(int fd)
 {
 	struct fd_device *dev;
 	drmVersionPtr version;
@@ -121,7 +121,7 @@ drm_public struct fd_device * fd_device_new(int fd)
 /* like fd_device_new() but creates it's own private dup() of the fd
  * which is close()d when the device is finalized.
  */
-drm_public struct fd_device * fd_device_new_dup(int fd)
+struct fd_device * fd_device_new_dup(int fd)
 {
 	struct fd_device *dev = fd_device_new(dup(fd));
 	if (dev)
@@ -129,7 +129,7 @@ drm_public struct fd_device * fd_device_new_dup(int fd)
 	return dev;
 }
 
-drm_public struct fd_device * fd_device_ref(struct fd_device *dev)
+struct fd_device * fd_device_ref(struct fd_device *dev)
 {
 	atomic_inc(&dev->refcnt);
 	return dev;
@@ -152,7 +152,7 @@ drm_private void fd_device_del_locked(struct fd_device *dev)
 	fd_device_del_impl(dev);
 }
 
-drm_public void fd_device_del(struct fd_device *dev)
+void fd_device_del(struct fd_device *dev)
 {
 	if (!atomic_dec_and_test(&dev->refcnt))
 		return;
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 54e957b..b6fed0a 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -33,7 +33,7 @@
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
-drm_public struct fd_pipe *
+struct fd_pipe *
 fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
 {
 	struct fd_pipe *pipe = NULL;
@@ -59,18 +59,18 @@ fail:
 	return NULL;
 }
 
-drm_public void fd_pipe_del(struct fd_pipe *pipe)
+void fd_pipe_del(struct fd_pipe *pipe)
 {
 	pipe->funcs->destroy(pipe);
 }
 
-drm_public int fd_pipe_get_param(struct fd_pipe *pipe,
+int fd_pipe_get_param(struct fd_pipe *pipe,
 				 enum fd_param_id param, uint64_t *value)
 {
 	return pipe->funcs->get_param(pipe, param, value);
 }
 
-drm_public int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
+int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
 {
 	return pipe->funcs->wait(pipe, timestamp);
 }
diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c
index c13dfe9..984da24 100644
--- a/freedreno/freedreno_ringbuffer.c
+++ b/freedreno/freedreno_ringbuffer.c
@@ -36,7 +36,7 @@
 #include "freedreno_priv.h"
 #include "freedreno_ringbuffer.h"
 
-drm_public struct fd_ringbuffer *
+struct fd_ringbuffer *
 fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
 {
 	struct fd_ringbuffer *ring;
@@ -55,7 +55,7 @@ fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
 	return ring;
 }
 
-drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring)
+void fd_ringbuffer_del(struct fd_ringbuffer *ring)
 {
 	ring->funcs->destroy(ring);
 }
@@ -64,13 +64,13 @@ drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring)
  * the IB source) as it's parent before emitting reloc's, to ensure
  * the bookkeeping works out properly.
  */
-drm_public void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
+void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
 					 struct fd_ringbuffer *parent)
 {
 	ring->parent = parent;
 }
 
-drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
+void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
 {
 	uint32_t *start = ring->start;
 	if (ring->pipe->id == FD_PIPE_2D)
@@ -81,23 +81,23 @@ drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
 }
 
 /* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */
-drm_public int fd_ringbuffer_flush(struct fd_ringbuffer *ring)
+int fd_ringbuffer_flush(struct fd_ringbuffer *ring)
 {
 	return ring->funcs->flush(ring, ring->last_start);
 }
 
-drm_public uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
+uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
 {
 	return ring->last_timestamp;
 }
 
-drm_public void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
+void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
 				    const struct fd_reloc *reloc)
 {
 	ring->funcs->emit_reloc(ring, reloc);
 }
 
-drm_public void
+void
 fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
 			      struct fd_ringmarker *target,
 			      struct fd_ringmarker *end)
@@ -106,7 +106,7 @@ fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
 	ring->funcs->emit_reloc_ring(ring, target, end);
 }
 
-drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
+struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
 {
 	struct fd_ringmarker *marker = NULL;
 
@@ -123,23 +123,23 @@ drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
 	return marker;
 }
 
-drm_public void fd_ringmarker_del(struct fd_ringmarker *marker)
+void fd_ringmarker_del(struct fd_ringmarker *marker)
 {
 	free(marker);
 }
 
-drm_public void fd_ringmarker_mark(struct fd_ringmarker *marker)
+void fd_ringmarker_mark(struct fd_ringmarker *marker)
 {
 	marker->cur = marker->ring->cur;
 }
 
-drm_public uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
+uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
 					 struct fd_ringmarker *end)
 {
 	return end->cur - start->cur;
 }
 
-drm_public int fd_ringmarker_flush(struct fd_ringmarker *marker)
+int fd_ringmarker_flush(struct fd_ringmarker *marker)
 {
 	struct fd_ringbuffer *ring = marker->ring;
 	return ring->funcs->flush(ring, marker->cur);
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index f151186..15c3ff5 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -175,7 +175,7 @@ drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
 	return bo;
 }
 
-drm_public struct fd_bo *
+struct fd_bo *
 fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size)
 {
 	struct fd_bo *bo;
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index a95771d..14ea9f9 100644
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
@@ -47,21 +47,21 @@
  * Convenience functions for buffer management methods.
  */
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name,
 		   unsigned long size, unsigned int alignment)
 {
 	return bufmgr->bo_alloc(bufmgr, name, size, alignment);
 }
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name,
 			      unsigned long size, unsigned int alignment)
 {
 	return bufmgr->bo_alloc_for_render(bufmgr, name, size, alignment);
 }
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
 			   const char *name, void *addr,
 			   uint32_t tiling_mode,
@@ -75,7 +75,7 @@ drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
 	return NULL;
 }
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
                         int x, int y, int cpp, uint32_t *tiling_mode,
                         unsigned long *pitch, unsigned long flags)
@@ -84,13 +84,13 @@ drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
 				      tiling_mode, pitch, flags);
 }
 
-drm_public void
+void
 drm_intel_bo_reference(drm_intel_bo *bo)
 {
 	bo->bufmgr->bo_reference(bo);
 }
 
-drm_public void
+void
 drm_intel_bo_unreference(drm_intel_bo *bo)
 {
 	if (bo == NULL)
@@ -99,26 +99,26 @@ drm_intel_bo_unreference(drm_intel_bo *bo)
 	bo->bufmgr->bo_unreference(bo);
 }
 
-drm_public int
+int
 drm_intel_bo_map(drm_intel_bo *buf, int write_enable)
 {
 	return buf->bufmgr->bo_map(buf, write_enable);
 }
 
-drm_public int
+int
 drm_intel_bo_unmap(drm_intel_bo *buf)
 {
 	return buf->bufmgr->bo_unmap(buf);
 }
 
-drm_public int
+int
 drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset,
 		     unsigned long size, const void *data)
 {
 	return bo->bufmgr->bo_subdata(bo, offset, size, data);
 }
 
-drm_public int
+int
 drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset,
 			 unsigned long size, void *data)
 {
@@ -137,26 +137,26 @@ drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset,
 	return 0;
 }
 
-drm_public void
+void
 drm_intel_bo_wait_rendering(drm_intel_bo *bo)
 {
 	bo->bufmgr->bo_wait_rendering(bo);
 }
 
-drm_public void
+void
 drm_intel_bufmgr_destroy(drm_intel_bufmgr *bufmgr)
 {
 	bufmgr->destroy(bufmgr);
 }
 
-drm_public int
+int
 drm_intel_bo_exec(drm_intel_bo *bo, int used,
 		  drm_clip_rect_t * cliprects, int num_cliprects, int DR4)
 {
 	return bo->bufmgr->bo_exec(bo, used, cliprects, num_cliprects, DR4);
 }
 
-drm_public int
+int
 drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
 		drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
 		unsigned int rings)
@@ -176,19 +176,19 @@ drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
 	}
 }
 
-drm_public void
+void
 drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug)
 {
 	bufmgr->debug = enable_debug;
 }
 
-drm_public int
+int
 drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count)
 {
 	return bo_array[0]->bufmgr->check_aperture_space(bo_array, count);
 }
 
-drm_public int
+int
 drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name)
 {
 	if (bo->bufmgr->bo_flink)
@@ -197,7 +197,7 @@ drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name)
 	return -ENODEV;
 }
 
-drm_public int
+int
 drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
 			drm_intel_bo *target_bo, uint32_t target_offset,
 			uint32_t read_domains, uint32_t write_domain)
@@ -208,7 +208,7 @@ drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
 }
 
 /* For fence registers, not GL fences */
-drm_public int
+int
 drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset,
 			      drm_intel_bo *target_bo, uint32_t target_offset,
 			      uint32_t read_domains, uint32_t write_domain)
@@ -219,7 +219,7 @@ drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset,
 }
 
 
-drm_public int
+int
 drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment)
 {
 	if (bo->bufmgr->bo_pin)
@@ -228,7 +228,7 @@ drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment)
 	return -ENODEV;
 }
 
-drm_public int
+int
 drm_intel_bo_unpin(drm_intel_bo *bo)
 {
 	if (bo->bufmgr->bo_unpin)
@@ -237,7 +237,7 @@ drm_intel_bo_unpin(drm_intel_bo *bo)
 	return -ENODEV;
 }
 
-drm_public int
+int
 drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 			uint32_t stride)
 {
@@ -248,7 +248,7 @@ drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 			uint32_t * swizzle_mode)
 {
@@ -260,7 +260,7 @@ drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_bo_disable_reuse(drm_intel_bo *bo)
 {
 	if (bo->bufmgr->bo_disable_reuse)
@@ -268,7 +268,7 @@ drm_intel_bo_disable_reuse(drm_intel_bo *bo)
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_bo_is_reusable(drm_intel_bo *bo)
 {
 	if (bo->bufmgr->bo_is_reusable)
@@ -276,7 +276,7 @@ drm_intel_bo_is_reusable(drm_intel_bo *bo)
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_bo_busy(drm_intel_bo *bo)
 {
 	if (bo->bufmgr->bo_busy)
@@ -284,7 +284,7 @@ drm_intel_bo_busy(drm_intel_bo *bo)
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_bo_madvise(drm_intel_bo *bo, int madv)
 {
 	if (bo->bufmgr->bo_madvise)
@@ -292,13 +292,13 @@ drm_intel_bo_madvise(drm_intel_bo *bo, int madv)
 	return -1;
 }
 
-drm_public int
+int
 drm_intel_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo)
 {
 	return bo->bufmgr->bo_references(bo, target_bo);
 }
 
-drm_public int
+int
 drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id)
 {
 	if (bufmgr->get_pipe_from_crtc_id)
@@ -332,7 +332,7 @@ err:
 	return size;
 }
 
-drm_public int
+int
 drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total)
 {
 
diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index d0c2d74..54a3983 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -249,7 +249,7 @@ FENCE_LTE(unsigned a, unsigned b)
 	return 0;
 }
 
-drm_public void
+void
 drm_intel_bufmgr_fake_set_fence_callback(drm_intel_bufmgr *bufmgr,
 					 unsigned int (*emit) (void *priv),
 					 void (*wait) (unsigned int fence,
@@ -772,7 +772,7 @@ drm_intel_fake_bo_wait_rendering(drm_intel_bo *bo)
  *  -- just evict everything
  *  -- and wait for idle
  */
-drm_public void
+void
 drm_intel_bufmgr_fake_contended_lock_take(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr;
@@ -868,7 +868,7 @@ drm_intel_fake_bo_alloc_tiled(drm_intel_bufmgr * bufmgr,
 				       4096);
 }
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr,
 			       const char *name,
 			       unsigned long offset,
@@ -963,7 +963,7 @@ drm_intel_fake_bo_unreference(drm_intel_bo *bo)
  * Set the buffer as not requiring backing store, and instead get the callback
  * invoked whenever it would be set dirty.
  */
-drm_public void
+void
 drm_intel_bo_fake_disable_backing_store(drm_intel_bo *bo,
 					void (*invalidate_cb) (drm_intel_bo *bo,
 							       void *ptr),
@@ -1417,7 +1417,7 @@ drm_intel_bo_fake_post_submit(drm_intel_bo *bo)
 	bo_fake->write_domain = 0;
 }
 
-drm_public void
+void
 drm_intel_bufmgr_fake_set_exec_callback(drm_intel_bufmgr *bufmgr,
 					     int (*exec) (drm_intel_bo *bo,
 							  unsigned int used,
@@ -1540,7 +1540,7 @@ drm_intel_fake_check_aperture_space(drm_intel_bo ** bo_array, int count)
  * Used by the X Server on LeaveVT, when the card memory is no longer our
  * own.
  */
-drm_public void
+void
 drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr;
@@ -1575,7 +1575,7 @@ drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr)
 	pthread_mutex_unlock(&bufmgr_fake->lock);
 }
 
-drm_public void
+void
 drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr,
 					volatile unsigned int
 					*last_dispatch)
@@ -1585,7 +1585,7 @@ drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr,
 	bufmgr_fake->last_dispatch = (volatile int *)last_dispatch;
 }
 
-drm_public drm_intel_bufmgr *
+drm_intel_bufmgr *
 drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset,
 			   void *low_virtual, unsigned long size,
 			   volatile unsigned int *last_dispatch)
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 201da08..d8bf630 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -942,7 +942,7 @@ drm_intel_gem_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
  * This can be used when one application needs to pass a buffer object
  * to another.
  */
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
 				  const char *name,
 				  unsigned int handle)
@@ -1404,7 +1404,7 @@ map_gtt(drm_intel_bo *bo)
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1463,7 +1463,7 @@ drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
  * undefined).
  */
 
-drm_public int
+int
 drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1552,7 +1552,7 @@ static int drm_intel_gem_bo_unmap(drm_intel_bo *bo)
 	return ret;
 }
 
-drm_public int
+int
 drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo)
 {
 	return drm_intel_gem_bo_unmap(bo);
@@ -1677,7 +1677,7 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)
  * Note that some kernels have broken the inifite wait for negative values
  * promise, upgrade to latest stable kernels if this is the case.
  */
-drm_public int
+int
 drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1713,7 +1713,7 @@ drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns)
  * In combination with drm_intel_gem_bo_pin() and manual fence management, we
  * can do tiled pixmaps this way.
  */
-drm_public void
+void
 drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1876,7 +1876,7 @@ drm_intel_gem_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset,
 				read_domains, write_domain, true);
 }
 
-drm_public int
+int
 drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo)
 {
 	drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
@@ -1897,7 +1897,7 @@ drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo)
  * Any further drm_intel_bufmgr_check_aperture_space() queries
  * involving this buffer in the tree are undefined after this call.
  */
-drm_public void
+void
 drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -2233,7 +2233,7 @@ aub_build_dump_ringbuffer(drm_intel_bufmgr_gem *bufmgr_gem,
 	bufmgr_gem->aub_offset += 4096;
 }
 
-drm_public void
+void
 drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo,
 			      int x1, int y1, int width, int height,
 			      enum aub_dump_bmp_format format,
@@ -2504,7 +2504,7 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used,
 			flags);
 }
 
-drm_public int
+int
 drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx,
 			      int used, unsigned int flags)
 {
@@ -2629,7 +2629,7 @@ drm_intel_gem_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 	return 0;
 }
 
-drm_public drm_intel_bo *
+drm_intel_bo *
 drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int size)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr;
@@ -2715,7 +2715,7 @@ drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int s
 	return &bo_gem->bo;
 }
 
-drm_public int
+int
 drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -2775,7 +2775,7 @@ drm_intel_gem_bo_flink(drm_intel_bo *bo, uint32_t * name)
  * size is only bounded by how many buffers of that size we've managed to have
  * in flight at once.
  */
-drm_public void
+void
 drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr;
@@ -2790,7 +2790,7 @@ drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr)
  * allocation.  If this option is not enabled, all relocs will have fence
  * register allocated.
  */
-drm_public void
+void
 drm_intel_bufmgr_gem_enable_fenced_relocs(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3062,7 +3062,7 @@ init_cache_buckets(drm_intel_bufmgr_gem *bufmgr_gem)
 	}
 }
 
-drm_public void
+void
 drm_intel_bufmgr_gem_set_vma_cache_size(drm_intel_bufmgr *bufmgr, int limit)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3103,7 +3103,7 @@ get_pci_device_id(drm_intel_bufmgr_gem *bufmgr_gem)
 	return devid;
 }
 
-drm_public int
+int
 drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3117,7 +3117,7 @@ drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr)
  * This function has to be called before drm_intel_bufmgr_gem_set_aub_dump()
  * for it to have any effect.
  */
-drm_public void
+void
 drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr,
 				      const char *filename)
 {
@@ -3136,7 +3136,7 @@ drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr,
  * You can set up a GTT and upload your objects into the referenced
  * space, then send off batchbuffers and get BMPs out the other end.
  */
-drm_public void
+void
 drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3193,7 +3193,7 @@ drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable)
 	}
 }
 
-drm_public drm_intel_context *
+drm_intel_context *
 drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3220,7 +3220,7 @@ drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
 	return context;
 }
 
-drm_public void
+void
 drm_intel_gem_context_destroy(drm_intel_context *ctx)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem;
@@ -3243,7 +3243,7 @@ drm_intel_gem_context_destroy(drm_intel_context *ctx)
 	free(ctx);
 }
 
-drm_public int
+int
 drm_intel_get_reset_stats(drm_intel_context *ctx,
 			  uint32_t *reset_count,
 			  uint32_t *active,
@@ -3277,7 +3277,7 @@ drm_intel_get_reset_stats(drm_intel_context *ctx,
 	return ret;
 }
 
-drm_public int
+int
 drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
 		   uint32_t offset,
 		   uint64_t *result)
@@ -3295,7 +3295,7 @@ drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
 	return ret;
 }
 
-drm_public int
+int
 drm_intel_get_subslice_total(int fd, unsigned int *subslice_total)
 {
 	drm_i915_getparam_t gp;
@@ -3311,7 +3311,7 @@ drm_intel_get_subslice_total(int fd, unsigned int *subslice_total)
 	return 0;
 }
 
-drm_public int
+int
 drm_intel_get_eu_total(int fd, unsigned int *eu_total)
 {
 	drm_i915_getparam_t gp;
@@ -3348,7 +3348,7 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)
  * default state (no annotations), call this function with a \c count
  * of zero.
  */
-drm_public void
+void
 drm_intel_bufmgr_gem_set_aub_annotations(drm_intel_bo *bo,
 					 drm_intel_aub_annotation *annotations,
 					 unsigned count)
@@ -3456,7 +3456,7 @@ retry:
  *
  * \param fd File descriptor of the opened DRM device.
  */
-drm_public drm_intel_bufmgr *
+drm_intel_bufmgr *
 drm_intel_bufmgr_gem_init(int fd, int batch_size)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem;
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 8759760..2b902a3 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -3817,7 +3817,7 @@ decode_3d_i830(struct drm_intel_decode *ctx)
 	return 1;
 }
 
-drm_public struct drm_intel_decode *
+struct drm_intel_decode *
 drm_intel_decode_context_alloc(uint32_t devid)
 {
 	struct drm_intel_decode *ctx;
@@ -3851,20 +3851,20 @@ drm_intel_decode_context_alloc(uint32_t devid)
 	return ctx;
 }
 
-drm_public void
+void
 drm_intel_decode_context_free(struct drm_intel_decode *ctx)
 {
 	free(ctx);
 }
 
-drm_public void
+void
 drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx,
 				   int dump_past_end)
 {
 	ctx->dump_past_end = !!dump_past_end;
 }
 
-drm_public void
+void
 drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
 				   void *data, uint32_t hw_offset, int count)
 {
@@ -3873,7 +3873,7 @@ drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
 	ctx->base_count = count;
 }
 
-drm_public void
+void
 drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
 			       uint32_t head, uint32_t tail)
 {
@@ -3881,7 +3881,7 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
 	ctx->tail = tail;
 }
 
-drm_public void
+void
 drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
 				 FILE *out)
 {
@@ -3895,7 +3895,7 @@ drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
  * \param count number of DWORDs to decode in the batch buffer
  * \param hw_offset hardware address for the buffer
  */
-drm_public void
+void
 drm_intel_decode(struct drm_intel_decode *ctx)
 {
 	int ret;
diff --git a/libdrm_macros.h b/libdrm_macros.h
index 6c3cd59..639d090 100644
--- a/libdrm_macros.h
+++ b/libdrm_macros.h
@@ -25,10 +25,8 @@
 
 #if defined(HAVE_VISIBILITY)
 #  define drm_private __attribute__((visibility("hidden")))
-#  define drm_public __attribute__((visibility("default")))
 #else
 #  define drm_private
-#  define drm_public
 #endif
 
 
diff --git a/nouveau/bufctx.c b/nouveau/bufctx.c
index 0cba410..4f76e5d 100644
--- a/nouveau/bufctx.c
+++ b/nouveau/bufctx.c
@@ -62,7 +62,7 @@ nouveau_bufctx(struct nouveau_bufctx *bctx)
 	return (struct nouveau_bufctx_priv *)bctx;
 }
 
-drm_public int
+int
 nouveau_bufctx_new(struct nouveau_client *client, int bins,
 		   struct nouveau_bufctx **pbctx)
 {
@@ -82,7 +82,7 @@ nouveau_bufctx_new(struct nouveau_client *client, int bins,
 	return -ENOMEM;
 }
 
-drm_public void
+void
 nouveau_bufctx_del(struct nouveau_bufctx **pbctx)
 {
 	struct nouveau_bufctx_priv *pctx = nouveau_bufctx(*pbctx);
@@ -99,7 +99,7 @@ nouveau_bufctx_del(struct nouveau_bufctx **pbctx)
 	}
 }
 
-drm_public void
+void
 nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin)
 {
 	struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx);
@@ -117,7 +117,7 @@ nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin)
 	pbin->relocs  = 0;
 }
 
-drm_public struct nouveau_bufref *
+struct nouveau_bufref *
 nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,
 		    struct nouveau_bo *bo, uint32_t flags)
 {
@@ -144,7 +144,7 @@ nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,
 	return &pref->base;
 }
 
-drm_public struct nouveau_bufref *
+struct nouveau_bufref *
 nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet,
 		    struct nouveau_bo *bo, uint64_t data, uint32_t flags,
 		    uint32_t vor, uint32_t tor)
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 9d12091..687bbb0 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -62,14 +62,14 @@ debug_init(char *args)
  * is kept here to prevent AIGLX from crashing if the DDX is linked against
  * the new libdrm, but the DRI driver against the old
  */
-drm_public int
+int
 nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd,
 			     drm_context_t ctx)
 {
 	return -EACCES;
 }
 
-drm_public int
+int
 nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
 {
 	struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev));
@@ -147,7 +147,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
 	return 0;
 }
 
-drm_public int
+int
 nouveau_device_open(const char *busid, struct nouveau_device **pdev)
 {
 	int ret = -ENODEV, fd = drmOpen("nouveau", busid);
@@ -159,7 +159,7 @@ nouveau_device_open(const char *busid, struct nouveau_device **pdev)
 	return ret;
 }
 
-drm_public void
+void
 nouveau_device_del(struct nouveau_device **pdev)
 {
 	struct nouveau_device_priv *nvdev = nouveau_device(*pdev);
@@ -173,7 +173,7 @@ nouveau_device_del(struct nouveau_device **pdev)
 	}
 }
 
-drm_public int
+int
 nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value)
 {
 	struct drm_nouveau_getparam r = { param, 0 };
@@ -183,14 +183,14 @@ nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value)
 	return ret;
 }
 
-drm_public int
+int
 nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value)
 {
 	struct drm_nouveau_setparam r = { param, value };
 	return drmCommandWrite(dev->fd, DRM_NOUVEAU_SETPARAM, &r, sizeof(r));
 }
 
-drm_public int
+int
 nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
 {
 	struct nouveau_device_priv *nvdev = nouveau_device(dev);
@@ -229,7 +229,7 @@ unlock:
 	return ret;
 }
 
-drm_public void
+void
 nouveau_client_del(struct nouveau_client **pclient)
 {
 	struct nouveau_client_priv *pcli = nouveau_client(*pclient);
@@ -245,7 +245,7 @@ nouveau_client_del(struct nouveau_client **pclient)
 	}
 }
 
-drm_public int
+int
 nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
 		   uint32_t oclass, void *data, uint32_t length,
 		   struct nouveau_object **pobj)
@@ -307,7 +307,7 @@ nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
 	return 0;
 }
 
-drm_public void
+void
 nouveau_object_del(struct nouveau_object **pobj)
 {
 	struct nouveau_object *obj = *pobj;
@@ -331,7 +331,7 @@ nouveau_object_del(struct nouveau_object **pobj)
 	*pobj = NULL;
 }
 
-drm_public void *
+void *
 nouveau_object_find(struct nouveau_object *obj, uint32_t pclass)
 {
 	while (obj && obj->oclass != pclass) {
@@ -372,7 +372,7 @@ nouveau_bo_del(struct nouveau_bo *bo)
 	free(nvbo);
 }
 
-drm_public int
+int
 nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
 	       uint64_t size, union nouveau_bo_config *config,
 	       struct nouveau_bo **pbo)
@@ -462,7 +462,7 @@ nouveau_bo_make_global(struct nouveau_bo_priv *nvbo)
 	}
 }
 
-drm_public int
+int
 nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
 		struct nouveau_bo **pbo)
 {
@@ -474,7 +474,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
 	return ret;
 }
 
-drm_public int
+int
 nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name,
 		    struct nouveau_bo **pbo)
 {
@@ -492,7 +492,7 @@ nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name,
 	return ret;
 }
 
-drm_public int
+int
 nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name)
 {
 	struct drm_gem_flink req = { .handle = bo->handle };
@@ -513,7 +513,7 @@ nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name)
 	return 0;
 }
 
-drm_public void
+void
 nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref)
 {
 	struct nouveau_bo *ref = *pref;
@@ -527,7 +527,7 @@ nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref)
 	*pref = bo;
 }
 
-drm_public int
+int
 nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd,
 			    struct nouveau_bo **bo)
 {
@@ -546,7 +546,7 @@ nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd,
 	return ret;
 }
 
-drm_public int
+int
 nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd)
 {
 	struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
@@ -560,7 +560,7 @@ nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd)
 	return 0;
 }
 
-drm_public int
+int
 nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
 		struct nouveau_client *client)
 {
@@ -594,7 +594,7 @@ nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
 	return ret;
 }
 
-drm_public int
+int
 nouveau_bo_map(struct nouveau_bo *bo, uint32_t access,
 	       struct nouveau_client *client)
 {
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 6e703a4..4f77881 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -529,7 +529,7 @@ pushbuf_validate(struct nouveau_pushbuf *push, bool retry)
 	return ret;
 }
 
-drm_public int
+int
 nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
 		    int nr, uint32_t size, bool immediate,
 		    struct nouveau_pushbuf **ppush)
@@ -600,7 +600,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
 	return 0;
 }
 
-drm_public void
+void
 nouveau_pushbuf_del(struct nouveau_pushbuf **ppush)
 {
 	struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(*ppush);
@@ -626,7 +626,7 @@ nouveau_pushbuf_del(struct nouveau_pushbuf **ppush)
 	*ppush = NULL;
 }
 
-drm_public struct nouveau_bufctx *
+struct nouveau_bufctx *
 nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx)
 {
 	struct nouveau_bufctx *prev = push->bufctx;
@@ -634,7 +634,7 @@ nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx)
 	return prev;
 }
 
-drm_public int
+int
 nouveau_pushbuf_space(struct nouveau_pushbuf *push,
 		      uint32_t dwords, uint32_t relocs, uint32_t pushes)
 {
@@ -698,7 +698,7 @@ nouveau_pushbuf_space(struct nouveau_pushbuf *push,
 	return flushed ? pushbuf_validate(push, false) : 0;
 }
 
-drm_public void
+void
 nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
 		     uint64_t offset, uint64_t length)
 {
@@ -728,14 +728,14 @@ nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
 	}
 }
 
-drm_public int
+int
 nouveau_pushbuf_refn(struct nouveau_pushbuf *push,
 		     struct nouveau_pushbuf_refn *refs, int nr)
 {
 	return pushbuf_refn(push, true, refs, nr);
 }
 
-drm_public void
+void
 nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
 		      uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor)
 {
@@ -743,13 +743,13 @@ nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
 	push->cur++;
 }
 
-drm_public int
+int
 nouveau_pushbuf_validate(struct nouveau_pushbuf *push)
 {
 	return pushbuf_validate(push, true);
 }
 
-drm_public uint32_t
+uint32_t
 nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo)
 {
 	struct drm_nouveau_gem_pushbuf_bo *kref;
@@ -766,7 +766,7 @@ nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo)
 	return flags;
 }
 
-drm_public int
+int
 nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan)
 {
 	if (!push->channel)
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 7bc8984..ff83a93 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -92,7 +92,7 @@ static struct omap_device * omap_device_new_impl(int fd)
 	return dev;
 }
 
-drm_public struct omap_device * omap_device_new(int fd)
+struct omap_device * omap_device_new(int fd)
 {
 	struct omap_device *dev = NULL;
 
@@ -115,13 +115,13 @@ drm_public struct omap_device * omap_device_new(int fd)
 	return dev;
 }
 
-drm_public struct omap_device * omap_device_ref(struct omap_device *dev)
+struct omap_device * omap_device_ref(struct omap_device *dev)
 {
 	atomic_inc(&dev->refcnt);
 	return dev;
 }
 
-drm_public void omap_device_del(struct omap_device *dev)
+void omap_device_del(struct omap_device *dev)
 {
 	if (!atomic_dec_and_test(&dev->refcnt))
 		return;
@@ -132,7 +132,7 @@ drm_public void omap_device_del(struct omap_device *dev)
 	free(dev);
 }
 
-drm_public int
+int
 omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
 {
 	struct drm_omap_param req = {
@@ -150,7 +150,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
 	return 0;
 }
 
-drm_public int
+int
 omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value)
 {
 	struct drm_omap_param req = {
@@ -229,7 +229,7 @@ fail:
 
 
 /* allocate a new (un-tiled) buffer object */
-drm_public struct omap_bo *
+struct omap_bo *
 omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)
 {
 	union omap_gem_size gsize = {
@@ -242,7 +242,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)
 }
 
 /* allocate a new buffer object */
-drm_public struct omap_bo *
+struct omap_bo *
 omap_bo_new_tiled(struct omap_device *dev, uint32_t width,
 		  uint32_t height, uint32_t flags)
 {
@@ -258,7 +258,7 @@ omap_bo_new_tiled(struct omap_device *dev, uint32_t width,
 	return omap_bo_new_impl(dev, gsize, flags);
 }
 
-drm_public struct omap_bo *omap_bo_ref(struct omap_bo *bo)
+struct omap_bo *omap_bo_ref(struct omap_bo *bo)
 {
 	atomic_inc(&bo->refcnt);
 	return bo;
@@ -284,7 +284,7 @@ static int get_buffer_info(struct omap_bo *bo)
 }
 
 /* import a buffer object from DRI2 name */
-drm_public struct omap_bo *
+struct omap_bo *
 omap_bo_from_name(struct omap_device *dev, uint32_t name)
 {
 	struct omap_bo *bo = NULL;
@@ -318,7 +318,7 @@ fail:
  * fd so caller should close() the fd when it is otherwise done
  * with it (even if it is still using the 'struct omap_bo *')
  */
-drm_public struct omap_bo *
+struct omap_bo *
 omap_bo_from_dmabuf(struct omap_device *dev, int fd)
 {
 	struct omap_bo *bo = NULL;
@@ -350,7 +350,7 @@ fail:
 }
 
 /* destroy a buffer object */
-drm_public void omap_bo_del(struct omap_bo *bo)
+void omap_bo_del(struct omap_bo *bo)
 {
 	if (!bo) {
 		return;
@@ -383,7 +383,7 @@ drm_public void omap_bo_del(struct omap_bo *bo)
 }
 
 /* get the global flink/DRI2 buffer name */
-drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name)
+int omap_bo_get_name(struct omap_bo *bo, uint32_t *name)
 {
 	if (!bo->name) {
 		struct drm_gem_flink req = {
@@ -404,7 +404,7 @@ drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name)
 	return 0;
 }
 
-drm_public uint32_t omap_bo_handle(struct omap_bo *bo)
+uint32_t omap_bo_handle(struct omap_bo *bo)
 {
 	return bo->handle;
 }
@@ -412,7 +412,7 @@ drm_public uint32_t omap_bo_handle(struct omap_bo *bo)
 /* caller owns the dmabuf fd that is returned and is responsible
  * to close() it when done
  */
-drm_public int omap_bo_dmabuf(struct omap_bo *bo)
+int omap_bo_dmabuf(struct omap_bo *bo)
 {
 	if (!bo->fd) {
 		struct drm_prime_handle req = {
@@ -431,7 +431,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo)
 	return dup(bo->fd);
 }
 
-drm_public uint32_t omap_bo_size(struct omap_bo *bo)
+uint32_t omap_bo_size(struct omap_bo *bo)
 {
 	if (!bo->size) {
 		get_buffer_info(bo);
@@ -439,7 +439,7 @@ drm_public uint32_t omap_bo_size(struct omap_bo *bo)
 	return bo->size;
 }
 
-drm_public void *omap_bo_map(struct omap_bo *bo)
+void *omap_bo_map(struct omap_bo *bo)
 {
 	if (!bo->map) {
 		if (!bo->offset) {
@@ -455,7 +455,7 @@ drm_public void *omap_bo_map(struct omap_bo *bo)
 	return bo->map;
 }
 
-drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op)
+int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op)
 {
 	struct drm_omap_gem_cpu_prep req = {
 			.handle = bo->handle,
@@ -465,7 +465,7 @@ drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op)
 			DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req));
 }
 
-drm_public int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op)
+int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op)
 {
 	struct drm_omap_gem_cpu_fini req = {
 			.handle = bo->handle,
diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c
index 02a2d83..447f928 100644
--- a/radeon/radeon_bo.c
+++ b/radeon/radeon_bo.c
@@ -36,7 +36,7 @@
 #include <radeon_bo.h>
 #include <radeon_bo_int.h>
 
-drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op)
+void radeon_bo_debug(struct radeon_bo *bo, const char *op)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
 
@@ -44,7 +44,7 @@ drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op)
             op, bo, bo->handle, boi->size, boi->cref);
 }
 
-drm_public struct radeon_bo *
+struct radeon_bo *
 radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size,
 	       uint32_t alignment, uint32_t domains, uint32_t flags)
 {
@@ -53,14 +53,14 @@ radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size,
     return bo;
 }
 
-drm_public void radeon_bo_ref(struct radeon_bo *bo)
+void radeon_bo_ref(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     boi->cref++;
     boi->bom->funcs->bo_ref(boi);
 }
 
-drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo)
+struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     if (bo == NULL)
@@ -70,19 +70,19 @@ drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo)
     return boi->bom->funcs->bo_unref(boi);
 }
 
-drm_public int radeon_bo_map(struct radeon_bo *bo, int write)
+int radeon_bo_map(struct radeon_bo *bo, int write)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     return boi->bom->funcs->bo_map(boi, write);
 }
 
-drm_public int radeon_bo_unmap(struct radeon_bo *bo)
+int radeon_bo_unmap(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     return boi->bom->funcs->bo_unmap(boi);
 }
 
-drm_public int radeon_bo_wait(struct radeon_bo *bo)
+int radeon_bo_wait(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     if (!boi->bom->funcs->bo_wait)
@@ -90,13 +90,13 @@ drm_public int radeon_bo_wait(struct radeon_bo *bo)
     return boi->bom->funcs->bo_wait(boi);
 }
 
-drm_public int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain)
+int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     return boi->bom->funcs->bo_is_busy(boi, domain);
 }
 
-drm_public int
+int
 radeon_bo_set_tiling(struct radeon_bo *bo,
                      uint32_t tiling_flags, uint32_t pitch)
 {
@@ -104,7 +104,7 @@ radeon_bo_set_tiling(struct radeon_bo *bo,
     return boi->bom->funcs->bo_set_tiling(boi, tiling_flags, pitch);
 }
 
-drm_public int
+int
 radeon_bo_get_tiling(struct radeon_bo *bo,
                      uint32_t *tiling_flags, uint32_t *pitch)
 {
@@ -112,7 +112,7 @@ radeon_bo_get_tiling(struct radeon_bo *bo,
     return boi->bom->funcs->bo_get_tiling(boi, tiling_flags, pitch);
 }
 
-drm_public int radeon_bo_is_static(struct radeon_bo *bo)
+int radeon_bo_is_static(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     if (boi->bom->funcs->bo_is_static)
@@ -120,19 +120,19 @@ drm_public int radeon_bo_is_static(struct radeon_bo *bo)
     return 0;
 }
 
-drm_public int
+int
 radeon_bo_is_referenced_by_cs(struct radeon_bo *bo, struct radeon_cs *cs)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     return boi->cref > 1;
 }
 
-drm_public uint32_t radeon_bo_get_handle(struct radeon_bo *bo)
+uint32_t radeon_bo_get_handle(struct radeon_bo *bo)
 {
     return bo->handle;
 }
 
-drm_public uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo)
+uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
     uint32_t src_domain;
diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c
index b48cf54..7fdd437 100644
--- a/radeon/radeon_bo_gem.c
+++ b/radeon/radeon_bo_gem.c
@@ -283,7 +283,7 @@ static struct radeon_bo_funcs bo_gem_funcs = {
     bo_is_busy,
 };
 
-drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)
+struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)
 {
     struct bo_manager_gem *bomg;
 
@@ -296,7 +296,7 @@ drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)
     return (struct radeon_bo_manager*)bomg;
 }
 
-drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)
+void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)
 {
     struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom;
 
@@ -306,21 +306,21 @@ drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)
     free(bomg);
 }
 
-drm_public uint32_t
+uint32_t
 radeon_gem_name_bo(struct radeon_bo *bo)
 {
     struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
     return bo_gem->name;
 }
 
-drm_public void *
+void *
 radeon_gem_get_reloc_in_cs(struct radeon_bo *bo)
 {
     struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
     return &bo_gem->reloc_in_cs;
 }
 
-drm_public int
+int
 radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name)
 {
     struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
@@ -342,7 +342,7 @@ radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name)
     return 0;
 }
 
-drm_public int
+int
 radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain)
 {
     struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
@@ -360,7 +360,7 @@ radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t writ
     return r;
 }
 
-drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
+int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
 {
     struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
     int ret;
@@ -369,7 +369,7 @@ drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
     return ret;
 }
 
-drm_public struct radeon_bo *
+struct radeon_bo *
 radeon_gem_bo_open_prime(struct radeon_bo_manager *bom, int fd_handle, uint32_t size)
 {
     struct radeon_bo_gem *bo;
diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c
index 142b71f..dffb869 100644
--- a/radeon/radeon_cs.c
+++ b/radeon/radeon_cs.c
@@ -6,14 +6,14 @@
 #include "radeon_cs.h"
 #include "radeon_cs_int.h"
 
-drm_public struct radeon_cs *
+struct radeon_cs *
 radeon_cs_create(struct radeon_cs_manager *csm, uint32_t ndw)
 {
     struct radeon_cs_int *csi = csm->funcs->cs_create(csm, ndw);
     return (struct radeon_cs *)csi;
 }
 
-drm_public int
+int
 radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo,
                       uint32_t read_domain, uint32_t write_domain,
                       uint32_t flags)
@@ -27,7 +27,7 @@ radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo,
                                            flags);
 }
 
-drm_public int
+int
 radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw,
                 const char *file, const char *func, int line)
 {
@@ -35,7 +35,7 @@ radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw,
     return csi->csm->funcs->cs_begin(csi, ndw, file, func, line);
 }
 
-drm_public int
+int
 radeon_cs_end(struct radeon_cs *cs,
               const char *file, const char *func, int line)
 {
@@ -43,37 +43,37 @@ radeon_cs_end(struct radeon_cs *cs,
     return csi->csm->funcs->cs_end(csi, file, func, line);
 }
 
-drm_public int radeon_cs_emit(struct radeon_cs *cs)
+int radeon_cs_emit(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return csi->csm->funcs->cs_emit(csi);
 }
 
-drm_public int radeon_cs_destroy(struct radeon_cs *cs)
+int radeon_cs_destroy(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return csi->csm->funcs->cs_destroy(csi);
 }
 
-drm_public int radeon_cs_erase(struct radeon_cs *cs)
+int radeon_cs_erase(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return csi->csm->funcs->cs_erase(csi);
 }
 
-drm_public int radeon_cs_need_flush(struct radeon_cs *cs)
+int radeon_cs_need_flush(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return csi->csm->funcs->cs_need_flush(csi);
 }
 
-drm_public void radeon_cs_print(struct radeon_cs *cs, FILE *file)
+void radeon_cs_print(struct radeon_cs *cs, FILE *file)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     csi->csm->funcs->cs_print(csi, file);
 }
 
-drm_public void
+void
 radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
@@ -83,7 +83,7 @@ radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit)
         csi->csm->gart_limit = limit;
 }
 
-drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs, 
+void radeon_cs_space_set_flush(struct radeon_cs *cs, 
                                           void (*fn)(void *), void *data)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
@@ -91,7 +91,7 @@ drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs,
     csi->space_flush_data = data;
 }
 
-drm_public uint32_t radeon_cs_get_id(struct radeon_cs *cs)
+uint32_t radeon_cs_get_id(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return csi->id;
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index 86e0855..f91226f 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -536,7 +536,7 @@ static int radeon_get_device_id(int fd, uint32_t *device_id)
     return r;
 }
 
-drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)
+struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)
 {
     struct radeon_cs_manager_gem *csm;
 
@@ -550,7 +550,7 @@ drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)
     return &csm->base;
 }
 
-drm_public void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm)
+void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm)
 {
     free(csm);
 }
diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c
index 1a6ea28..69287be 100644
--- a/radeon/radeon_cs_space.c
+++ b/radeon/radeon_cs_space.c
@@ -165,7 +165,7 @@ static int radeon_cs_do_space_check(struct radeon_cs_int *cs, struct radeon_cs_s
     return RADEON_CS_SPACE_OK;
 }
 
-drm_public void
+void
 radeon_cs_space_add_persistent_bo(struct radeon_cs *cs, struct radeon_bo *bo,
                                   uint32_t read_domains, uint32_t write_domain)
 {
@@ -209,7 +209,7 @@ again:
     return 0;
 }
 
-drm_public int
+int
 radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo,
                               uint32_t read_domains, uint32_t write_domain)
 {
@@ -230,13 +230,13 @@ radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo,
     return ret;
 }
 
-drm_public int radeon_cs_space_check(struct radeon_cs *cs)
+int radeon_cs_space_check(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     return radeon_cs_check_space_internal(csi, NULL);
 }
 
-drm_public void radeon_cs_space_reset_bos(struct radeon_cs *cs)
+void radeon_cs_space_reset_bos(struct radeon_cs *cs)
 {
     struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
     int i;
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index fd75b16..fad4bda 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -2400,7 +2400,7 @@ static int cik_surface_best(struct radeon_surface_manager *surf_man,
 /* ===========================================================================
  * public API
  */
-drm_public struct radeon_surface_manager *
+struct radeon_surface_manager *
 radeon_surface_manager_new(int fd)
 {
     struct radeon_surface_manager *surf_man;
@@ -2449,7 +2449,7 @@ out_err:
     return NULL;
 }
 
-drm_public void
+void
 radeon_surface_manager_free(struct radeon_surface_manager *surf_man)
 {
     free(surf_man);
@@ -2522,7 +2522,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man,
     return 0;
 }
 
-drm_public int
+int
 radeon_surface_init(struct radeon_surface_manager *surf_man,
                     struct radeon_surface *surf)
 {
@@ -2539,7 +2539,7 @@ radeon_surface_init(struct radeon_surface_manager *surf_man,
     return surf_man->surface_init(surf_man, surf);
 }
 
-drm_public int
+int
 radeon_surface_best(struct radeon_surface_manager *surf_man,
                     struct radeon_surface *surf)
 {
diff --git a/tegra/tegra.c b/tegra/tegra.c
index f8d4078..f7dc89a 100644
--- a/tegra/tegra.c
+++ b/tegra/tegra.c
@@ -74,7 +74,6 @@ static int drm_tegra_wrap(struct drm_tegra **drmp, int fd, bool close)
 	return 0;
 }
 
-drm_public
 int drm_tegra_new(struct drm_tegra **drmp, int fd)
 {
 	bool supported = false;
@@ -95,7 +94,6 @@ int drm_tegra_new(struct drm_tegra **drmp, int fd)
 	return drm_tegra_wrap(drmp, fd, false);
 }
 
-drm_public
 void drm_tegra_close(struct drm_tegra *drm)
 {
 	if (!drm)
@@ -107,7 +105,6 @@ void drm_tegra_close(struct drm_tegra *drm)
 	free(drm);
 }
 
-drm_public
 int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,
 		     uint32_t flags, uint32_t size)
 {
@@ -146,7 +143,6 @@ int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,
 		      uint32_t handle, uint32_t flags, uint32_t size)
 {
@@ -170,7 +166,6 @@ int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,
 	return 0;
 }
 
-drm_public
 struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo)
 {
 	if (bo)
@@ -179,14 +174,12 @@ struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo)
 	return bo;
 }
 
-drm_public
 void drm_tegra_bo_unref(struct drm_tegra_bo *bo)
 {
 	if (bo && atomic_dec_and_test(&bo->ref))
 		drm_tegra_bo_free(bo);
 }
 
-drm_public
 int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle)
 {
 	if (!bo || !handle)
@@ -197,7 +190,6 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle)
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr)
 {
 	struct drm_tegra *drm = bo->drm;
@@ -230,7 +222,6 @@ int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr)
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
 {
 	if (!bo)
@@ -247,7 +238,6 @@ int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags)
 {
 	struct drm_tegra_gem_get_flags args;
@@ -271,7 +261,6 @@ int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags)
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags)
 {
 	struct drm_tegra_gem_get_flags args;
@@ -293,7 +282,6 @@ int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags)
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
 			    struct drm_tegra_bo_tiling *tiling)
 {
@@ -320,7 +308,6 @@ int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
 	return 0;
 }
 
-drm_public
 int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo,
 			    const struct drm_tegra_bo_tiling *tiling)
 {
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 16:15 ` [PATCH libdrm 02/24] radeon: remove empty function declarations Emil Velikov
@ 2015-04-01 17:30   ` Jerome Glisse
  2015-04-01 20:34     ` Emil Velikov
  0 siblings, 1 reply; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 17:30 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, dri-devel

On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
> Missing definition and unused since their introduction.
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme

> ---
>  radeon/bof.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/radeon/bof.h b/radeon/bof.h
> index 014affb..cb829a1 100644
> --- a/radeon/bof.h
> +++ b/radeon/bof.h
> @@ -51,10 +51,6 @@ typedef struct bof {
>  	long		offset;
>  } bof_t;
>  
> -extern int bof_file_flush(bof_t *root);
> -extern bof_t *bof_file_new(const char *filename);
> -extern int bof_object_dump(bof_t *object, const char *filename);
> -
>  /* object */
>  extern bof_t *bof_object(void);
>  extern bof_t *bof_object_get(bof_t *object, const char *keyname);
> -- 
> 2.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 03/24] radeon: remove unused functions
  2015-04-01 16:15 ` [PATCH libdrm 03/24] radeon: remove unused functions Emil Velikov
@ 2015-04-01 17:31   ` Jerome Glisse
  0 siblings, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 17:31 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, dri-devel

On Wed, Apr 01, 2015 at 05:15:14PM +0100, Emil Velikov wrote:
> Namely bof_load_file, bof_print, bof_object_get. Unused since their
> introduction according to git log.
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>


NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme

> ---
>  radeon/bof.c | 53 -----------------------------------------------------
>  radeon/bof.h |  3 ---
>  2 files changed, 56 deletions(-)
> 
> diff --git a/radeon/bof.c b/radeon/bof.c
> index 0598cc6..6f3760a 100644
> --- a/radeon/bof.c
> +++ b/radeon/bof.c
> @@ -61,18 +61,6 @@ bof_t *bof_object(void)
>  	return object;
>  }
>  
> -bof_t *bof_object_get(bof_t *object, const char *keyname)
> -{
> -	unsigned i;
> -
> -	for (i = 0; i < object->array_size; i += 2) {
> -		if (!strcmp(object->array[i]->value, keyname)) {
> -			return object->array[i + 1];
> -		}
> -	}
> -	return NULL;
> -}
> -
>  int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
>  {
>  	bof_t *key;
> @@ -271,11 +259,6 @@ static void bof_print_rec(bof_t *bof, int level, int entry)
>  	}
>  }
>  
> -void bof_print(bof_t *bof)
> -{
> -	bof_print_rec(bof, 0, 0);
> -}
> -
>  static int bof_read(bof_t *root, FILE *file, long end, int level)
>  {
>  	bof_t *bof = NULL;
> @@ -333,42 +316,6 @@ out_err:
>  	return -EINVAL;
>  }
>  
> -bof_t *bof_load_file(const char *filename)
> -{
> -	bof_t *root = bof_object();
> -	int r;
> -
> -	if (root == NULL) {
> -		fprintf(stderr, "%s failed to create root object\n", __func__);
> -		return NULL;
> -	}
> -	root->file = fopen(filename, "r");
> -	if (root->file == NULL)
> -		goto out_err;
> -	r = fseek(root->file, 0L, SEEK_SET);
> -	if (r) {
> -		fprintf(stderr, "%s failed to seek into file %s\n", __func__, filename);
> -		goto out_err;
> -	}
> -	root->offset = ftell(root->file);
> -	r = fread(&root->type, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = fread(&root->size, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = fread(&root->array_size, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = bof_read(root, root->file, root->offset + root->size, 2);
> -	if (r)
> -		goto out_err;
> -	return root;
> -out_err:
> -	bof_decref(root);
> -	return NULL;
> -}
> -
>  void bof_incref(bof_t *bof)
>  {
>  	bof->refcount++;
> diff --git a/radeon/bof.h b/radeon/bof.h
> index cb829a1..8e952c1 100644
> --- a/radeon/bof.h
> +++ b/radeon/bof.h
> @@ -53,7 +53,6 @@ typedef struct bof {
>  
>  /* object */
>  extern bof_t *bof_object(void);
> -extern bof_t *bof_object_get(bof_t *object, const char *keyname);
>  extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
>  /* array */
>  extern bof_t *bof_array(void);
> @@ -72,9 +71,7 @@ extern int32_t bof_int32_value(bof_t *bof);
>  /* common functions */
>  extern void bof_decref(bof_t *bof);
>  extern void bof_incref(bof_t *bof);
> -extern bof_t *bof_load_file(const char *filename);
>  extern int bof_dump_file(bof_t *bof, const char *filename);
> -extern void bof_print(bof_t *bof);
>  
>  static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
>  static inline int bof_is_blob(bof_t *bof){return (bof->type == BOF_TYPE_BLOB);}
> -- 
> 2.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static
  2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
@ 2015-04-01 17:31   ` Jerome Glisse
  2015-04-01 17:32   ` Jerome Glisse
  1 sibling, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 17:31 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, dri-devel

On Wed, Apr 01, 2015 at 05:15:15PM +0100, Emil Velikov wrote:
> Used locally in bof.c.
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme

> ---
>  radeon/bof.c | 96 ++++++++++++++++++++++++++++++------------------------------
>  radeon/bof.h |  3 --
>  2 files changed, 48 insertions(+), 51 deletions(-)
> 
> diff --git a/radeon/bof.c b/radeon/bof.c
> index 6f3760a..20901a0 100644
> --- a/radeon/bof.c
> +++ b/radeon/bof.c
> @@ -45,6 +45,54 @@ static int bof_entry_grow(bof_t *bof)
>  	return 0;
>  }
>  
> +static void bof_incref(bof_t *bof)
> +{
> +	bof->refcount++;
> +}
> +
> +void bof_decref(bof_t *bof)
> +{
> +	unsigned i;
> +
> +	if (bof == NULL)
> +		return;
> +	if (--bof->refcount > 0)
> +		return;
> +	for (i = 0; i < bof->array_size; i++) {
> +		bof_decref(bof->array[i]);
> +		bof->array[i] = NULL;
> +	}
> +	bof->array_size = 0;
> +	if (bof->file) {
> +		fclose(bof->file);
> +		bof->file = NULL;
> +	}
> +	free(bof->array);
> +	free(bof->value);
> +	free(bof);
> +}
> +
> +/*
> + * string
> + */
> +static bof_t *bof_string(const char *value)
> +{
> +	bof_t *string = bof_object();
> +
> +	if (string == NULL)
> +		return NULL;
> +	string->type = BOF_TYPE_STRING;
> +	string->size = strlen(value) + 1;
> +	string->value = calloc(1, string->size);
> +	if (string->value == NULL) {
> +		bof_decref(string);
> +		return NULL;
> +	}
> +	strcpy(string->value, value);
> +	string->size += 12;
> +	return string;
> +}
> +
>  /*
>   * object 
>   */
> @@ -160,27 +208,6 @@ void *bof_blob_value(bof_t *bof)
>  }
>  
>  /*
> - * string
> - */
> -bof_t *bof_string(const char *value)
> -{
> -	bof_t *string = bof_object();
> -
> -	if (string == NULL)
> -		return NULL;
> -	string->type = BOF_TYPE_STRING;
> -	string->size = strlen(value) + 1;
> -	string->value = calloc(1, string->size);
> -	if (string->value == NULL) {
> -		bof_decref(string);
> -		return NULL;
> -	}
> -	strcpy(string->value, value);
> -	string->size += 12;
> -	return string;
> -}
> -
> -/*
>   *  int32
>   */
>  bof_t *bof_int32(int32_t value)
> @@ -316,33 +343,6 @@ out_err:
>  	return -EINVAL;
>  }
>  
> -void bof_incref(bof_t *bof)
> -{
> -	bof->refcount++;
> -}
> -
> -void bof_decref(bof_t *bof)
> -{
> -	unsigned i;
> -
> -	if (bof == NULL)
> -		return;
> -	if (--bof->refcount > 0)
> -		return;
> -	for (i = 0; i < bof->array_size; i++) {
> -		bof_decref(bof->array[i]);
> -		bof->array[i] = NULL;
> -	}
> -	bof->array_size = 0;
> -	if (bof->file) {
> -		fclose(bof->file);
> -		bof->file = NULL;
> -	}
> -	free(bof->array);
> -	free(bof->value);
> -	free(bof);
> -}
> -
>  static int bof_file_write(bof_t *bof, FILE *file)
>  {
>  	unsigned i;
> diff --git a/radeon/bof.h b/radeon/bof.h
> index 8e952c1..4dae923 100644
> --- a/radeon/bof.h
> +++ b/radeon/bof.h
> @@ -63,14 +63,11 @@ extern unsigned bof_array_size(bof_t *bof);
>  extern bof_t *bof_blob(unsigned size, void *value);
>  extern unsigned bof_blob_size(bof_t *bof);
>  extern void *bof_blob_value(bof_t *bof);
> -/* string */
> -extern bof_t *bof_string(const char *value);
>  /* int32 */
>  extern bof_t *bof_int32(int32_t value);
>  extern int32_t bof_int32_value(bof_t *bof);
>  /* common functions */
>  extern void bof_decref(bof_t *bof);
> -extern void bof_incref(bof_t *bof);
>  extern int bof_dump_file(bof_t *bof, const char *filename);
>  
>  static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
> -- 
> 2.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static
  2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
  2015-04-01 17:31   ` Jerome Glisse
@ 2015-04-01 17:32   ` Jerome Glisse
  1 sibling, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 17:32 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, dri-devel

On Wed, Apr 01, 2015 at 05:15:15PM +0100, Emil Velikov wrote:
> Used locally in bof.c.
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>


NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme

> ---
>  radeon/bof.c | 96 ++++++++++++++++++++++++++++++------------------------------
>  radeon/bof.h |  3 --
>  2 files changed, 48 insertions(+), 51 deletions(-)
> 
> diff --git a/radeon/bof.c b/radeon/bof.c
> index 6f3760a..20901a0 100644
> --- a/radeon/bof.c
> +++ b/radeon/bof.c
> @@ -45,6 +45,54 @@ static int bof_entry_grow(bof_t *bof)
>  	return 0;
>  }
>  
> +static void bof_incref(bof_t *bof)
> +{
> +	bof->refcount++;
> +}
> +
> +void bof_decref(bof_t *bof)
> +{
> +	unsigned i;
> +
> +	if (bof == NULL)
> +		return;
> +	if (--bof->refcount > 0)
> +		return;
> +	for (i = 0; i < bof->array_size; i++) {
> +		bof_decref(bof->array[i]);
> +		bof->array[i] = NULL;
> +	}
> +	bof->array_size = 0;
> +	if (bof->file) {
> +		fclose(bof->file);
> +		bof->file = NULL;
> +	}
> +	free(bof->array);
> +	free(bof->value);
> +	free(bof);
> +}
> +
> +/*
> + * string
> + */
> +static bof_t *bof_string(const char *value)
> +{
> +	bof_t *string = bof_object();
> +
> +	if (string == NULL)
> +		return NULL;
> +	string->type = BOF_TYPE_STRING;
> +	string->size = strlen(value) + 1;
> +	string->value = calloc(1, string->size);
> +	if (string->value == NULL) {
> +		bof_decref(string);
> +		return NULL;
> +	}
> +	strcpy(string->value, value);
> +	string->size += 12;
> +	return string;
> +}
> +
>  /*
>   * object 
>   */
> @@ -160,27 +208,6 @@ void *bof_blob_value(bof_t *bof)
>  }
>  
>  /*
> - * string
> - */
> -bof_t *bof_string(const char *value)
> -{
> -	bof_t *string = bof_object();
> -
> -	if (string == NULL)
> -		return NULL;
> -	string->type = BOF_TYPE_STRING;
> -	string->size = strlen(value) + 1;
> -	string->value = calloc(1, string->size);
> -	if (string->value == NULL) {
> -		bof_decref(string);
> -		return NULL;
> -	}
> -	strcpy(string->value, value);
> -	string->size += 12;
> -	return string;
> -}
> -
> -/*
>   *  int32
>   */
>  bof_t *bof_int32(int32_t value)
> @@ -316,33 +343,6 @@ out_err:
>  	return -EINVAL;
>  }
>  
> -void bof_incref(bof_t *bof)
> -{
> -	bof->refcount++;
> -}
> -
> -void bof_decref(bof_t *bof)
> -{
> -	unsigned i;
> -
> -	if (bof == NULL)
> -		return;
> -	if (--bof->refcount > 0)
> -		return;
> -	for (i = 0; i < bof->array_size; i++) {
> -		bof_decref(bof->array[i]);
> -		bof->array[i] = NULL;
> -	}
> -	bof->array_size = 0;
> -	if (bof->file) {
> -		fclose(bof->file);
> -		bof->file = NULL;
> -	}
> -	free(bof->array);
> -	free(bof->value);
> -	free(bof);
> -}
> -
>  static int bof_file_write(bof_t *bof, FILE *file)
>  {
>  	unsigned i;
> diff --git a/radeon/bof.h b/radeon/bof.h
> index 8e952c1..4dae923 100644
> --- a/radeon/bof.h
> +++ b/radeon/bof.h
> @@ -63,14 +63,11 @@ extern unsigned bof_array_size(bof_t *bof);
>  extern bof_t *bof_blob(unsigned size, void *value);
>  extern unsigned bof_blob_size(bof_t *bof);
>  extern void *bof_blob_value(bof_t *bof);
> -/* string */
> -extern bof_t *bof_string(const char *value);
>  /* int32 */
>  extern bof_t *bof_int32(int32_t value);
>  extern int32_t bof_int32_value(bof_t *bof);
>  /* common functions */
>  extern void bof_decref(bof_t *bof);
> -extern void bof_incref(bof_t *bof);
>  extern int bof_dump_file(bof_t *bof, const char *filename);
>  
>  static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
> -- 
> 2.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 05/24] radeon: remove more unused functions
  2015-04-01 16:15 ` [PATCH libdrm 05/24] radeon: remove more unused functions Emil Velikov
@ 2015-04-01 17:32   ` Jerome Glisse
  0 siblings, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 17:32 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, dri-devel

On Wed, Apr 01, 2015 at 05:15:16PM +0100, Emil Velikov wrote:
> bof_array_{get,size} and bof_blob_{size,value}. All of which unused
> since their introduction with commit 78de69713d7(drm/radeon: add new cs
> command stream dumping facilities)
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 17:30   ` Jerome Glisse
@ 2015-04-01 20:34     ` Emil Velikov
  2015-04-01 20:57       ` Emil Velikov
  2015-04-01 21:24       ` Jerome Glisse
  0 siblings, 2 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 20:34 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Jerome Glisse, ML dri-devel

On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
> On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
>> Missing definition and unused since their introduction.
>>
>> Cc: Jerome Glisse <jglisse@redhat.com>
>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>
> NAK
>
> I use all this in tools to debug lockup. Best course of action is to
> exclude bof.h from being distributed. My tools static link and i just
> point them to libdrm git tree.
>
Did not notice any mention of such out-of-tree tools in the commit
that introduced these functions, so I've naively assumed that they are
unused. Sorry about that. Do you mind if I add a note about it, or
alternatively will you be ok with pushing your tool to libdrm ? The
Intel team already have a test_decode tool in, which is similar in
nature.

I'm not sure that your suggestion will work - one cannot exclude bof.h
(and bof.c) from the distribution as it's used by radeon_cs_gem.c.
Annotating the symbols as hidden/private should work for everyone. How
does that sound ?

...
>> -extern int bof_file_flush(bof_t *root);
>> -extern bof_t *bof_file_new(const char *filename);
>> -extern int bof_object_dump(bof_t *object, const char *filename);
>> -
Can you please elaborate how you are using these three, do you have
them implemented outside of libdrm as well ?

Cheers,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 20:34     ` Emil Velikov
@ 2015-04-01 20:57       ` Emil Velikov
  2015-04-01 21:26         ` Jerome Glisse
  2015-04-01 21:24       ` Jerome Glisse
  1 sibling, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 20:57 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Jerome Glisse, ML dri-devel

On 1 April 2015 at 21:34, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
>> On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
>>> Missing definition and unused since their introduction.
>>>
>>> Cc: Jerome Glisse <jglisse@redhat.com>
>>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>>
>> NAK
>>
>> I use all this in tools to debug lockup. Best course of action is to
>> exclude bof.h from being distributed. My tools static link and i just
>> point them to libdrm git tree.
>>
> Did not notice any mention of such out-of-tree tools in the commit
> that introduced these functions, so I've naively assumed that they are
> unused.
Scratch that - I'm blind.

Upon closer look at your radeondb repo, I cannot see any static
linking in there. Also it seems that some of the functionality is
duplicated between the two. With the radeondb version being out of
date :'(

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 20:34     ` Emil Velikov
  2015-04-01 20:57       ` Emil Velikov
@ 2015-04-01 21:24       ` Jerome Glisse
  1 sibling, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 21:24 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, ML dri-devel

On Wed, Apr 01, 2015 at 09:34:05PM +0100, Emil Velikov wrote:
> On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
> > On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
> >> Missing definition and unused since their introduction.
> >>
> >> Cc: Jerome Glisse <jglisse@redhat.com>
> >> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> >
> > NAK
> >
> > I use all this in tools to debug lockup. Best course of action is to
> > exclude bof.h from being distributed. My tools static link and i just
> > point them to libdrm git tree.
> >
> Did not notice any mention of such out-of-tree tools in the commit
> that introduced these functions, so I've naively assumed that they are
> unused. Sorry about that. Do you mind if I add a note about it, or
> alternatively will you be ok with pushing your tool to libdrm ? The
> Intel team already have a test_decode tool in, which is similar in
> nature.

It would need cleanup before this can happen, saddly my schedule is kind
of full for foreseeable future. So i do not want to commit to do such thing.
But i definitly use the bof feature, last time was a month or so ago to
debug something. It have been very usefull to me in the past and i expect
for as long as the radeon ddx stays releavant it will be in the future.

But with the advance of the modesetting ddx and glamor, the tracing that
does exist in mesa will be as easy as the bof tracing. If not easier. So
i am not sure of the value there is into putting effort into this.

This kind of feature is really usefull when debugging lockup, at least
this allow me to bisect offend command stream to pin point the last
dword before lockup and thus get a clue about what kind of cmd is the
root cause. Dunno how others dev do such thing.

> I'm not sure that your suggestion will work - one cannot exclude bof.h
> (and bof.c) from the distribution as it's used by radeon_cs_gem.c.
> Annotating the symbols as hidden/private should work for everyone. How
> does that sound ?

I do not see how this is an issue, symbol needed by radeon_cs_gem can
be hidden from other and thus there is no point into shipping bof.h
Really no symbol need to be exported, iirc i tend to ln -s the bof
files in my tools or simply cp the lastest version from libdrm into
a local copy but i still need bof.h to have all symbol listed.

Cheers,
Jérôme

> 
> ...
> >> -extern int bof_file_flush(bof_t *root);
> >> -extern bof_t *bof_file_new(const char *filename);
> >> -extern int bof_object_dump(bof_t *object, const char *filename);
> >> -
> Can you please elaborate how you are using these three, do you have
> them implemented outside of libdrm as well ?
> 
> Cheers,
> Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 20:57       ` Emil Velikov
@ 2015-04-01 21:26         ` Jerome Glisse
  2015-04-01 22:04           ` Emil Velikov
  0 siblings, 1 reply; 45+ messages in thread
From: Jerome Glisse @ 2015-04-01 21:26 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, ML dri-devel

On Wed, Apr 01, 2015 at 09:57:40PM +0100, Emil Velikov wrote:
> On 1 April 2015 at 21:34, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> > On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
> >> On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
> >>> Missing definition and unused since their introduction.
> >>>
> >>> Cc: Jerome Glisse <jglisse@redhat.com>
> >>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> >>
> >> NAK
> >>
> >> I use all this in tools to debug lockup. Best course of action is to
> >> exclude bof.h from being distributed. My tools static link and i just
> >> point them to libdrm git tree.
> >>
> > Did not notice any mention of such out-of-tree tools in the commit
> > that introduced these functions, so I've naively assumed that they are
> > unused.
> Scratch that - I'm blind.
> 
> Upon closer look at your radeondb repo, I cannot see any static
> linking in there. Also it seems that some of the functionality is
> duplicated between the two. With the radeondb version being out of
> date :'(

Yeah i guess i never pushed anywhere patches that did that, divergence btw
my memory and what is out there. All this symbol can just be hidden and
never exported. It would cleaner, but i still need the bof.h intact as i
tend to just cp it afaict into my local radeondb copy so that i am in
sync with libdrm code.

Cheers,
Jérôme

> 
> -Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 21:26         ` Jerome Glisse
@ 2015-04-01 22:04           ` Emil Velikov
  2015-04-02  3:51             ` Jerome Glisse
  0 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-01 22:04 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Jerome Glisse, ML dri-devel

On 1 April 2015 at 22:26, Jerome Glisse <j.glisse@gmail.com> wrote:
> On Wed, Apr 01, 2015 at 09:57:40PM +0100, Emil Velikov wrote:
>> On 1 April 2015 at 21:34, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> > On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
>> >> On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
>> >>> Missing definition and unused since their introduction.
>> >>>
>> >>> Cc: Jerome Glisse <jglisse@redhat.com>
>> >>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>> >>
>> >> NAK
>> >>
>> >> I use all this in tools to debug lockup. Best course of action is to
>> >> exclude bof.h from being distributed. My tools static link and i just
>> >> point them to libdrm git tree.
>> >>
>> > Did not notice any mention of such out-of-tree tools in the commit
>> > that introduced these functions, so I've naively assumed that they are
>> > unused.
>> Scratch that - I'm blind.
>>
>> Upon closer look at your radeondb repo, I cannot see any static
>> linking in there. Also it seems that some of the functionality is
>> duplicated between the two. With the radeondb version being out of
>> date :'(
>
> Yeah i guess i never pushed anywhere patches that did that, divergence btw
> my memory and what is out there. All this symbol can just be hidden and
> never exported. It would cleaner, but i still need the bof.h intact as i
> tend to just cp it afaict into my local radeondb copy so that i am in
> sync with libdrm code.
>
I can volunteer with the cleanup/integration of radeondb next to
libdrm_radeon. If you update your repo (or push your work elsewhere),
I could double-check, integrate and nuke the duplication. It will
avoid the next person from coming over and trying to nuke things, the
divergence mentioned, plus the copy/pasting of bof.[ch] every time you
use the tool.

How does that sound ?

Cheers,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 07/24] radeon: annotate the private symbols
  2015-04-01 16:15 ` [PATCH libdrm 07/24] radeon: annotate the private symbols Emil Velikov
@ 2015-04-02  2:48   ` Michel Dänzer
  2015-04-02  3:57     ` Jerome Glisse
  0 siblings, 1 reply; 45+ messages in thread
From: Michel Dänzer @ 2015-04-02  2:48 UTC (permalink / raw)
  To: Emil Velikov; +Cc: dri-devel

On 02.04.2015 01:15, Emil Velikov wrote:
> They are less and easier to track than the public ones.

Grammar: s/less/fewer/


Other than that, this patch and patch 8 are

Acked-by: Michel Dänzer <michel.daenzer@amd.com>

though I'm not sure about the impact of Jerome's objection to previous
patches on this one.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 02/24] radeon: remove empty function declarations
  2015-04-01 22:04           ` Emil Velikov
@ 2015-04-02  3:51             ` Jerome Glisse
  0 siblings, 0 replies; 45+ messages in thread
From: Jerome Glisse @ 2015-04-02  3:51 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Jerome Glisse, ML dri-devel

On Wed, Apr 01, 2015 at 11:04:45PM +0100, Emil Velikov wrote:
> On 1 April 2015 at 22:26, Jerome Glisse <j.glisse@gmail.com> wrote:
> > On Wed, Apr 01, 2015 at 09:57:40PM +0100, Emil Velikov wrote:
> >> On 1 April 2015 at 21:34, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> >> > On 1 April 2015 at 18:30, Jerome Glisse <j.glisse@gmail.com> wrote:
> >> >> On Wed, Apr 01, 2015 at 05:15:13PM +0100, Emil Velikov wrote:
> >> >>> Missing definition and unused since their introduction.
> >> >>>
> >> >>> Cc: Jerome Glisse <jglisse@redhat.com>
> >> >>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> >> >>
> >> >> NAK
> >> >>
> >> >> I use all this in tools to debug lockup. Best course of action is to
> >> >> exclude bof.h from being distributed. My tools static link and i just
> >> >> point them to libdrm git tree.
> >> >>
> >> > Did not notice any mention of such out-of-tree tools in the commit
> >> > that introduced these functions, so I've naively assumed that they are
> >> > unused.
> >> Scratch that - I'm blind.
> >>
> >> Upon closer look at your radeondb repo, I cannot see any static
> >> linking in there. Also it seems that some of the functionality is
> >> duplicated between the two. With the radeondb version being out of
> >> date :'(
> >
> > Yeah i guess i never pushed anywhere patches that did that, divergence btw
> > my memory and what is out there. All this symbol can just be hidden and
> > never exported. It would cleaner, but i still need the bof.h intact as i
> > tend to just cp it afaict into my local radeondb copy so that i am in
> > sync with libdrm code.
> >
> I can volunteer with the cleanup/integration of radeondb next to
> libdrm_radeon. If you update your repo (or push your work elsewhere),
> I could double-check, integrate and nuke the duplication. It will
> avoid the next person from coming over and trying to nuke things, the
> divergence mentioned, plus the copy/pasting of bof.[ch] every time you
> use the tool.
> 
> How does that sound ?

If you feel like it yes, but as i said i fear bof will stay relevant
only for the duration xf86-video-ati is and i fear with the advance
of the generic modesetting and glamor acceleration this might not last
long. As mesa is using a different scheme to allow capture and replay
of cs.

Anyway, the only tool that matter regarding bof is bofreplay from my
joujou repository

git://people.freedesktop.org/~glisse/joujou

I used to have a tool to allow bisecting bof cs but it might have been
lost in translation somewhere. Thought all is needed is a parameter to
bofreplay to limit the number of dwords replayed.

Happy coding if you decide to go down that road :)

Cheers,
Jérôme


> 
> Cheers,
> Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 07/24] radeon: annotate the private symbols
  2015-04-02  2:48   ` Michel Dänzer
@ 2015-04-02  3:57     ` Jerome Glisse
  2015-04-02 23:10       ` Emil Velikov
  0 siblings, 1 reply; 45+ messages in thread
From: Jerome Glisse @ 2015-04-02  3:57 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Emil Velikov, dri-devel

On Thu, Apr 02, 2015 at 11:48:25AM +0900, Michel Dänzer wrote:
> On 02.04.2015 01:15, Emil Velikov wrote:
> > They are less and easier to track than the public ones.
> 
> Grammar: s/less/fewer/
> 
> 
> Other than that, this patch and patch 8 are
> 
> Acked-by: Michel Dänzer <michel.daenzer@amd.com>
> 
> though I'm not sure about the impact of Jerome's objection to previous
> patches on this one.

Yes same apply, adding drm specific define would break my cping of those
file to my tools. But if Emil feels like adding bofreplay to libdrm i do
not have any objection.

Thought using some macro trickery inside bof.h this can be work around.

Cheers,
Jérôme

> 
> 
> -- 
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 07/24] radeon: annotate the private symbols
  2015-04-02  3:57     ` Jerome Glisse
@ 2015-04-02 23:10       ` Emil Velikov
  2015-04-05 15:29         ` [PATCH libdrm v2 02/19] radeon: move bof.[ch] out of libdrm_radeon Emil Velikov
  0 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-02 23:10 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Michel Dänzer, ML dri-devel

On 2 April 2015 at 04:57, Jerome Glisse <j.glisse@gmail.com> wrote:
> On Thu, Apr 02, 2015 at 11:48:25AM +0900, Michel Dänzer wrote:
>> On 02.04.2015 01:15, Emil Velikov wrote:
>> > They are less and easier to track than the public ones.
>>
>> Grammar: s/less/fewer/
>>
>>
>> Other than that, this patch and patch 8 are
>>
>> Acked-by: Michel Dänzer <michel.daenzer@amd.com>
>>
>> though I'm not sure about the impact of Jerome's objection to previous
>> patches on this one.
>
> Yes same apply, adding drm specific define would break my cping of those
> file to my tools. But if Emil feels like adding bofreplay to libdrm i do
> not have any objection.
>
> Thought using some macro trickery inside bof.h this can be work around.
>
Actually the cleanest/quickest solution would be to move bof.[ch] from
libdrm_radeon_la_SOURCES to EXTRA_DIST. This way we won't need any of
these patches,. Plus if one wants to use bof via radeon_cs_gem, they
will have to change one more line (apart from the current CS_BOF_DUMP)
- add the sources into libdrm_radeon_la_SOURCES. I'll add a note about
it next to the define.

As we import bofreplay we can rework things to be more elegant. How
does that sound ?

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH libdrm v2 02/19] radeon: move bof.[ch] out of libdrm_radeon
  2015-04-02 23:10       ` Emil Velikov
@ 2015-04-05 15:29         ` Emil Velikov
  0 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-05 15:29 UTC (permalink / raw)
  To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov

The functions(files) are used if one explicitly modifies radeon_cs_gem.c
by setting CS_BOF_DUMP to 1. As bof.[ch] is used (copied) to other
out-of-tree projects, keep them around in the distribution tarball.

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---

This will essentially replaces patches 02-07 (inclusive) and bof.[ch]
will be left unchanged :-)

Cheers
Emil
---
 radeon/Makefile.am      | 2 +-
 radeon/Makefile.sources | 8 +++++---
 radeon/radeon_cs_gem.c  | 5 ++++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 5cca394..1e4c869 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -44,4 +44,4 @@ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_radeon.pc
 
-EXTRA_DIST = Android.mk
+EXTRA_DIST = Android.mk $(LIBDRM_RADEON_BOF_FILES)
diff --git a/radeon/Makefile.sources b/radeon/Makefile.sources
index a17701a..1cf482a 100644
--- a/radeon/Makefile.sources
+++ b/radeon/Makefile.sources
@@ -4,9 +4,7 @@ LIBDRM_RADEON_FILES := \
 	radeon_cs_space.c \
 	radeon_bo.c \
 	radeon_cs.c \
-	radeon_surface.c \
-	bof.c \
-	bof.h
+	radeon_surface.c
 
 LIBDRM_RADEON_H_FILES := \
 	radeon_bo.h \
@@ -17,3 +15,7 @@ LIBDRM_RADEON_H_FILES := \
 	radeon_bo_int.h \
 	radeon_cs_int.h \
 	r600_pci_ids.h
+
+LIBDRM_RADEON_BOF_FILES := \
+	bof.c \
+	bof.h
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index 705ee05..81b3184 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -48,9 +48,12 @@
 #include "xf86drm.h"
 #include "xf86atomic.h"
 #include "radeon_drm.h"
-#include "bof.h"
 
+/* Add LIBDRM_RADEON_BOF_FILES to libdrm_radeon_la_SOURCES when building with BOF_DUMP */
 #define CS_BOF_DUMP 0
+#if CS_BOF_DUMP
+#include "bof.h"
+#endif
 
 struct radeon_cs_manager_gem {
     struct radeon_cs_manager    base;
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks
  2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
@ 2015-04-08  0:18   ` Alan Coopersmith
  0 siblings, 0 replies; 45+ messages in thread
From: Alan Coopersmith @ 2015-04-08  0:18 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Thierry Reding, dri-devel

On 04/ 1/15 09:15 AM, Emil Velikov wrote:
> The former does not imply the latter and vice-versa. One such example is
> the Sun compiler.
>
> v2: Add missing closing brakets. (Alan)

s/brakets/brackets/

Other than that, looks good to me.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

>
> Cc: Alan Coopersmith <alan.coopersmith@oracle.com>
> Cc: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>   configure.ac | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 155d577..76cf91e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -415,12 +415,17 @@ if test "x$GCC" = xyes; then
>
>       # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
>       CFLAGS=$save_CFLAGS
> +    AC_SUBST([VISIBILITY_CFLAGS])
> +fi
>
> -    if test "x$VISIBILITY_CFLAGS" != x; then
> -        AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler has -fvisibility support])
> -    fi
> +AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))])
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([
> +    int foo_default( void ) __attribute__((visibility("default")));
> +    int foo_hidden( void ) __attribute__((visibility("hidden")));
> +])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]));
>
> -    AC_SUBST([VISIBILITY_CFLAGS])
> +if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then
> +    AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))])
>   fi
>
>   AC_SUBST(WARN_CFLAGS)
>


-- 
	-Alan Coopersmith-              alan.coopersmith@oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds
  2015-04-01 16:15 ` [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds Emil Velikov
@ 2015-04-09 14:56   ` Emil Velikov
  2015-04-10  6:05     ` Eric Anholt
  0 siblings, 1 reply; 45+ messages in thread
From: Emil Velikov @ 2015-04-09 14:56 UTC (permalink / raw)
  To: ML dri-devel; +Cc: Emil Velikov

Humble ping.

Eric, can you please confirm if this and the follow up patch look ok.

Thanks
Emil

On 1 April 2015 at 17:15, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Added with commit 57b4c4c32d3(Move the renaming of mm.c symbols to
> symbol duplication/collision with ones that are available elsewhere.
>
> As the public/private symbols of libdrm are properly annotated neither
> one of the symbols will end up in the global name-space, thus should no
> longer be required.
>
> Eric,
> Does this sound correct, or there is something more subtle in there ?
>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  intel/mm.h | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/intel/mm.h b/intel/mm.h
> index 8a5235b..a6ee102 100644
> --- a/intel/mm.h
> +++ b/intel/mm.h
> @@ -38,16 +38,6 @@ struct mem_block {
>         unsigned int reserved:1;
>  };
>
> -/* Rename the variables in the drm copy of this code so that it doesn't
> - * conflict with mesa or whoever else has copied it around.
> - */
> -#define mmInit drm_mmInit
> -#define mmAllocMem drm_mmAllocMem
> -#define mmFreeMem drm_mmFreeMem
> -#define mmFindBlock drm_mmFindBlock
> -#define mmDestroy drm_mmDestroy
> -#define mmDumpMemInfo drm_mmDumpMemInfo
> -
>  /**
>   * input: total size in bytes
>   * return: a heap pointer if OK, NULL if error
> --
> 2.3.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds
  2015-04-09 14:56   ` Emil Velikov
@ 2015-04-10  6:05     ` Eric Anholt
  2015-04-10 17:40       ` Emil Velikov
  0 siblings, 1 reply; 45+ messages in thread
From: Eric Anholt @ 2015-04-10  6:05 UTC (permalink / raw)
  To: ML dri-devel; +Cc: Emil Velikov


[-- Attachment #1.1: Type: text/plain, Size: 203 bytes --]

Emil Velikov <emil.l.velikov@gmail.com> writes:

> Humble ping.
>
> Eric, can you please confirm if this and the follow up patch look ok.

Seems reasonable if you've verified the symbols aren't exposed.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds
  2015-04-10  6:05     ` Eric Anholt
@ 2015-04-10 17:40       ` Emil Velikov
  0 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-10 17:40 UTC (permalink / raw)
  To: Eric Anholt, ML dri-devel; +Cc: emil.l.velikov

On 10/04/15 06:05, Eric Anholt wrote:
> Emil Velikov <emil.l.velikov@gmail.com> writes:
> 
>> Humble ping.
>>
>> Eric, can you please confirm if this and the follow up patch look ok.
> 
> Seems reasonable if you've verified the symbols aren't exposed.
> 
Neither the dri modules (i9[16]5_dri.so) nor libdrm_intel exports these.
Are there any other components that I should take a look at?

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro
  2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
                   ` (23 preceding siblings ...)
  2015-04-01 16:15 ` [PATCH libdrm 24/24] drm: remove drm_public macro Emil Velikov
@ 2015-04-21 15:41 ` Emil Velikov
  24 siblings, 0 replies; 45+ messages in thread
From: Emil Velikov @ 2015-04-21 15:41 UTC (permalink / raw)
  To: ML dri-devel; +Cc: Emil Velikov

Hi all,

Pretty much all the feedback that I've received has been addressed. If
you have anything to share please go ahead, otherwise I will be
pushing this tomorrow/the day after.

Thanks
Emil

On 1 April 2015 at 17:15, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Hi all,
>
> As mentioned by Alan, some compilers do not like it when the symbol
> declaration and definition differ wrt their visibility attribute.
>
> Afaict there are three ways to handle this;
>  - Add the drm_public macro into the public headers, and annotate the
> declarations.
>  - Use version script to limit the exported symbols.
>  - Remove the drm_public macro/VISIBILITY_CFLAGS and annotate the
> private symbols.
>
> From the above three I believe that 3) is the better one as:
>  - it does not add drm_public to the library API,
>  - does not rely on features that some platform may be missing (or
> require singling out every platform in the configure.ac script).
>
> So I've went ahead with 3), added a few tests and wired them to
> `make check' so that one can easily catch problems.
>
> I have checked that the libraries do not export any new symbols and the
> scripts work as intended nearly a dozen times :-)
>
> The whole series can be found in branch reannotate-symbols at
> https://github.com/evelikov/libdrm
>
> Cheers,
> Emil
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2015-04-21 15:41 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
2015-04-08  0:18   ` Alan Coopersmith
2015-04-01 16:15 ` [PATCH libdrm 02/24] radeon: remove empty function declarations Emil Velikov
2015-04-01 17:30   ` Jerome Glisse
2015-04-01 20:34     ` Emil Velikov
2015-04-01 20:57       ` Emil Velikov
2015-04-01 21:26         ` Jerome Glisse
2015-04-01 22:04           ` Emil Velikov
2015-04-02  3:51             ` Jerome Glisse
2015-04-01 21:24       ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 03/24] radeon: remove unused functions Emil Velikov
2015-04-01 17:31   ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
2015-04-01 17:31   ` Jerome Glisse
2015-04-01 17:32   ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 05/24] radeon: remove more unused functions Emil Velikov
2015-04-01 17:32   ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 06/24] radeon: remove no-longer used static functions Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 07/24] radeon: annotate the private symbols Emil Velikov
2015-04-02  2:48   ` Michel Dänzer
2015-04-02  3:57     ` Jerome Glisse
2015-04-02 23:10       ` Emil Velikov
2015-04-05 15:29         ` [PATCH libdrm v2 02/19] radeon: move bof.[ch] out of libdrm_radeon Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 08/24] radeon: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 09/24] freedreno: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 10/24] freedreno: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds Emil Velikov
2015-04-09 14:56   ` Emil Velikov
2015-04-10  6:05     ` Eric Anholt
2015-04-10 17:40       ` Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 12/24] intel: remove unused mmFindBlock Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 13/24] intel: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 14/24] intel: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 15/24] nouveau: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 16/24] nouveau: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 17/24] libkms: annotate private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 18/24] libkms: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 19/24] exynos: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 20/24] omap: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 21/24] tegra: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 23/24] drm: remove no longer needed VISIBILITY_CFLAGS Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 24/24] drm: remove drm_public macro Emil Velikov
2015-04-21 15:41 ` [PATCH libdrm 00/24] Annotate private symbols, drop " Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.