All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Sean Paul <seanpaul@chromium.org>,
	Zach Reizner <zachr@google.com>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH v3] drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl)
Date: Thu, 14 Jul 2016 11:11:02 +0100	[thread overview]
Message-ID: <20160714101102.GA6157@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20160714095904.GW6157@nuc-i3427.alporthouse.com>

On Thu, Jul 14, 2016 at 10:59:04AM +0100, Chris Wilson wrote:
> On Thu, Jul 14, 2016 at 10:12:17AM +0200, Daniel Vetter wrote:
> > On Thu, Jul 14, 2016 at 08:04:19AM +0100, Chris Wilson wrote:
> > > vGEM buffers are useful for passing data between software clients and
> > > hardware renders. By allowing the user to create and attach fences to
> > > the exported vGEM buffers (on the dma-buf), the user can implement a
> > > deferred renderer and queue hardware operations like flipping and then
> > > signal the buffer readiness (i.e. this allows the user to schedule
> > > operations out-of-order, but have them complete in-order).
> > > 
> > > This also makes it much easier to write tightly controlled testcases for
> > > dma-buf fencing and signaling between hardware drivers.
> > > 
> > > v2: Don't pretend the fences exist in an ordered timeline, but allocate
> > > a separate fence-context for each fence so that the fences are
> > > unordered.
> > > v3: Make the debug output more interesting, and so the signaled status.
> > > 
> > > Testcase: igt/vgem_basic/dmabuf-fence
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Sean Paul <seanpaul@chromium.org>
> > > Cc: Zach Reizner <zachr@google.com>
> > > Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Acked-by: Zach Reizner <zachr@google.com>
> > 
> > One thing I completely forgotten: This allows userspace to hang kernel
> > drivers. i915 (and other gpu drivers) can recover using hangcheck, but
> > dumber drivers (v4l, if that ever happens) probably never except such a
> > case. We've had a similar discusion with the userspace fences exposed in
> > sw_fence, and decided to move all those ioctl into debugfs. I think we
> > should do the same for this vgem-based debugging of implicit sync. Sorry
> > for realizing this this late.
> 
> One of the very tests I make is to ensure that we recover from such a
> hang. I don't see the difference between this any of the other ways
> userspace can shoot itself (and others) in the foot.

So one solution would be to make vgem fences automatically timeout (with
a flag for root to override for the sake of testing hang detection).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-07-14 10:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 12:46 [PATCH v2] drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl) Chris Wilson
2016-07-12 16:13 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-07-13 18:57 ` [PATCH v2] " Chris Wilson
2016-07-13 20:29 ` Gustavo Padovan
2016-07-13 20:46   ` Chris Wilson
2016-07-14  7:04   ` [PATCH v3] " Chris Wilson
2016-07-14  8:12     ` Daniel Vetter
2016-07-14  9:59       ` Chris Wilson
2016-07-14 10:11         ` Chris Wilson [this message]
2016-07-14 12:15           ` [Intel-gfx] " Chris Wilson
2016-07-14 12:40           ` Daniel Vetter
2016-07-14 13:23             ` Chris Wilson
2016-07-14 13:39               ` Chris Wilson
2016-07-14 14:36                 ` [Intel-gfx] " Daniel Vetter
2016-07-14 15:24                   ` Chris Wilson
2016-07-15  7:08                     ` [Intel-gfx] " Daniel Vetter
2016-07-14 14:33               ` Daniel Vetter
2016-07-15  8:31     ` [PATCH v4] " Chris Wilson
2016-07-18  6:34       ` Daniel Vetter
2016-07-15  9:15     ` ✗ Ro.CI.BAT: failure for drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl) (rev2) 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=20160714101102.GA6157@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    --cc=zachr@google.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.