From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Fry Gregory P <gregory.p.fry@intel.com>,
Chheda Harsh J <harsh.j.chheda@intel.com>
Subject: Re: [PATCH v7 2/2] drm/i915/guc: Enable default/critical logging in GuC by default from GuC v9
Date: Fri, 22 Sep 2017 15:04:17 +0300 [thread overview]
Message-ID: <1506081857.6232.102.camel@linux.intel.com> (raw)
In-Reply-To: <1506074867-32714-3-git-send-email-sagar.a.kamble@intel.com>
On Fri, 2017-09-22 at 15:37 +0530, Sagar Arun Kamble wrote:
> With GuC v9, new type of Default/critical logging in GuC to enable
> capturing minimal important logs in production systems efficiently.
> This patch enables this logging in GuC by default always. It should
> be noted that streaming support with half-full interrupt mechanism
> that is present for normal logging is not present for this type of
> logging.
The commit message would be a good place to debrief the user impact. Do
we have the tools to capture the new style of log?
And question is why do we enable any logging by default, let it have
much or little impact on performance? This flag should probably be set
through debugfs or some other means when we know we're going to want
debugging output.
> v2: Emulated GuC critical logging through i915.guc_log_level.
>
> v3: Commit message update. Enable default/critical logging in GuC always.
> Fixed RPM wake during guc_log_unregister in the unload path.
>
> v4: Moved RPM wake change to separate patch. Removed GUC_DEBUG_RESERVED
> and updated name of new bit to be version agnostic. Updated parameter to
> struct intel_guc * and name of macro NEEDS_GUC_CRITICAL_LOGGING.
> Removed explicit clearing of GUC_CRITICAL_LOGGING_DISABLED from
> params[GUC_CTL_DEBUG] as it is unnecessary. (Michal Wajdeczko)
>
> v5: Removed GUC_CRITICAL_LOGGING_DISABLED. Added HAS_GUC check to
> GUC_NEEDS_CRITICAL_LOGGING. (Michal Wajdeczko)
>
> v6: More refined version of GUC_NEEDS_CRITICAL_LOGGING. Commit message
> update. (Michal Wajdeczko)
>
> Cc: Chheda Harsh J <harsh.j.chheda@intel.com>
> Cc: Fry Gregory P <gregory.p.fry@intel.com>
> Cc: Spotswood John A <john.a.spotswood@intel.com>
> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
<SNIP>
> @@ -586,10 +586,18 @@ void intel_guc_log_destroy(struct intel_guc *guc)
> i915_vma_unpin_and_release(&guc->log.vma);
> }
>
> +/*
> + * Critical logging in GuC is to be enabled always from GuC v9+.
> + * (for KBL - v9.39+)
> + */
> +#define GUC_NEEDS_CRITICAL_LOGGING(guc) \
> + (HAS_GUC(guc_to_i915(guc)) && \
> + (guc->fw.major_ver_found >= 9) && \
> + (guc->fw.minor_ver_found >= (IS_KABYLAKE(guc_to_i915(guc)) ? 39 : 0)))
I'd like to avoid this kind of conditionals as much as possible, to the
extent that we must consider just not loading GuC at all if we're not
finding an at least the firmware version we specify our code needs.
That's what the distros are going to package, so we don't have to be
backwards compatible.
So this would be a question of IS_PLATFORM()s like elsewhere in the
code once the increased firmware version is specified in the kernel
code.
> @@ -603,6 +611,9 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val)
> if (!log_param.logging_enabled && (i915.guc_log_level < 0))
> return 0;
>
> + if (GUC_NEEDS_CRITICAL_LOGGING(guc))
> + log_param.critical_logging_enabled = 1;
> +
This would then become an "if (INTEL_GEN() >= XYZ)". And it would be
highly preferrable to get a backport to all older versions, too. They
could even ignore the value if it has no visible effect.
I have to admit I think this would be a variable that we read and maybe
print a debug if it's up, if the firmware knows it 'needs this flag up
always'.
Anyway, we just got to organize that CI has both firmware versions
(current and desired) in-place, then patches like this just have the
'increase required GuC version number' patch as as a gating in in front
of this.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-22 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 10:07 [PATCH v7 0/2] Reorganized HuC auth and GuC v9+ Logging change Sagar Arun Kamble
2017-09-22 10:07 ` [PATCH v7 1/2] drm/i915: Reorganize HuC authentication Sagar Arun Kamble
2017-09-22 11:39 ` Joonas Lahtinen
2017-09-22 15:02 ` [PATCH v8 1/1] drm/i915/huc: " Sagar Arun Kamble
2017-09-22 10:07 ` [PATCH v7 2/2] drm/i915/guc: Enable default/critical logging in GuC by default from GuC v9 Sagar Arun Kamble
2017-09-22 10:24 ` Michal Wajdeczko
2017-09-22 14:27 ` Sagar Arun Kamble
2017-09-22 12:04 ` Joonas Lahtinen [this message]
2017-09-22 14:46 ` Sagar Arun Kamble
2017-09-25 10:01 ` Joonas Lahtinen
2017-09-26 6:59 ` Sagar Arun Kamble
2017-09-22 11:47 ` ✗ Fi.CI.BAT: warning for Reorganized HuC auth and GuC v9+ Logging change 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=1506081857.6232.102.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=gregory.p.fry@intel.com \
--cc=harsh.j.chheda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sagar.a.kamble@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