From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Dong, Zhanjun" <zhanjun.dong@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>
Subject: Re: [PATCH v3] drm/xe/guc: Update GuC log buffer type value
Date: Mon, 29 Sep 2025 16:11:39 +0000 [thread overview]
Message-ID: <f8c0257b696a789f0c347e855f54a6f43813cc18.camel@intel.com> (raw)
In-Reply-To: <20250925154849.681901-1-zhanjun.dong@intel.com>
On Thu, 2025-09-25 at 11:48 -0400, Zhanjun Dong wrote:
> Update GuC log buffer type value, to align with the GuC
> specification.
>
> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> ---
> Change list:
> v3: Update comments
> v2: Use SZ_4K, instead of PAGE_SIZE
> Expand for loop with switch and fallthrough
> ---
> drivers/gpu/drm/xe/abi/guc_log_abi.h | 2 +-
> drivers/gpu/drm/xe/xe_guc_log.c | 24 ++++++++++++++----------
> 2 files changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/abi/guc_log_abi.h
> b/drivers/gpu/drm/xe/abi/guc_log_abi.h
> index 554630b7ccd9..b1819679fa35 100644
> --- a/drivers/gpu/drm/xe/abi/guc_log_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_log_abi.h
> @@ -10,8 +10,8 @@
>
> /* GuC logging buffer types */
> enum guc_log_buffer_type {
> - GUC_LOG_BUFFER_CRASH_DUMP,
> GUC_LOG_BUFFER_DEBUG,
> + GUC_LOG_BUFFER_CRASH_DUMP,
Looks good - verified this matches the spec.
> GUC_LOG_BUFFER_CAPTURE,
> };
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_log.c
> b/drivers/gpu/drm/xe/xe_guc_log.c
> index c01ccb35dc75..9017abf112bf 100644
> --- a/drivers/gpu/drm/xe/xe_guc_log.c
> +++ b/drivers/gpu/drm/xe/xe_guc_log.c
> @@ -50,15 +50,15 @@ static size_t guc_log_size(void)
> * | Capture state header |
> * +-------------------------------+ 96B
> * | |
> - * +===============================+ PAGE_SIZE (4KB)
> - * | Crash Dump logs |
> - * +===============================+ + CRASH_SIZE
> + * +===============================+ 4KB
> * | Debug logs |
> * +===============================+ + DEBUG_SIZE
> + * | Crash Dump logs |
> + * +===============================+ + CRASH_SIZE
> * | Capture logs |
> * +===============================+ + CAPTURE_SIZE
> */
> - return PAGE_SIZE + CRASH_BUFFER_SIZE + DEBUG_BUFFER_SIZE +
> + return SZ_4K + DEBUG_BUFFER_SIZE + CRASH_BUFFER_SIZE +
> CAPTURE_BUFFER_SIZE;
> }
>
> @@ -327,13 +327,17 @@ u32 xe_guc_get_log_buffer_size(struct
> xe_guc_log *log, enum guc_log_buffer_type
> */
> u32 xe_guc_get_log_buffer_offset(struct xe_guc_log *log, enum
> guc_log_buffer_type type)
> {
> - enum guc_log_buffer_type i;
> - u32 offset = PAGE_SIZE;/* for the log_buffer_states */
> + u32 offset = SZ_4K; /* 1st section size */
Agreed.
>
> - for (i = GUC_LOG_BUFFER_CRASH_DUMP; i <
> GUC_LOG_BUFFER_TYPE_MAX; ++i) {
> - if (i == type)
> - break;
> - offset += xe_guc_get_log_buffer_size(log, i);
> + switch (type) {
> + case GUC_LOG_BUFFER_CAPTURE:
> + offset += xe_guc_get_log_buffer_size(log,
> GUC_LOG_BUFFER_CRASH_DUMP);
> + fallthrough;
> + case GUC_LOG_BUFFER_CRASH_DUMP:
> + offset += xe_guc_get_log_buffer_size(log,
> GUC_LOG_BUFFER_DEBUG);
> + fallthrough;
> + case GUC_LOG_BUFFER_DEBUG:
> + break;
Take a quick look at the CI result before merging, but otherwise these
changes look good:
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
> }
>
> return offset;
prev parent reply other threads:[~2025-09-29 16:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 15:48 [PATCH v3] drm/xe/guc: Update GuC log buffer type value Zhanjun Dong
2025-09-25 15:54 ` ✓ CI.KUnit: success for drm/xe/guc: Update GuC log buffer type value (rev3) Patchwork
2025-09-25 16:49 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-25 23:09 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-29 16:10 ` Summers, Stuart
2025-09-29 16:11 ` Summers, Stuart [this message]
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=f8c0257b696a789f0c347e855f54a6f43813cc18.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=Michal.Wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=zhanjun.dong@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