From: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@Intel.com>
To: sashiko-reviews@lists.linux.dev
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 12/12] drm/xe/vram: Report VRAM errors using structured xe_log API
Date: Thu, 20 Aug 2026 11:36:50 +0530 [thread overview]
Message-ID: <a8489c72-ad2f-4424-a55f-16fc007af506@Intel.com> (raw)
In-Reply-To: <20260819192928.202C21F000E9@smtp.kernel.org>
On 20-Aug-26 12:59 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] Incomplete replacement of drm_info() with xe_log_info() for VRAM reporting.
> - [Low] Brittle error handling by hardcoding -ENODEV instead of using the returned error variable.
> --
>
> --- Patch [12]: [PATCH 12/12] drm/xe/vram: Report VRAM errors using structured xe_log API ---
> commit 0430f39e6a6ab1de29f7a59722a6a22038b4d848
> Author: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
>
> drm/xe/vram: Report VRAM errors using structured xe_log API
>
> Replace drm_err()/drm_info() with xe_log_err_fatal()/xe_log_info()
> using the VRAM component tag.
>
> Move the "no CPU visible VRAM" error out of vram_region_init() into its
> callers so that tile-based usage logs with the tile as location while
> device-level usage logs with the device. This gives better diagnostics
> by identifying which tile has no visible VRAM.
>
>> Replace drm_err()/drm_info() with xe_log_err_fatal()/xe_log_info()
>> using the VRAM component tag.
>
> [Severity: Low]
> Were the drm_info() calls in print_vram_region_info() intentionally skipped?
>
> The commit message mentions replacing drm_info(), but print_vram_region_info()
> in drivers/gpu/drm/xe/xe_vram.c still uses drm_info(). This leaves the VRAM
> logging inconsistent.
>
>> diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
>> index 23eb7edbdd572..9fae593b07413 100644
>> --- a/drivers/gpu/drm/xe/xe_vram.c
>> +++ b/drivers/gpu/drm/xe/xe_vram.c
>
> [ ... ]
>
>> @@ -311,14 +311,18 @@ int xe_vram_probe(struct xe_device *xe)
>> total_size += region_size;
>> available_size += usable_size;
>>
>> - err = vram_region_init(xe, tile->mem.vram, &lmem_bar, tile_offset, usable_size,
>> + err = vram_region_init(xe, tile->mem.vram, &lmem_bar,
>> + tile_offset, usable_size,
>> region_size, remain_io_size);
>> - if (err)
>> + if (err) {
>> + xe_log_err_fatal(tile, VRAM, -ENODEV,
>> + "without any CPU visible VRAM. Aborting.\n");
>
> [Severity: Low]
> Would it be better to pass the 'err' variable here instead of hardcoding
> -ENODEV?
>
> If vram_region_init() is modified in the future to return other error
> codes (like -ENOMEM), this log message will incorrectly report -ENODEV instead
> of the actual error code.
Yes, I should rethink on it. I should pass the extra flag from caller to
determine that whether it is coming for gt or device check. I should
revert these changes and modify the existing function definition.
Dnyaneshwar,>
>> return err;
>> + }
>>
>> if (total_size > lmem_bar.io_size) {
>> - drm_info(&xe->drm, "VRAM: %pa is larger than resource %pa\n",
>> - &total_size, &lmem_bar.io_size);
>> + xe_log_info(xe, VRAM, "%pa is larger than resource %pa\n",
>> + &total_size, &lmem_bar.io_size);
>> }
>>
>> remain_io_size -= min_t(u64, tile->mem.vram->actual_physical_size, remain_io_size);
>> @@ -326,8 +330,11 @@ int xe_vram_probe(struct xe_device *xe)
>>
>> err = vram_region_init(xe, xe->mem.vram, &lmem_bar, 0, available_size, total_size,
>> lmem_bar.io_size);
>> - if (err)
>> + if (err) {
>> + xe_log_err_fatal(xe, VRAM, -ENODEV,
>> + "without any CPU visible VRAM. Aborting.\n");
>
> [Severity: Low]
> Should this also use the 'err' variable instead of hardcoding -ENODEV?
>
>> return err;
>> + }
>>
>> return devm_add_action_or_reset(xe->drm.dev, vram_fini, xe);
>> }
>
next prev parent reply other threads:[~2026-08-20 6:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 19:14 [PATCH 00/12] drm/xe: Convert IO_BUS errors to structured xe_log API Dnyaneshwar Bhadane
2026-08-19 19:14 ` [PATCH 01/12] drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components Dnyaneshwar Bhadane
2026-08-19 19:14 ` [PATCH 02/12] drm/xe/ggtt: Report GGTT errors using structured logging Dnyaneshwar Bhadane
2026-08-19 19:14 ` [PATCH 03/12] drm/xe/hwmon: Report errors using structured xe_log API Dnyaneshwar Bhadane
2026-08-19 19:23 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 04/12] drm/xe/mmio: Report BAR mapping " Dnyaneshwar Bhadane
2026-08-19 19:14 ` [PATCH 05/12] drm/xe/memirq: Report " Dnyaneshwar Bhadane
2026-08-19 19:22 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 06/12] drm/xe/reg_whitelist: Report whitelist overflow " Dnyaneshwar Bhadane
2026-08-19 19:22 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 07/12] drm/xe/reg_sr: Report save-restore errors " Dnyaneshwar Bhadane
2026-08-19 19:14 ` [PATCH 08/12] drm/xe/pat: Assert pat.ops before dereferencing members Dnyaneshwar Bhadane
2026-08-19 19:22 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 09/12] drm/xe/pat: Report missing PAT table using structured xe_log API Dnyaneshwar Bhadane
2026-08-19 19:23 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 10/12] drm/xe/pci: Report unknown GMDID versions " Dnyaneshwar Bhadane
2026-08-19 19:27 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 11/12] drm/xe/lmtt: Report invalidation errors " Dnyaneshwar Bhadane
2026-08-19 19:28 ` sashiko-bot
2026-08-19 19:14 ` [PATCH 12/12] drm/xe/vram: Report VRAM " Dnyaneshwar Bhadane
2026-08-19 19:29 ` sashiko-bot
2026-08-20 6:06 ` Dnyaneshwar Bhadane [this message]
2026-08-19 19:23 ` ✓ CI.KUnit: success for drm/xe: Convert IO_BUS errors to " Patchwork
2026-08-19 20:45 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-20 1:38 ` ✗ Xe.CI.FULL: failure " 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=a8489c72-ad2f-4424-a55f-16fc007af506@Intel.com \
--to=dnyaneshwar.bhadane@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.