From: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
To: <John.C.Harrison@Intel.com>, <Intel-GFX@Lists.FreeDesktop.Org>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>,
Jani Nikula <jani.nikula@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Chris Wilson <chris.p.wilson@intel.com>,
Julia Lawall <Julia.Lawall@inria.fr>,
DRI-Devel@Lists.FreeDesktop.Org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915/guc: Fix release build bug in 'remove log size module parameters'
Date: Wed, 14 Sep 2022 17:34:30 -0700 [thread overview]
Message-ID: <5526d4b0-5361-6714-dbf5-29751a452024@intel.com> (raw)
In-Reply-To: <20220913010929.2734885-2-John.C.Harrison@Intel.com>
On 9/12/2022 6:09 PM, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> A patch was merged to remove the GuC log size override module
> parameters. That patch was broken and caused kernel error messages on
> boot in non CONFIG_DEBUG_GUC|GEM builds:
> [ 12.085121] i915 0000:00:02.0: [drm] *ERROR* Zero GuC log crash dump size!
> [ 12.092035] i915 0000:00:02.0: [drm] *ERROR* Zero GuC log debug size!
>
> So fit it.
>
> Fixes: f54e515c9180 ("drm/i915/guc: Remove log size module parameters")
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Julia Lawall <Julia.Lawall@inria.fr>
> Cc: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 25 +---------------------
> 1 file changed, 1 insertion(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> index b071973ac41c1..55d3ef93e86f8 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -36,24 +36,6 @@ struct guc_log_section {
> const char *name;
> };
>
> -static s32 scale_log_param(struct intel_guc_log *log, const struct guc_log_section *section,
> - s32 param)
> -{
> - /* -1 means default */
> - if (param < 0)
> - return section->default_val;
> -
> - /* Check for 32-bit overflow */
> - if (param >= SZ_4K) {
> - drm_err(&guc_to_gt(log_to_guc(log))->i915->drm, "Size too large for GuC %s log: %dMB!",
> - section->name, param);
> - return section->default_val;
> - }
> -
> - /* Param units are 1MB */
> - return param * SZ_1M;
> -}
> -
> static void _guc_log_init_sizes(struct intel_guc_log *log)
> {
> struct intel_guc *guc = log_to_guc(log);
> @@ -78,15 +60,10 @@ static void _guc_log_init_sizes(struct intel_guc_log *log)
> "capture",
> }
> };
> - s32 params[GUC_LOG_SECTIONS_LIMIT] = {
> - GUC_LOG_DEFAULT_CRASH_BUFFER_SIZE / SZ_1M,
> - GUC_LOG_DEFAULT_DEBUG_BUFFER_SIZE / SZ_1M,
> - GUC_LOG_DEFAULT_CAPTURE_BUFFER_SIZE / SZ_1M,
> - };
> int i;
>
> for (i = 0; i < GUC_LOG_SECTIONS_LIMIT; i++)
> - log->sizes[i].bytes = scale_log_param(log, sections + i, params[i]);
> + log->sizes[i].bytes = sections[i].default_val;
>
> /* If debug size > 1MB then bump default crash size to keep the same units */
> if (log->sizes[GUC_LOG_SECTIONS_DEBUG].bytes >= SZ_1M &&
If the user can't tweak the values anymore then we can guarantee that
the sizes use the same units and change this if to a BUILD_BUG_ON() to
check that.
Not a blocker for the fix.
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Daniele
next prev parent reply other threads:[~2022-09-15 0:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 1:09 [Intel-gfx] [PATCH 0/1] Fix 'remove log size module parameters' John.C.Harrison
2022-09-13 1:09 ` [Intel-gfx] [PATCH 1/1] drm/i915/guc: Fix release build bug in " John.C.Harrison
2022-09-15 0:34 ` Ceraolo Spurio, Daniele [this message]
2022-09-13 3:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Fix " Patchwork
2022-09-13 11:29 ` [Intel-gfx] ✓ 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=5526d4b0-5361-6714-dbf5-29751a452024@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=DRI-Devel@Lists.FreeDesktop.Org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@Intel.com \
--cc=Julia.Lawall@inria.fr \
--cc=alan.previn.teres.alexis@intel.com \
--cc=chris.p.wilson@intel.com \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@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