intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/ggtt: Add generic i915_ggtt ballooning support
Date: Sun, 02 Aug 2020 16:56:03 +0100	[thread overview]
Message-ID: <159638376352.26228.851553027586714022@build.alporthouse.com> (raw)
In-Reply-To: <20200802153410.2298-2-michal.wajdeczko@intel.com>

Quoting Michal Wajdeczko (2020-08-02 16:34:09)
> Reserving part of the GGTT for the GuC requires same steps
> as in VGT GGTT ballooning. Add generic GGTT ballooning
> helpers to intel_ggtt.c to avoid code duplication.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Xiong Zhang <xiong.y.zhang@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_ggtt.c | 69 ++++++++++++++++++++++------
>  drivers/gpu/drm/i915/gt/intel_gtt.h  |  4 ++
>  drivers/gpu/drm/i915/i915_vgpu.c     | 64 +++++---------------------
>  3 files changed, 70 insertions(+), 67 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> index 33a3f627ddb1..7001252b4703 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> @@ -462,29 +462,17 @@ static void ggtt_unbind_vma(struct i915_address_space *vm, struct i915_vma *vma)
>  
>  static int ggtt_reserve_guc_top(struct i915_ggtt *ggtt)
>  {
> -       u64 size;
> -       int ret;
> -
>         if (!intel_uc_uses_guc(&ggtt->vm.gt->uc))
>                 return 0;
>  
>         GEM_BUG_ON(ggtt->vm.total <= GUC_GGTT_TOP);
> -       size = ggtt->vm.total - GUC_GGTT_TOP;
> -
> -       ret = i915_gem_gtt_reserve(&ggtt->vm, &ggtt->uc_fw, size,
> -                                  GUC_GGTT_TOP, I915_COLOR_UNEVICTABLE,
> -                                  PIN_NOEVICT);
> -       if (ret)
> -               drm_dbg(&ggtt->vm.i915->drm,
> -                       "Failed to reserve top of GGTT for GuC\n");
> -
> -       return ret;
> +       return i915_ggtt_balloon(ggtt, GUC_GGTT_TOP, ggtt->vm.total,
> +                                &ggtt->uc_fw);

I still don't buy this, this is definitely not "ballooning". And I'm yet
to be convinced that ballooning is a central concept to the i915_ggtt
itself and not a client coordination facility on top.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-08-02 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 15:34 [Intel-gfx] [PATCH 0/2] Add generic i915_ggtt ballooning support Michal Wajdeczko
2020-08-02 15:34 ` [Intel-gfx] [PATCH 1/2] drm/i915/ggtt: " Michal Wajdeczko
2020-08-02 15:56   ` Chris Wilson [this message]
2020-08-02 15:34 ` [Intel-gfx] [PATCH 2/2] drm/i915/vgt: Move VGT GGTT ballooning nodes to i915_ggtt Michal Wajdeczko
2020-08-02 15:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Add generic i915_ggtt ballooning support Patchwork
2020-08-02 16:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-02 19:37 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-01-11 17:36 [Intel-gfx] [PATCH 1/2] drm/i915/ggtt: " Michal Wajdeczko

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=159638376352.26228.851553027586714022@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=michal.wajdeczko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).