All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel-gfx@lists.freedesktop.org, Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] i915/oa: Simplify updating contexts
Date: Wed, 12 Sep 2018 16:50:57 +0100	[thread overview]
Message-ID: <153676745291.31648.5564874800693291759@skylake-alporthouse-com> (raw)
In-Reply-To: <20180912152930.28237-1-tvrtko.ursulin@linux.intel.com>

Quoting Tvrtko Ursulin (2018-09-12 16:29:30)
>         /*
>          * The OA register config is setup through the context image. This image
>          * might be written to by the GPU on context switch (in particular on
> @@ -1833,7 +1727,7 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv,
>          * the GPU from any submitted work.
>          */
>         ret = i915_gem_wait_for_idle(dev_priv,
> -                                    wait_flags,
> +                                    I915_WAIT_LOCKED,
>                                      MAX_SCHEDULE_TIMEOUT);

Wait until idle includes a wait for the gpu to switch off. At least it
does for execlists, not so clear for ringbuffer as there is no explicit
idle-event. However, that shouldn't matter as the kernel context doesn't
exist for legacy ringbuffer anyway ;) But the reload will be forced on
the next actual use.

>         if (ret)
>                 return ret;
> @@ -1859,7 +1753,17 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv,
>                 i915_gem_object_unpin_map(ce->state->obj);
>         }
>  
> -       return ret;
> +       /*
> +        * Apply the configuration by doing one context restore of the edited
> +        * context image.
> +        */
> +       rq = i915_request_alloc(engine, dev_priv->kernel_context);

By feeding a request, you ensure the reconfig is loaded again. +1 for
having it turn off when idle (and not instrument the kernel context at
all)!

Still I follow your logic that this should leave the oa config in
exactly the same state as before the patch, so
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-09-12 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 15:29 [PATCH] i915/oa: Simplify updating contexts Tvrtko Ursulin
2018-09-12 15:46 ` Lionel Landwerlin
2018-09-12 15:50 ` Chris Wilson [this message]
2018-09-13  8:54   ` Tvrtko Ursulin
2018-09-13  8:58     ` Chris Wilson
2018-09-13  8:59       ` Chris Wilson
2018-09-12 16:58 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-13  8:43   ` Tvrtko Ursulin
2018-09-12 23:14 ` ✓ 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=153676745291.31648.5564874800693291759@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=tursulin@ursulin.net \
    /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.