Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/19] drm/i915: Enable i915_gem_wait_for_idle() without holding struct_mutex
Date: Fri, 05 Aug 2016 09:16:21 +0300	[thread overview]
Message-ID: <1470377781.3634.13.camel@linux.intel.com> (raw)
In-Reply-To: <1470340352-16118-7-git-send-email-chris@chris-wilson.co.uk>

On to, 2016-08-04 at 20:52 +0100, Chris Wilson wrote:
> -i915_gem_suspend(struct drm_device *dev)
> +int i915_gem_suspend(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	int ret = 0;
> +	int ret;
>  
>  	intel_suspend_gt_powersave(dev_priv);
>  
> @@ -4102,7 +4099,7 @@ i915_gem_suspend(struct drm_device *dev)
>  	if (ret)
>  		goto err;
>  
> -	ret = i915_gem_wait_for_idle(dev_priv);
> +	ret = i915_gem_wait_for_idle(dev_priv, true);
>  	if (ret)
>  		goto err;
>  
> @@ -4123,7 +4120,7 @@ i915_gem_suspend(struct drm_device *dev)
>  	return 0;
>  
>  err:
> -	mutex_unlock(&dev->struct_mutex);
> +	mutex_unlock(&dev_priv->drm.struct_mutex);

Did you intend to convert the parameter to dev_priv?

> @@ -486,7 +486,8 @@ void __i915_add_request(struct drm_i915_gem_request *request,
>  	 */
>  	request->emitted_jiffies = jiffies;
>  	request->previous_seqno = engine->last_submitted_seqno;
> -	smp_store_mb(engine->last_submitted_seqno, request->fence.seqno);
> +	engine->last_submitted_seqno = request->fence.seqno;

What's up with this change?

> +	i915_gem_active_set(&engine->last_request, request);
>  	list_add_tail(&request->link, &engine->request_list);
>  	list_add_tail(&request->ring_link, &ring->request_list);
>  
> <SNIP>
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -6336,7 +6336,7 @@ bool i915_gpu_busy(void)
>  	dev_priv = i915_mch_dev;
>  
>  	for_each_engine(engine, dev_priv)
> -		ret |= !list_empty(&engine->request_list);
> +		ret |= intel_engine_is_active(engine);

|= always makes me think of bitfields because, well -- it is bitwise
operation :P

		if (intel_engine_is_active(engine))
			ret = true;

But I can live with what it is.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-05  6:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 19:52 Using RCU requests, take 2 Chris Wilson
2016-08-04 19:52 ` [PATCH 01/19] drm/i915: Introduce i915_gem_active_wait_unlocked() Chris Wilson
2016-08-04 19:52 ` [PATCH 02/19] drm/i915: Convert non-blocking waits for requests over to using RCU Chris Wilson
2016-08-05  5:38   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 03/19] drm/i915: Convert non-blocking userptr " Chris Wilson
2016-08-04 19:52 ` [PATCH 04/19] drm/i915/userptr: Remove superfluous interruptible=false on waiting Chris Wilson
2016-08-04 19:52 ` [PATCH 05/19] drm/i915: Remove forced stop ring on suspend/unload Chris Wilson
2016-08-05  5:46   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 06/19] drm/i915: Enable i915_gem_wait_for_idle() without holding struct_mutex Chris Wilson
2016-08-05  6:16   ` Joonas Lahtinen [this message]
2016-08-05  6:51     ` Chris Wilson
2016-08-05  7:31       ` Joonas Lahtinen
2016-08-05  8:23     ` Chris Wilson
2016-08-04 19:52 ` [PATCH 07/19] drm/i915: Simplify do_idling() (Ironlake vt-d w/a) Chris Wilson
2016-08-05  6:19   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 08/19] drm/i915/shrinker: Wait before acquiring struct_mutex under oom Chris Wilson
2016-08-05  6:24   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 09/19] drm/i915: Tidy generation of the GTT mmap offset Chris Wilson
2016-08-04 19:52 ` [PATCH 10/19] drm/i915: Remove unused no-shrinker-steal Chris Wilson
2016-08-04 19:52 ` [PATCH 11/19] drm/i915: Do a nonblocking wait first in pread/pwrite Chris Wilson
2016-08-05  7:08   ` Joonas Lahtinen
2016-08-05  7:59     ` Chris Wilson
2016-08-04 19:52 ` [PATCH 12/19] drm/i915: Remove (struct_mutex) locking for wait-ioctl Chris Wilson
2016-08-04 19:52 ` [PATCH 13/19] drm/i915: Remove (struct_mutex) locking for busy-ioctl Chris Wilson
2016-08-04 19:52 ` [PATCH 14/19] drm/i915: Reduce locking inside swfinish ioctl Chris Wilson
2016-08-05  6:55   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 15/19] drm/i915: Remove pinned check from madvise ioctl Chris Wilson
2016-08-04 19:52 ` [PATCH 16/19] drm/i915: Remove locking for get_tiling Chris Wilson
2016-08-04 19:52 ` [PATCH 17/19] drm/i915: Document and reject invalid tiling modes Chris Wilson
2016-08-05  6:44   ` Joonas Lahtinen
2016-08-04 19:52 ` [PATCH 18/19] drm/i915: Repack fence tiling mode and stride into a single integer Chris Wilson
2016-08-04 19:52 ` [PATCH 19/19] drm/i915: Assert that the request hasn't been retired Chris Wilson
2016-08-05  5:49 ` ✗ Ro.CI.BAT: failure for series starting with [01/19] drm/i915: Introduce i915_gem_active_wait_unlocked() 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=1470377781.3634.13.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.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