Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>,
	Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 11/12] drm/i915: Takedown drm_mm on failed gtt setup
Date: Tue, 26 Nov 2013 10:21:09 +0100	[thread overview]
Message-ID: <20131126092109.GH27344@phenom.ffwll.local> (raw)
In-Reply-To: <1385402083-8719-12-git-send-email-benjamin.widawsky@intel.com>

On Mon, Nov 25, 2013 at 09:54:42AM -0800, Ben Widawsky wrote:
> This was found by code inspection. If the GTT setup fails then we are
> left without properly tearing down the drm_mm.
> 
> Hopefully this never happens.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 6388706..d85bc3e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4504,6 +4504,7 @@ int i915_gem_init(struct drm_device *dev)
>  	mutex_unlock(&dev->struct_mutex);
>  	if (ret) {
>  		i915_gem_cleanup_aliasing_ppgtt(dev);
> +		drm_mm_takedown(&dev_priv->gtt.base.mm);

Sprinkling stuff all over the place feels bad, I guess our gem init code
is ripe for an overhaul. I've pulled this in anyway.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-11-26  9:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 17:54 [PATCH 00/12] PPGTT pre-work Ben Widawsky
2013-11-25 17:54 ` [PATCH 01/12] drm/i915: Fix BDW PPGTT error path Ben Widawsky
2013-11-25 20:11   ` Chris Wilson
2013-11-25 17:54 ` [PATCH 02/12] drm/i915: Provide PDP updates via MMIO Ben Widawsky
2013-11-25 18:00   ` Ben Widawsky
2013-11-25 18:18   ` Chris Wilson
2013-11-25 18:28     ` Ben Widawsky
2013-11-25 18:44       ` Chris Wilson
2013-11-25 18:49         ` Ben Widawsky
2013-11-26  9:05   ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 03/12] drm/i915: Add a few missed bits to the mm Ben Widawsky
2013-11-25 17:54 ` [PATCH 04/12] drm/i915: Don't unconditionally try to deref aliasing ppgtt Ben Widawsky
2013-11-25 18:06   ` Chris Wilson
2013-11-25 18:10     ` Ben Widawsky
2013-11-25 19:08       ` Ville Syrjälä
2013-11-26  9:09         ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 05/12] drm/i915: Disallow dynamic ppgtt param modification Ben Widawsky
2013-11-25 18:50   ` Chris Wilson
2013-11-25 17:54 ` [PATCH 06/12] drm/i915: Demote drop_caches_set print Ben Widawsky
2013-11-25 18:08   ` Chris Wilson
2013-11-25 17:54 ` [PATCH 07/12] drm/i915: Removed unused vm args Ben Widawsky
2013-11-25 17:54 ` [PATCH 08/12] drm/i915: Remove defunct ctx switch comments Ben Widawsky
2013-11-25 17:54 ` [PATCH 09/12] drm/i915: Missed dropped VMA conversion Ben Widawsky
2013-11-25 17:54 ` [PATCH 10/12] drm/i915: Allow ggtt lookups to not WARN Ben Widawsky
2013-11-26  9:16   ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 11/12] drm/i915: Takedown drm_mm on failed gtt setup Ben Widawsky
2013-11-26  9:21   ` Daniel Vetter [this message]
2013-11-25 17:54 ` [PATCH 12/12] drm/i915: Move the gtt mm takedown to cleanup 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=20131126092109.GH27344@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox