All of lore.kernel.org
 help / color / mirror / Atom feed
From: priyanka.dandamudi@intel.com
To: igt-dev@lists.freedesktop.org, arjun.melkaveri@intel.com,
	priyanka.dandamudi@intel.com, matthew.auld@intel.com,
	ashutosh.dixit@intel.com
Subject: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_nop: Update poll sequential
Date: Thu, 30 Sep 2021 10:51:24 +0530	[thread overview]
Message-ID: <20210930052124.980259-1-priyanka.dandamudi@intel.com> (raw)

From: Priyanka Dandamudi <priyanka.dandamudi@intel.com>

The set_caching ioctl returns -ENODEV for discrete.
So,updated the poll sequential test case accordingly.

Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 tests/i915/gem_exec_nop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c
index c435335b..9123f9f5 100644
--- a/tests/i915/gem_exec_nop.c
+++ b/tests/i915/gem_exec_nop.c
@@ -232,6 +232,7 @@ static void poll_sequential(int fd, const intel_ctx_t *ctx,
 	unsigned long cycles;
 	uint64_t elapsed;
 	bool cached;
+	int expect;
 
 	flags = I915_EXEC_NO_RELOC;
 	if (gen == 4 || gen == 5)
@@ -251,7 +252,8 @@ static void poll_sequential(int fd, const intel_ctx_t *ctx,
 	memset(obj, 0, sizeof(obj));
 	obj[0].handle = gem_create(fd, 4096);
 	obj[0].flags = EXEC_OBJECT_WRITE;
-	cached = __gem_set_caching(fd, obj[0].handle, 1) == 0;
+	expect = __gem_set_caching(fd, obj[0].handle, 1);
+	cached = gem_has_lmem(fd)? expect == -ENODEV: expect == 0;
 	obj[1].handle = gem_create(fd, 4096);
 	obj[1].relocs_ptr = to_user_pointer(reloc);
 	obj[1].relocation_count = ARRAY_SIZE(reloc);
-- 
2.25.1

             reply	other threads:[~2021-09-30  5:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  5:21 priyanka.dandamudi [this message]
2021-09-30  6:05 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_exec_nop: Update poll sequential Patchwork
2021-09-30  7:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-10-01  8:55 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
2021-10-01  9:38 ` Matthew Auld

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=20210930052124.980259-1-priyanka.dandamudi@intel.com \
    --to=priyanka.dandamudi@intel.com \
    --cc=arjun.melkaveri@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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 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.