From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Determine uses-full-ppgtt from context for execbuf
Date: Sun, 2 Sep 2018 22:20:22 -0700 [thread overview]
Message-ID: <20180903052022.GA4226@intel.com> (raw)
In-Reply-To: <20180901092451.7233-1-chris@chris-wilson.co.uk>
On Sat, Sep 01, 2018 at 10:24:51AM +0100, Chris Wilson wrote:
> Rather than inspect the global module parameter for whether full-ppgtt
> maybe enabled, we can inspect the context directly as to whether it has
> its own vm.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Bob Paauwe <bob.j.paauwe@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
it is good that we don't need to depend on parameter for this.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index a926d7d47183..020a2394fc85 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -735,7 +735,12 @@ static int eb_select_context(struct i915_execbuffer *eb)
> return -ENOENT;
>
> eb->ctx = ctx;
> - eb->vm = ctx->ppgtt ? &ctx->ppgtt->vm : &eb->i915->ggtt.vm;
> + if (ctx->ppgtt) {
> + eb->vm = &ctx->ppgtt->vm;
> + eb->invalid_flags |= EXEC_OBJECT_NEEDS_GTT;
> + } else {
> + eb->vm = &eb->i915->ggtt.vm;
> + }
>
> eb->context_flags = 0;
> if (ctx->flags & CONTEXT_NO_ZEROMAP)
> @@ -2201,8 +2206,6 @@ i915_gem_do_execbuffer(struct drm_device *dev,
> eb.flags = (unsigned int *)(eb.vma + args->buffer_count + 1);
>
> eb.invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
> - if (USES_FULL_PPGTT(eb.i915))
> - eb.invalid_flags |= EXEC_OBJECT_NEEDS_GTT;
> reloc_cache_init(&eb.reloc_cache, eb.i915);
>
> eb.buffer_count = args->buffer_count;
> --
> 2.19.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-09-03 5:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-01 9:24 [PATCH] drm/i915: Determine uses-full-ppgtt from context for execbuf Chris Wilson
2018-09-01 9:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-01 11:07 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-03 5:20 ` Rodrigo Vivi [this message]
2018-09-03 9:15 ` [PATCH] " 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=20180903052022.GA4226@intel.com \
--to=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox