All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH 09/10] drm/i915: wait render timeout ioctl
Date: Sun, 22 Apr 2012 10:48:01 +0100	[thread overview]
Message-ID: <1335088110_18651@CP5-2952> (raw)
In-Reply-To: <1334971412-4826-10-git-send-email-ben@bwidawsk.net>

On Fri, 20 Apr 2012 18:23:31 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
> +int
> +i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
> +{
> +	struct drm_i915_gem_wait *args = data;
> +	struct drm_i915_gem_object *obj;
> +	struct intel_ring_buffer *ring;
> +	long timeout;
> +	u32 seqno = 0;
> +	int ret = 0;
> +
> +	ret = i915_mutex_lock_interruptible(dev);
> +	if (ret)
> +		return ret;
> +
> +	obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->bo_handle));
> +	if (&obj->base == NULL) {
> +		mutex_unlock(&dev->struct_mutex);
> +		return -ENOENT;
> +	}
> +
> +	timeout = args->timeout_ns;

We discussed on IRC whether or not we needed to flush here. For the
drm_intel_gem_bo_wait_rendering() use-case, we do need to be able to first
queue a flush.

  if (args->flags & I915_WAIT_FINISH)
	i915_gem_object_flush_gpu_write_domain(obj);

Borrowing the terminology from glFlush/glFinish. This becomes moot if
the flushing list is ever vanquished, but still a useful distinction and
required today.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  parent reply	other threads:[~2012-04-22  9:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21  1:23 [PATCH 00/10] wait for BO with timeout Ben Widawsky
2012-04-21  1:23 ` [PATCH 01/10] drm/i915: remove do_retire from i915_wait_request Ben Widawsky
2012-04-21 17:17   ` Daniel Vetter
2012-04-21 17:27     ` Ben Widawsky
2012-04-21 17:36       ` Daniel Vetter
2012-04-21  1:23 ` [PATCH 02/10] drm/i915: move vbetool invoked ier stuff Ben Widawsky
2012-04-21  9:26   ` Chris Wilson
2012-04-21  1:23 ` [PATCH 03/10] drm/i915: kill waiting_seqno Ben Widawsky
2012-04-22 13:46   ` Chris Wilson
2012-04-22 17:47     ` Ben Widawsky
2012-04-21  1:23 ` [PATCH 04/10] drm/i915: drop polled waits from i915_wait_request Ben Widawsky
2012-04-21  9:29   ` Chris Wilson
2012-04-21 16:14     ` Ben Widawsky
2012-04-21  1:23 ` [PATCH 05/10] drm/i915: extract __wait_seqno " Ben Widawsky
2012-04-21  1:23 ` [PATCH 06/10] drm/i915: use __wait_seqno for ring throttle Ben Widawsky
2012-04-22 14:17   ` Chris Wilson
2012-04-21  1:23 ` [PATCH 07/10] drm/i915: timeout parameter for seqno wait Ben Widawsky
2012-04-22 12:52   ` Daniel Vetter
2012-04-21  1:23 ` [PATCH 08/10] drm/i915: real wait seqno with timeout Ben Widawsky
2012-04-21  1:23 ` [PATCH 09/10] drm/i915: wait render timeout ioctl Ben Widawsky
2012-04-21  9:41   ` Chris Wilson
2012-04-21 16:12     ` Ben Widawsky
2012-04-21 20:37       ` Ben Widawsky
2012-04-22  9:37       ` Chris Wilson
2012-04-22  9:48   ` Chris Wilson [this message]
2012-04-22 10:11     ` Daniel Vetter
2012-04-22 12:45   ` Daniel Vetter
2012-04-23 15:28     ` Ben Widawsky
2012-04-22 14:14   ` Chris Wilson
2012-04-21  1:23 ` [PATCH 10/10] drm/i915: s/i915_wait_reqest/i915_wait_seqno/g Ben Widawsky

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=1335088110_18651@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --cc=benjamin.widawsky@intel.com \
    --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 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.