Skip to contentSkip to conversation

tests/amdgpu: Include config.h first

PATCH In review Michel Dänzer 2 participants 3 messages Aug 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/amdgpu: Include config.h first

From: Michel Dänzer <[email protected]>

Fixes build failure on 32-bit because _FILE_OFFSET_BITS wasn't defined to 64.

---
 tests/amdgpu/amdgpu_test.c | 5 +++++
 tests/amdgpu/basic_tests.c | 5 +++++
 tests/amdgpu/bo_tests.c    | 5 +++++
 tests/amdgpu/cs_tests.c    | 5 +++++
 tests/amdgpu/vce_tests.c   | 4 ++++
 5 files changed, 24 insertions(+)
tests/amdgpu/amdgpu_test.c +5 -0
index ed27e24..6568990 100644
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
tests/amdgpu/basic_tests.c +5 -0
index 44c6e4d..7874039 100644
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
tests/amdgpu/bo_tests.c +5 -0
index e4040d6..993895d 100644
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
tests/amdgpu/cs_tests.c +5 -0
index faceb83..416f36b 100644
@@ -20,6 +20,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
tests/amdgpu/vce_tests.c +4 -0
index b549392..0542654 100644
@@ -21,6 +21,10 @@
  *
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <inttypes.h>
 
Signature · 6 lines
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 tests/amdgpu: Remove unused local variable 'i'

From: Michel Dänzer <[email protected]>

---
 tests/amdgpu/vce_tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/amdgpu/vce_tests.c +1 -1
index 0542654..32fc001 100644
@@ -400,7 +400,7 @@ static void check_result(struct amdgpu_vce_encode *enc)
 static void amdgpu_cs_vce_encode(void)
 {
 	uint32_t vbuf_size, bs_size = 0x154000, cpb_size;
-	int i, r;
+	int r;
 
 	vbuf_size = enc.width * enc.height * 1.5;
 	cpb_size = vbuf_size * 10;
Signature · 6 lines
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Michel Dänzer
Quoted 6 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

Fixes build failure on 32-bit because _FILE_OFFSET_BITS wasn't defined to 64.

For both Reviewed-by: Christian König <[email protected]>

Quoted 77 lines
---
  tests/amdgpu/amdgpu_test.c | 5 +++++
  tests/amdgpu/basic_tests.c | 5 +++++
  tests/amdgpu/bo_tests.c    | 5 +++++
  tests/amdgpu/cs_tests.c    | 5 +++++
  tests/amdgpu/vce_tests.c   | 4 ++++
  5 files changed, 24 insertions(+)
tests/amdgpu/amdgpu_test.c +5 -0
index ed27e24..6568990 100644
@@ -20,6 +20,11 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   *
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
  #include <string.h>
  #include <stdio.h>
  #include <stdlib.h>
tests/amdgpu/basic_tests.c +5 -0
index 44c6e4d..7874039 100644
@@ -20,6 +20,11 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   *
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
tests/amdgpu/bo_tests.c +5 -0
index e4040d6..993895d 100644
@@ -20,6 +20,11 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   *
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
  #include <stdio.h>
 
  #include "CUnit/Basic.h"
tests/amdgpu/cs_tests.c +5 -0
index faceb83..416f36b 100644
@@ -20,6 +20,11 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   *
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
  #include <stdio.h>
 
  #include "CUnit/Basic.h"
tests/amdgpu/vce_tests.c +0 -0
index b549392..0542654 100644

tests/amdgpu/vce_tests.c line 30

Quoted 10 lines
tests/amdgpu/vce_tests.c +4 -0
@@ -21,6 +21,10 @@
   *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
  #include <stdio.h>
  #include <inttypes.h>
 

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel