dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chunming Zhou <david1.zhou@amd.com>
To: Christian.Koenig@amd.com, dri-devel@lists.freedesktop.org,
	michel@daenzer.net
Subject: [PATCH 2/2] enable syncobj test depending on capability
Date: Wed, 22 May 2019 17:08:00 +0800	[thread overview]
Message-ID: <20190522090800.15908-2-david1.zhou@amd.com> (raw)
In-Reply-To: <20190522090800.15908-1-david1.zhou@amd.com>

Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 tests/amdgpu/syncobj_tests.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c
index a0c627d7..869ed88e 100644
--- a/tests/amdgpu/syncobj_tests.c
+++ b/tests/amdgpu/syncobj_tests.c
@@ -22,6 +22,7 @@
 */
 
 #include "CUnit/Basic.h"
+#include "xf86drm.h"
 
 #include "amdgpu_test.h"
 #include "amdgpu_drm.h"
@@ -36,6 +37,13 @@ static void amdgpu_syncobj_timeline_test(void);
 
 CU_BOOL suite_syncobj_timeline_tests_enable(void)
 {
+	int r;
+	uint64_t cap = 0;
+
+	r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &cap);
+	if (r || cap == 0)
+		return CU_FALSE;
+
 	return CU_TRUE;
 }
 
-- 
2.17.1

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

  reply	other threads:[~2019-05-22  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  9:07 [PATCH 1/2] update drm.h Chunming Zhou
2019-05-22  9:08 ` Chunming Zhou [this message]
2019-05-22 10:46 ` Koenig, Christian
2019-05-24  5:15   ` zhoucm1
2019-06-06 10:20     ` Michel Dänzer
2019-06-06 10:26       ` zhoucm1
2019-06-06 10:30         ` Koenig, Christian
2019-06-06 10:31         ` Michel Dänzer
2019-06-06 14:09           ` Michel Dänzer
2019-06-06 14:13             ` Zhou, David(ChunMing)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190522090800.15908-2-david1.zhou@amd.com \
    --to=david1.zhou@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox