From: Peter Antoine <peter.antoine@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] test/gem_mocs_settings: Testing MOCS register settings
Date: Mon, 4 Apr 2016 18:30:21 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.10.1604041802240.8501@peterant-linux2> (raw)
In-Reply-To: <20160404135231.GE26271@nuc-i3427.alporthouse.com>
Response inline.
On Mon, 4 Apr 2016, Chris Wilson wrote:
> On Mon, Apr 04, 2016 at 02:43:08PM +0100, Peter Antoine wrote:
>> +static void run_test(int fd, unsigned mode)
>> +{
>> + const int gen = intel_gen(intel_get_drm_devid(fd));
>> + const struct intel_execution_engine *e;
>> +
>> + igt_require(gen >= 9);
>> +
>> + test_mocs_values(fd);
>> +
>> + switch(mode) {
>> + case NONE: break;
>> + case RESET: igt_force_gpu_reset(); break;
>> + case SUSPEND: igt_system_suspend_autoresume(); break;
>> + case HIBERNATE: igt_system_hibernate_autoresume(); break;
>> + };
>> +
>> + /*
>> + * Do render after other engines as older versions of code will
>> + * cause the RCS context to program the registers and the test
>> + * becomes invalid
>> + */
>
> If you defer fd allocation to here, then that is moot, as we can create
> the fd for each test and be sure that the default context is
> uninitialised.
Ok, will wrap each test within an fd of it's own.
>
>> + for (e = intel_execution_engines; e->name; e++)
>> + if (e->exec_id != I915_EXEC_DEFAULT &&
>> + e->exec_id != I915_EXEC_RENDER &&
>> + gem_has_ring(fd, e->exec_id | e->flags))
>> + test_context_mocs_values(fd, e, true);
>> +
>> + for (e = intel_execution_engines; e->name; e++)
>> + if (e->exec_id == I915_EXEC_RENDER &&
>> + gem_has_ring(fd, e->exec_id | e->flags)) {
>> + test_context_mocs_values(fd, e, true);
>> + test_context_mocs_values(fd, e, false);
>> + }
>
> As well as checking for creating new contexts after resume, we also need
> to check that the register values are preserved across suspend (i.e.
> that the register state is being saved back into the context image and
> then restored).
Ok, I'll add another test case that does this for the render engine (the
only one that is effected (at the moment) by context save and resume.
I might as well move the render engine context tests to a new testcase. As
it is the only engine that uses the context registers.
>
> If we get truly paranoid (and why not?!) then we can create a pair of
> contexts, change the register values in one and verify that the second
> context is unaffected.
Might as well, can add a test case that dirties the RCS context registers
and see if they are the same after resume and if a new context is created
afterwards that it has the correct values.
Peter.
> -Chris
>
>
--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-04 17:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 13:43 [PATCH i-g-t] test/gem_mocs_settings: Testing MOCS register settings Peter Antoine
2016-04-04 13:52 ` Chris Wilson
2016-04-04 17:30 ` Peter Antoine [this message]
2016-04-04 19:42 ` Chris Wilson
2016-04-05 8:20 ` Peter Antoine
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=alpine.DEB.2.10.1604041802240.8501@peterant-linux2 \
--to=peter.antoine@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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