From: "Goel, Akash" <akash.goel@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: akash.goel@intel.com
Subject: Re: [PATCH v6] igt/gem_trtt: Exercise the TRTT hardware
Date: Fri, 18 Mar 2016 15:22:51 +0530 [thread overview]
Message-ID: <56EBCFF3.4020809@intel.com> (raw)
In-Reply-To: <20160318092228.GR14143@nuc-i3427.alporthouse.com>
On 3/18/2016 2:52 PM, Chris Wilson wrote:
> On Fri, Mar 18, 2016 at 02:31:23PM +0530, Goel, Akash wrote:
>>
>>
>> On 3/18/2016 2:06 PM, Chris Wilson wrote:
>>> On Fri, Mar 18, 2016 at 02:07:40PM +0530, akash.goel@intel.com wrote:
>>>> +/* emit_store_qword
>>>> + * populate batch buffer with MI_STORE_DWORD_IMM command
>>>> + * @fd: drm file descriptor
>>>> + * @cmd_buf: batch buffer
>>>> + * @dw_offset: write offset in batch buffer
>>>> + * @vaddr: destination Virtual address
>>>> + * @data: u64 data to be stored at destination
>>>> + */
>>>> +static int emit_store_qword(int fd, uint32_t *cmd_buf, uint32_t dw_offset,
>>>> + uint64_t vaddr, uint64_t data)
>>>> +{
>>>> + /* Check that softpin addresses are in the correct form */
>>>> + igt_assert_eq_u64(vaddr, igt_canonical_addr(vaddr));
>>>> +
>>>> + /* SDI cannot write to unaligned addresses */
>>>> + igt_assert((vaddr & 3) == 0);
>>>
>>> If I remember correctly a qword write from SDI must be 8 byte aligned.
>>> Right?
>>
>> Yes right. Sorry, my bad..
>>>
>>>> +
>>>> + cmd_buf[dw_offset++] = MI_STORE_DWORD_IMM | 0x3;
>>>> + cmd_buf[dw_offset++] = (uint32_t)vaddr;
>>>> + cmd_buf[dw_offset++] = (uint32_t)(vaddr >> 32);
>>>> + cmd_buf[dw_offset++] = data;
>>>> + cmd_buf[dw_offset++] = data >> 32;
>>>> +
>>>> + return dw_offset;
>>>> +}
>>>
>>> Hopefully final comments!
>>>
>>> Missed EINTR handling during evict, If you repeat the busy/hang tests
>>> within the igt_fork_signal_helper(); igt_stop_signal_helper() that
>>> should cover catching an inopportune signal.
>>
>> Fine will add, thanks for suggesting this
>> So the signal will interrupt the Driver, which would be waiting for
>> the vma unbind to complete, from the eviction path.
>
> Right, and we will report the error back to userspace as EINTR and
> userspace will restart the syscall and we expect it to succeed
> (eventually). Just useful for flushing out the error handling.
>
> Having just remembered how useful this might be, I just extended
> gem_softpin for similar reasons:
> + igt_subtest("evict-active-interruptible") {
> + struct timespec start = {};
> + while (igt_seconds_elapsed(&start) < 20)
> + test_evict_active(fd);
> + }
Thanks I just tested the interruptible versions like this :-
+ igt_fork_signal_helper();
+ igt_subtest("evict_active-interruptible")
+ test_evict_active();
+
+ igt_subtest("evict_hang-interruptible")
+ test_evict_hang();
+ igt_stop_signal_helper();
Actually the hanging object test implicitly exercises the interruption
case (otherwise the test won't pass), error recovery as a part of GPU
reset wakes up/interrupts the waiters.
Best regards
Akash
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-18 9:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 11:31 [PATCH] igt/gem_trtt: Exercise the TRTT hardware akash.goel
2016-01-11 12:32 ` Chris Wilson
2016-01-11 12:37 ` Chris Wilson
2016-01-20 10:24 ` Goel, Akash
2016-01-22 15:37 ` [PATCH v2] " akash.goel
2016-01-22 20:41 ` Chris Wilson
2016-03-03 4:55 ` [PATCH v3] " akash.goel
2016-03-03 10:04 ` Chris Wilson
2016-03-03 15:38 ` Goel, Akash
2016-03-03 15:46 ` Chris Wilson
2016-03-03 16:47 ` Goel, Akash
2016-03-09 11:31 ` [PATCH v4] " akash.goel
2016-03-10 14:26 ` Michel Thierry
2016-03-11 5:59 ` Goel, Akash
2016-03-11 11:48 ` [PATCH v5] " akash.goel
2016-03-17 10:14 ` Michel Thierry
2016-03-18 8:37 ` [PATCH v6] " akash.goel
2016-03-18 8:36 ` Chris Wilson
2016-03-18 9:01 ` Goel, Akash
2016-03-18 9:22 ` Chris Wilson
2016-03-18 9:52 ` Goel, Akash [this message]
2016-03-18 10:25 ` [PATCH v7] " akash.goel
2016-03-18 10:32 ` [PATCH v6] " Chris Wilson
2016-03-18 15:49 ` Goel, Akash
2016-03-18 16:01 ` Chris Wilson
2016-03-21 10:00 ` Goel, Akash
2016-03-21 10:11 ` Chris Wilson
2016-03-22 8:37 ` [PATCH v8] " akash.goel
2016-10-27 15:35 ` [PATCH v9] " akash.goel
2016-01-12 6:00 ` [PATCH] " Tian, Kevin
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=56EBCFF3.4020809@intel.com \
--to=akash.goel@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;
as well as URLs for NNTP newsgroup(s).