From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Zhanjun Dong <zhanjun.dong@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <lucas.demarchi@intel.com>
Subject: Re: [PATCH v5 1/2] drm/xe/guc: Update GuC log buffer type value
Date: Tue, 21 Oct 2025 19:23:40 +0200 [thread overview]
Message-ID: <11def395-7b94-4029-8537-2c720e886113@intel.com> (raw)
In-Reply-To: <20251009215749.378905-2-zhanjun.dong@intel.com>
On 10/9/2025 11:57 PM, Zhanjun Dong wrote:
> Update GuC log buffer type value, to align with the GuC specification.
> Update buffer offset calulation.
typo
>
> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> ---
> drivers/gpu/drm/xe/abi/guc_log_abi.h | 2 +-
> drivers/gpu/drm/xe/xe_guc_log.c | 13 +++++++++----
> 2 files changed, 10 insertions(+), 5 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,
> 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..b5d837efaf74 100644
> --- a/drivers/gpu/drm/xe/xe_guc_log.c
> +++ b/drivers/gpu/drm/xe/xe_guc_log.c
> @@ -330,10 +330,15 @@ u32 xe_guc_get_log_buffer_offset(struct xe_guc_log *log, enum guc_log_buffer_typ
> enum guc_log_buffer_type i;
> u32 offset = PAGE_SIZE;/* for the log_buffer_states */
btw, this should be fixed SZ_4K, not a config PAGE_SIZE
>
> - 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_LOG_CRASH_BUFFER_SIZE;
../drivers/gpu/drm/xe/xe_guc_log.c: In function ‘xe_guc_get_log_buffer_offset’:
../drivers/gpu/drm/xe/xe_guc_log.c:335:27: error: ‘XE_GUC_LOG_CRASH_BUFFER_SIZE’ undeclared (first use in this function)
335 | offset += XE_GUC_LOG_CRASH_BUFFER_SIZE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + fallthrough;
> + case GUC_LOG_BUFFER_CRASH_DUMP:
> + offset += XE_GUC_LOG_EVENT_LOG_BUFFER_SIZE;
> + fallthrough;
> + case GUC_LOG_BUFFER_EVENT_LOG:
> + break;
> }
>
> return offset;
next prev parent reply other threads:[~2025-10-21 17:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 21:57 [PATCH v5 0/2] drm/xe/guc: Cleanup GuC log buffer macros and helpers Zhanjun Dong
2025-10-09 21:57 ` [PATCH v5 1/2] drm/xe/guc: Update GuC log buffer type value Zhanjun Dong
2025-10-21 17:23 ` Michal Wajdeczko [this message]
2025-10-21 17:50 ` Dong, Zhanjun
2025-10-09 21:57 ` [PATCH v5 2/2] drm/xe/guc: Add prefix to guc log buffer macros Zhanjun Dong
2025-10-21 17:49 ` Michal Wajdeczko
2025-10-21 21:13 ` Dong, Zhanjun
2025-10-21 21:25 ` Michal Wajdeczko
2025-10-09 23:22 ` ✓ CI.KUnit: success for drm/xe/guc: Cleanup GuC log buffer macros and helpers (rev2) Patchwork
2025-10-10 0:17 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-10 9:04 ` ✓ Xe.CI.Full: " 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=11def395-7b94-4029-8537-2c720e886113@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--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