All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH v2] drm/i915: Fix recursive calls to unmap
Date: Sun, 30 Oct 2011 18:36:23 -0700	[thread overview]
Message-ID: <yunehxu2b8o.fsf@aiko.keithp.com> (raw)
In-Reply-To: <1320024054-4732-1-git-send-email-ben@bwidawsk.net>


[-- Attachment #1.1: Type: text/plain, Size: 1541 bytes --]

On Sun, 30 Oct 2011 18:20:54 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
> 
> The solution here is to add a new flag to the call chain which gives the
> routines the information they need to possibly defer actions which may
> cause us to recurse.

This looks a lot nicer; it's shorter than I feared too.

> @@ -2051,7 +2052,8 @@ i915_gem_object_wait_rendering(struct drm_i915_gem_object *obj)
>  	 * it.
>  	 */
>  	if (obj->active) {
> -		ret = i915_wait_request(obj->ring, obj->last_rendering_seqno);
> +		ret = i915_wait_request(obj->ring, obj->last_rendering_seqno,
> +					true);

> @@ -2400,7 +2402,8 @@ i915_gem_object_flush_fence(struct drm_i915_gem_object *obj,
>  		if (!ring_passed_seqno(obj->last_fenced_ring,
>  				       obj->last_fenced_seqno)) {
>  			ret = i915_wait_request(obj->last_fenced_ring,
> -						obj->last_fenced_seqno);
> +						obj->last_fenced_seqno,
> +						true);
>  			if (ret)
>  				return ret;
>  		}
> @@ -2541,7 +2544,8 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj,
>  				if (!ring_passed_seqno(obj->last_fenced_ring,
>  						       reg->setup_seqno)) {
>  					ret = i915_wait_request(obj->last_fenced_ring,
> -								reg->setup_seqno);
> +								reg->setup_seqno,
> +								true);
>  					if (ret)
>  						return ret;
>  				}

Any reason you're changing behaviour outside of the area with the actual
problem? If so, you should stick those in a separate patch instead of
mixing them into this bug fix.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2011-10-31  1:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31  1:20 [PATCH v2] drm/i915: Fix recursive calls to unmap Ben Widawsky
2011-10-31  1:36 ` Keith Packard [this message]
2011-10-31  1:52   ` Ben Widawsky
2011-10-31  2:35     ` Keith Packard

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=yunehxu2b8o.fsf@aiko.keithp.com \
    --to=keithp@keithp.com \
    --cc=ben@bwidawsk.net \
    --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.