All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Remove obsolete engine clenaup
Date: Wed, 17 Jul 2019 14:18:56 +0100	[thread overview]
Message-ID: <5d0af90c-a448-8a67-c577-0dd61faf1ca4@linux.intel.com> (raw)
In-Reply-To: <20190717074644.32724-1-chris@chris-wilson.co.uk>


On 17/07/2019 08:46, Chris Wilson wrote:
> Remove the outer layer cleanup of engine stubs; it no longer tries to

Who is "it"?

> preallocate and so is not responsible for either the allocation or free.
> By the time we call the cleanup function, we already have cleaned up the
> engines.

I see:

i915_driver_probe
{
...
	ret = i915_driver_early_probe(dev_priv);
...
	i915_driver_mmio_probe -> intel_engines_init_mmio -> allocates engines
...
	<later step fails> -> who frees the engines?
}

Regards,

Tvrtko

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_drv.c | 14 +-------------
>   1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 7c209743e478..e1d62ba30612 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -848,15 +848,6 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)
>   	return -ENOMEM;
>   }
>   
> -static void i915_engines_cleanup(struct drm_i915_private *i915)
> -{
> -	struct intel_engine_cs *engine;
> -	enum intel_engine_id id;
> -
> -	for_each_engine(engine, i915, id)
> -		kfree(engine);
> -}
> -
>   static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv)
>   {
>   	destroy_workqueue(dev_priv->hotplug.dp_wq);
> @@ -928,7 +919,7 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
>   
>   	ret = i915_workqueues_init(dev_priv);
>   	if (ret < 0)
> -		goto err_engines;
> +		return ret;
>   
>   	intel_gt_init_early(&dev_priv->gt, dev_priv);
>   
> @@ -961,8 +952,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
>   	i915_gem_cleanup_early(dev_priv);
>   err_workqueues:
>   	i915_workqueues_cleanup(dev_priv);
> -err_engines:
> -	i915_engines_cleanup(dev_priv);
>   	return ret;
>   }
>   
> @@ -978,7 +967,6 @@ static void i915_driver_late_release(struct drm_i915_private *dev_priv)
>   	intel_uc_cleanup_early(&dev_priv->gt.uc);
>   	i915_gem_cleanup_early(dev_priv);
>   	i915_workqueues_cleanup(dev_priv);
> -	i915_engines_cleanup(dev_priv);
>   
>   	pm_qos_remove_request(&dev_priv->sb_qos);
>   	mutex_destroy(&dev_priv->sb_lock);
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-07-17 13:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  7:46 [PATCH] drm/i915: Remove obsolete engine clenaup Chris Wilson
2019-07-17  8:28 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-07-17  9:54 ` ✓ Fi.CI.IGT: " Patchwork
2019-07-17 13:18 ` Tvrtko Ursulin [this message]
2019-07-17 13:24   ` [PATCH] " Chris Wilson
2019-07-17 13:28     ` Tvrtko Ursulin
2019-07-17 13:27 ` [PATCH] drm/i915: Remove obsolete engine cleanup Chris Wilson
2019-07-17 14:03 ` ✓ Fi.CI.BAT: success for drm/i915: Remove obsolete engine clenaup (rev2) Patchwork
2019-07-17 18:33 ` ✓ Fi.CI.IGT: " 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=5d0af90c-a448-8a67-c577-0dd61faf1ca4@linux.intel.com \
    --to=tvrtko.ursulin@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 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.