public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Carlos Santa <carlos.santa@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Ursulin Tvrtko <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [RFC] tests/gem_watchdog: Initial set of tests for GPU watchdog
Date: Tue, 16 Apr 2019 13:29:37 -0700	[thread overview]
Message-ID: <4d20824f-a02f-0502-962b-80180b26927f@intel.com> (raw)
In-Reply-To: <155544608715.25605.16207228187606072740@skylake-alporthouse-com>



On 16/04/19 13:21, Chris Wilson wrote:
> Quoting Antonio Argenziano (2019-04-16 21:16:35)
>>
>>
>> On 15/04/19 19:02, Carlos Santa wrote:
>>> On Mon, 2019-04-15 at 14:50 -0700, Antonio Argenziano wrote:
>>>>
>>>> On 15/04/19 11:22, Carlos Santa wrote:
>>>>> +{
>>>>> +    struct drm_i915_gem_exec_object2 obj[2];
>>>>> +    struct drm_i915_gem_relocation_entry reloc;
>>>>> +    struct drm_i915_gem_execbuffer2 execbuf;
>>>>> +    igt_spin_t *spin = NULL;
>>>>> +
>>>>> +    const uint32_t bbe = MI_BATCH_BUFFER_END;
>>>>> +    int i = 0;
>>>>> +    int fence;
>>>>> +
>>>>> +    gem_quiescent_gpu(fd);
>>>>> +
>>>>> +    memset(&execbuf, 0, sizeof(execbuf));
>>>>> +    memset(&obj, 0, sizeof(obj));
>>>>> +    memset(&reloc, 0, sizeof(reloc));
>>>>> +
>>>>> +    execbuf.buffers_ptr = to_user_pointer(obj);
>>>>> +
>>>>> +    execbuf.buffer_count = 2;
>>>>> +    execbuf.flags = exec_id | LOCAL_EXEC_FENCE_OUT;
>>>>> +
>>>>> +    obj[0].handle = target;
>>>>> +    obj[1].handle = gem_create(fd, 4096);
>>>>> +
>>>>> +    obj[1].relocation_count = 1;
>>>>> +    obj[1].relocs_ptr = to_user_pointer(&reloc);
>>>>> +
>>>>> +    reloc.target_handle = obj[0].handle;
>>>>> +    reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
>>>>> +    reloc.write_domain = I915_GEM_DOMAIN_COMMAND;
>>>>> +    reloc.delta = offset * sizeof(uint32_t);
>>>>> +
>>>>> +    reloc.offset = i * sizeof(uint32_t);
>>>>> +    gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
>>>>> +
>>>>> +    __sync_synchronize();
>>>>> +
>>>>> +    if (handle) {
>>>>> +        *handle = obj[1].handle;
>>>>> +        return;
>>>>> +    }
>>>>> +    gem_sync(fd, obj[1].handle);
>>>>> +    execbuf.rsvd1 = ctx_id;
>>>>> +    execbuf.rsvd2 = -1;
>>>>> +
>>>>> +    spin = igt_spin_batch_new(fd, .dependency = obj[0].handle);
>>>>> +    igt_spin_batch_set_timeout(spin, timeout);
>>>>> +    igt_assert(gem_bo_busy(fd, obj[0].handle));
>>>>> +
>>>>> +    gem_execbuf_wr(fd, &execbuf);
>>>>> +    igt_spin_batch_free(fd, spin);
>>>>> +
>>>>> +    fence = execbuf.rsvd2 >> 32;
>>>>> +
>>>>> +#if 0
>>>>> +    igt_info("fence:%d, fence status : %d EIO: %d
>>>>> ctx_id:%d\n",fence, sync_fence_status(fence),-EIO, ctx_id);
>>>>> +#endif
>>>>> +
>>>
>>> Any ideas why would the fence wouldn't signal correctly (i.e., EIO)
>>> after resetting?  I need help with this...
>>
>> Not sure, it looks correct on this end, just one small comment would be
>> to use I915_EXEC_FENCE_OUT instead of the local flag.
> 
> Hint: it doesn't run to the timeout.

Oh this is the canary batch, for some reason I was convinced we were 
printing this for the hanging batch as well...

Antonio

> -Chris
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-04-16 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 18:22 [igt-dev] [RFC] IGT GPU watchdog Carlos Santa
2019-04-15 18:22 ` [igt-dev] [RFC] tests/gem_watchdog: Initial set of tests for " Carlos Santa
2019-04-15 21:50   ` Antonio Argenziano
2019-04-16  2:02     ` Carlos Santa
2019-04-16 20:16       ` Antonio Argenziano
2019-04-16 20:21         ` Chris Wilson
2019-04-16 20:29           ` Antonio Argenziano [this message]
2019-04-15 18:32 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/gem_watchdog: Initial set of tests for GPU watchdog (rev3) Patchwork

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=4d20824f-a02f-0502-962b-80180b26927f@intel.com \
    --to=antonio.argenziano@intel.com \
    --cc=carlos.santa@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tvrtko.ursulin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox