All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v6 13/20] drm/i915/guc: Provide register list to be saved/restored during engine reset
Date: Fri, 21 Apr 2017 13:07:51 -0700	[thread overview]
Message-ID: <bd79234c-60b3-0fa6-0e56-1ae969e47e7c@intel.com> (raw)
In-Reply-To: <64b5f2ec-c501-c74f-d74f-e6b2aff50ac1@intel.com>



On 20/04/17 10:29, Michel Thierry wrote:
>
>
> On 20/04/17 09:39, Daniele Ceraolo Spurio wrote:
>>
>>
>> On 20/04/17 04:33, Joonas Lahtinen wrote:
>>> On ke, 2017-04-19 at 11:35 -0700, Michel Thierry wrote:
>>>> From: Arun Siluvery <arun.siluvery@linux.intel.com>
>>>>
>>>> GuC expects a list of registers from the driver which are
>>>> saved/restored
>>>> during engine reset. The type of value to be saved is controlled by
>>>> flags. We provide a minimal set of registers that we want GuC to save
>>>> and
>>>> restore. This is not an issue in case of engine reset as driver
>>>> initializes
>>>> most of them following an engine reset, but in case of media reset (aka
>>>> watchdog reset) which is completely internal to GuC (including
>>>> resubmission
>>>> of hung workload), it is necessary to provide this list, otherwise
>>>> GuC won't
>>>> be able to schedule further workloads after a reset. This is the
>>>> minimal
>>>> set of registers identified for things to work as expected but if we
>>>> see
>>>> any new issues, this register list can be expanded.
>>>>
>>>> In order to not loose any existing workarounds, we have to let GuC know
>>>> the registers and its values. These will be reapplied after the reset.
>>>> Note that we can't just read the current value because most of these
>>>> registers are masked (so we have a workaround for a workaround for a
>>>> workaround).
>>>>
>>>> v2: REGSET_MASKED is too difficult for GuC, use
>>>> REGSET_SAVE_DEFAULT_VALUE
>>>> and current value from RING_MODE reg instead; no need to preserve
>>>> head/tail either, be extra paranoid and save whitelisted registers
>>>> (Daniele).
>>>>
>>>> v3: Workarounds added only once during _init_workarounds also have to
>>>> been restored, or we risk loosing them after internal GuC reset
>>>> (Daniele).
>>>>
>>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
>>>> Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
>>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>>
>>> <SNIP>
>>>
>>>> @@ -732,15 +755,16 @@ static int gen9_init_workarounds(struct
>>>> intel_engine_cs *engine)
>>>>>      int ret;
>>>>
>>>>      /* WaConextSwitchWithConcurrentTLBInvalidate:skl,bxt,kbl,glk */
>>>> -    I915_WRITE(GEN9_CSFE_CHICKEN1_RCS,
>>>> _MASKED_BIT_ENABLE(GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE));
>>>> +    I915_GUC_REG_WRITE(GEN9_CSFE_CHICKEN1_RCS,
>>>> +
>>>> _MASKED_BIT_ENABLE(GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE));
>>>
>>> To make grepping easier, how about?
>>>
>>>     I915_WRITE(GUC_REG(GEN9_CSFE_CHICKEN1_RCS),
>>>            ...);
>>>
>>> Regards, Joonas
>>>
>>
>> GUC_REG makes it sound like it is somehow related to GuC, while it
>> isn't, we just want GuC to restore its value. What about GUC_REG_RESTORE?
>>
>
> Honestly, I dont care about names, pick one and I add it.
> Just a reminder, we not only need the reg offset, we want to save the
> value too.
>

I915_WRITE_GUC_RESTORE(reg, value) ?

That would be inline to the others we have, e.g. I915_WRITE_FW, 
I915_WRITE_CTL, I915_WRITE_HEAD/TAIL.

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

  reply	other threads:[~2017-04-21 20:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <02fb15a-d90a-7d82-ab57-032a77636ba8@intel.com>
2017-04-19 18:35 ` [PATCH v6 13/20] drm/i915/guc: Provide register list to be saved/restored during engine reset Michel Thierry
2017-04-20 11:33   ` Joonas Lahtinen
2017-04-20 16:39     ` Daniele Ceraolo Spurio
2017-04-20 17:29       ` Michel Thierry
2017-04-21 20:07         ` Michel Thierry [this message]
2017-04-21 20:10           ` Daniele Ceraolo Spurio
2017-04-21 20:21             ` Chris Wilson
2017-04-21 20:31               ` Michel Thierry
2017-04-18 20:23 [PATCH v6 00/20] Gen8+ engine-reset Michel Thierry
2017-04-18 20:23 ` [PATCH v6 13/20] drm/i915/guc: Provide register list to be saved/restored during engine reset Michel Thierry
2017-04-19  0:26   ` Daniele Ceraolo Spurio
2017-04-19  0:44     ` Michel Thierry

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=bd79234c-60b3-0fa6-0e56-1ae969e47e7c@intel.com \
    --to=michel.thierry@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.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 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.