All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 6/8] drm/i915: reprogram NOA muxes on context switch when using perf
Date: Thu, 10 May 2018 00:38:41 +0100	[thread overview]
Message-ID: <96564c68-26cb-6b83-4bfd-14c9e762be28@intel.com> (raw)
In-Reply-To: <20180509174851.13847-7-lionel.g.landwerlin@intel.com>

On 09/05/18 18:48, Lionel Landwerlin wrote:
> @@ -1953,10 +1992,26 @@ static int gen8_emit_bb_start(struct i915_request *rq,
>   		rq->ctx->ppgtt->pd_dirty_rings &= ~intel_engine_flag(rq->engine);
>   	}
>   
> -	cs = intel_ring_begin(rq, 6);
> +	cs = intel_ring_begin(rq, rq->engine->id == RCS ? 10 : 6);
>   	if (IS_ERR(cs))
>   		return PTR_ERR(cs);
>   
> +	if (rq->engine->id == RCS) {
> +		/*
> +		 * Leave some instructions to be written with an
> +		 * MI_BATCH_BUFFER_START to the i915/perf NOA reprogramming
> +		 * batchbuffer. We only turn those MI_NOOP into
> +		 * MI_BATCH_BUFFER_START when we detect a SSEU powergating
> +		 * configuration change that might affect NOA. This is only
> +		 * for the RCS.
> +		 */
> +		rq->perf_prog = intel_ring_offset(rq, cs);
> +		*cs++ = MI_NOOP;
> +		*cs++ = MI_NOOP;
> +		*cs++ = MI_NOOP;
> +		*cs++ = MI_NOOP; /* Aligning to 2 dwords */
> +	}
> +
I just realized that isn't going to work if a request is preempted, then 
later resubmitted after another context with a different powergating 
config...
This reprog bb won't be executed because the CS pointer should be past 
that point already.
It seems to make this approach unworkable?

Would a per-ctx-wa-bb call into the reprogramming buffer under 
MI_PREDICATE work?
LOAD rpcs into predicate_reg0
LOAD engine storage for last rpcs into prediate_reg1
PREDICATE reg0 == reg1
MI_LRI noa registers
PREDICATE unset
STORE rpcs into engine storage for last rpcs

Thanks,

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

  reply	other threads:[~2018-05-09 23:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 17:48 [PATCH v4 0/8] drm/i915: per context slice/subslice powergating Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 1/8] drm/i915: Program RPCS for Broadwell Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 2/8] drm/i915: Record the sseu configuration per-context & engine Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 3/8] drm/i915/perf: simplify configure all context function Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 4/8] drm/i915: add new pipe control helper for mmio writes Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 5/8] drm/i915: give engine to execlists cancel helper Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 6/8] drm/i915: reprogram NOA muxes on context switch when using perf Lionel Landwerlin
2018-05-09 23:38   ` Lionel Landwerlin [this message]
2018-05-09 17:48 ` [PATCH v4 7/8] drm/i915: count powergating transitions per engine Lionel Landwerlin
2018-05-09 17:48 ` [PATCH v4 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin
2018-05-09 19:03 ` ✗ Fi.CI.BAT: failure for drm/i915: per context slice/subslice powergating (rev3) 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=96564c68-26cb-6b83-4bfd-14c9e762be28@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --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.