All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/i915: Make prepare_plane_fb fully interruptible.
Date: Fri, 16 Oct 2015 14:21:26 +0300	[thread overview]
Message-ID: <1444994486.4439.7.camel@gmail.com> (raw)
In-Reply-To: <1443007632-5573-3-git-send-email-maarten.lankhorst@linux.intel.com>

On Wed, 2015-09-23 at 13:27 +0200, Maarten Lankhorst wrote:
> Now that we agreed on not preserving framebuffers pinning is finally
> allowed to fail because of signals. Use this to make pinning
> and acquire the mutex in an interruptible way too.
> 
> Unpinning is still uninterruptible, because it happens as a cleanup
> of old state, or undoing pins after one of the pins failed.
> 
> The intel_pin_and_fence_fb_obj in page_flip will also wait interruptibly,
> and can be aborted now.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index ac97af69be62..25e1eac260fd 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2349,11 +2349,10 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
>  	 */
>  	intel_runtime_pm_get(dev_priv);
>  
> -	dev_priv->mm.interruptible = false;
>  	ret = i915_gem_object_pin_to_display_plane(obj, alignment, pipelined,
>  						   pipelined_request, &view);
>  	if (ret)
> -		goto err_interruptible;
> +		goto err_pm;
>  
>  	/* Install a fence for tiled scan-out. Pre-i965 always needs a
>  	 * fence, whereas 965+ only requires a fence if using
> @@ -2377,14 +2376,12 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
>  
>  	i915_gem_object_pin_fence(obj);
>  
> -	dev_priv->mm.interruptible = true;
>  	intel_runtime_pm_put(dev_priv);
>  	return 0;
>  
>  err_unpin:
>  	i915_gem_object_unpin_from_display_plane(obj, &view);
> -err_interruptible:
> -	dev_priv->mm.interruptible = true;
> +err_pm:
>  	intel_runtime_pm_put(dev_priv);
>  	return ret;
>  }
> @@ -13305,7 +13302,9 @@ intel_prepare_plane_fb(struct drm_plane *plane,
>  	if (!obj && !old_obj)
>  		return 0;
>  
> -	mutex_lock(&dev->struct_mutex);
> +	ret = i915_mutex_lock_interruptible(dev);
> +	if (ret)
> +		return ret;
>  
>  	if (!obj) {
>  		ret = 0;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-10-16 11:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 11:27 [PATCH 0/5] drm/i915: Interruptible framebuffer pinning Maarten Lankhorst
2015-09-23 11:27 ` [PATCH 1/5] drm/i915: Make plane fb tracking work correctly, v2 Maarten Lankhorst
2015-10-14 12:59   ` Ander Conselvan De Oliveira
2015-10-14 13:54     ` Maarten Lankhorst
2015-09-23 11:27 ` [PATCH 2/5] drm/i915: Make prepare_plane_fb fully interruptible Maarten Lankhorst
2015-10-16 11:21   ` Ander Conselvan De Oliveira [this message]
2015-10-19  9:39     ` Daniel Vetter
2015-09-23 11:27 ` [PATCH 3/5] drm/i915: Make wait_for_flips interruptible Maarten Lankhorst
2015-10-19 13:16   ` Ander Conselvan De Oliveira
2015-10-19 13:30     ` Daniel Vetter
2015-10-20  7:38       ` Ander Conselvan De Oliveira
2015-10-20  8:10         ` Daniel Vetter
2015-10-20 13:07           ` Ander Conselvan De Oliveira
2015-10-19 14:38     ` Maarten Lankhorst
2015-10-19 15:09     ` [PATCH 2.9/5] drm/i915: Do not wait for flips in intel_crtc_disable_noatomic Maarten Lankhorst
2015-10-20 12:56       ` Ander Conselvan De Oliveira
2015-10-20 18:33       ` Daniel Vetter
2015-09-23 11:27 ` [PATCH 4/5] drm/i915: Change locking for struct_mutex Maarten Lankhorst
2015-10-28 22:48   ` Matt Roper
2015-11-02 12:57     ` [PATCH v2 4/5] drm/i915: Change locking for struct_mutex, v2 Maarten Lankhorst
2015-11-02 13:06       ` Chris Wilson
2015-11-02 13:55         ` Maarten Lankhorst
2015-09-23 11:27 ` [PATCH 5/5] drm/i915: Wait for object idle without locks in atomic_commit Maarten Lankhorst
2015-10-29  0:30   ` Matt Roper
2015-11-02 13:13     ` Maarten Lankhorst
2015-11-02 13:46       ` Chris Wilson
2015-11-02 13:53         ` Maarten Lankhorst
2015-11-02 13:58           ` Chris Wilson

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=1444994486.4439.7.camel@gmail.com \
    --to=conselvan2@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.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 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.