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 2/3] drm/i915/selftests: Use full release for local ppgtt allocation
Date: Thu, 5 Jul 2018 10:50:36 +0100	[thread overview]
Message-ID: <2db7484f-2eb4-e20a-9600-47a07b49b0d5@linux.intel.com> (raw)
In-Reply-To: <20180705065653.20449-2-chris@chris-wilson.co.uk>


On 05/07/2018 07:56, Chris Wilson wrote:
> We can now use the full release mechanism (i915_ppgtt_put) for our local
> ppgtt allocation in igt_ppgtt_alloc.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index 4bfb0537f9be..e108fe4e0fd9 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> @@ -202,9 +202,8 @@ static int igt_ppgtt_alloc(void *arg)
>   
>   err_ppgtt_cleanup:
>   	mutex_lock(&dev_priv->drm.struct_mutex);
> -	ppgtt->vm.cleanup(&ppgtt->vm);
> +	i915_ppgtt_put(ppgtt);
>   	mutex_unlock(&dev_priv->drm.struct_mutex);
> -	kfree(ppgtt);
>   	return err;
>   }
>   
> 

Hm, it's not obvious why this works, if it does. This ppgtt it creates 
does not call kref_init on ppgtt->ref, or i915_address_space_init. 
Colour me confused.

Regards,

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

  reply	other threads:[~2018-07-05  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05  6:56 [PATCH 1/3] drm/i915: Remove defunct i915->vm_list Chris Wilson
2018-07-05  6:56 ` [PATCH 2/3] drm/i915/selftests: Use full release for local ppgtt allocation Chris Wilson
2018-07-05  9:50   ` Tvrtko Ursulin [this message]
2018-07-05  9:53     ` Chris Wilson
2018-07-05  9:55     ` Tvrtko Ursulin
2018-07-05 10:02       ` Chris Wilson
2018-07-05  6:56 ` [PATCH 3/3] drm/i915/selftests: Replace open-coded i915_address_space_init() Chris Wilson
2018-07-05  9:55   ` Tvrtko Ursulin
2018-07-05  7:28 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Remove defunct i915->vm_list Patchwork
2018-07-05  7:30 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-05  7:52 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-05  9:44 ` Patchwork
2018-07-05  9:44 ` [PATCH 1/3] " Tvrtko Ursulin
2018-07-05 11:01 ` ✓ Fi.CI.IGT: success for series starting with [1/3] " 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=2db7484f-2eb4-e20a-9600-47a07b49b0d5@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.