All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org, maarten.lankhorst@linux.intel.com,
	matthew.auld@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t] test/gem_exec_suspend: Enable the test for discrete GPUs
Date: Mon, 6 Sep 2021 11:31:53 +0200	[thread overview]
Message-ID: <d51e3861-90a8-6d40-c393-82603b571700@linux.intel.com> (raw)
In-Reply-To: <YTW0PS1FF5XTGhmO@platvala-desk.ger.corp.intel.com>


On 9/6/21 8:25 AM, Petri Latvala wrote:
> On Fri, Sep 03, 2021 at 04:03:48PM +0200, Thomas Hellström wrote:
>> Discrete GPUs don't support gem_set_caching() and uses a single,
>> kernel provided mapping mode, FIXED. Adjust the test accordingly.
>>
>> This makes the test run on DG1.
>>
>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> ---
>>   tests/i915/gem_exec_suspend.c | 17 ++++++++++++++++-
>>   1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/i915/gem_exec_suspend.c b/tests/i915/gem_exec_suspend.c
>> index dbe0c8a7..5f17e600 100644
>> --- a/tests/i915/gem_exec_suspend.c
>> +++ b/tests/i915/gem_exec_suspend.c
>> @@ -114,7 +114,8 @@ static void run_test(int fd, const intel_ctx_t *ctx,
>>   
>>   	memset(obj, 0, sizeof(obj));
>>   	obj[0].handle = gem_create(fd, 4096);
>> -	gem_set_caching(fd, obj[0].handle, !!(flags & CACHED));
>> +	if (!gem_has_lmem(fd))
>> +		gem_set_caching(fd, obj[0].handle, !!(flags & CACHED));
>>   	obj[0].flags |= EXEC_OBJECT_WRITE;
>>   	obj[1].handle = gem_create(fd, 4096);
>>   	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
>> @@ -293,6 +294,7 @@ igt_main
>>   	const struct intel_execution_engine2 *e;
>>   	igt_hang_t hang;
>>   	const intel_ctx_t *ctx;
>> +	bool has_lmem;
>>   	int fd;
>>   
>>   	igt_fixture {
>> @@ -302,6 +304,7 @@ igt_main
>>   		ctx = intel_ctx_create_all_physical(fd);
>>   
>>   		igt_fork_hang_detector(fd);
>> +		has_lmem = gem_has_lmem(fd);
>>   	}
>>   
>>   	igt_subtest("basic")
>> @@ -318,6 +321,18 @@ igt_main
>>   		run_test(fd, ctx, ALL_ENGINES, HIBERNATE);
>>   
>>   	for (m = modes; m->suffix; m++) {
>> +		if (has_lmem) {
>> +			igt_subtest_with_dynamic_f("fixed%s", m->suffix) {
> You can't do
>
> if (something_that_depends_on_the_running_system)
>    igt_subtest_of_any_kind(...)
>
>
> Instead you need to do
>
> igt_subtest_of_any_kind(...) {
>    igt_require(something_that_depends_on_the_running_system);
>    ...
> }
>
>
Thanks. I'll respin.

/Thomas



      reply	other threads:[~2021-09-06  9:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:03 [igt-dev] [PATCH i-g-t] test/gem_exec_suspend: Enable the test for discrete GPUs Thomas Hellström
2021-09-03 14:38 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-03 15:20 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
2021-09-03 15:43 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2021-09-06  6:25 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2021-09-06  9:31   ` Thomas Hellström [this message]

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=d51e3861-90a8-6d40-c393-82603b571700@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=petri.latvala@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.