Re: [PATCH 10/12] drm/xe/pci: Report unknown GMDID versions using structured xe_log API

[email protected]
Newsgroups org.freedesktop.lists.intel-xe
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `xe_log_err()` macro is called with the `GT` component tag, which incorrectly evaluates to the `XE_SIGID_GT_TDR` (Engine hang / timeout recovery) signature identifier. A probe-time failure due to an unknown hardware IP version will be wrongly logged as a GPU engine hang, breaking telemetry categorization.
--

--- Patch [10]: [PATCH 10/12] drm/xe/pci: Report unknown GMDID versions using structured xe_log API ---
commit 77b6855242b927765ae4947e2d18fd4b7082f834
Author: Dnyaneshwar Bhadane <[email protected]>

drm/xe/pci: Report unknown GMDID versions using structured xe_log API

This commit replaces drm_err() with xe_log_err() using the GT component tag
when hardware reports unrecognized graphics or media IP versions during GMDID
handling.

> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 1e04e8ef2611f..392c9e12e6535 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -718,8 +718,9 @@ static int handle_gmdid(struct xe_device *xe,
>  
>  	*graphics_ip = find_graphics_ip(ver);
>  	if (!*graphics_ip) {
> -		drm_err(&xe->drm, "Hardware reports unknown graphics version %u.%02u\n",
> -			ver / 100, ver % 100);
> +		xe_log_err(xe, GT, -EINVAL,
> +			   "Hardware reports unknown graphics version %u.%02u\n",

[Severity: Medium]
Does the GT component tag in xe_log_err() evaluate to the XE_SIGID_GT_TDR
(Engine hang / timeout recovery) signature identifier?

If so, an early initialization failure in handle_gmdid() due to an unknown
graphics IP version will be wrongly logged as a GPU engine hang, breaking
telemetry categorization.

> +			   ver / 100, ver % 100);
>  	}
>  
>  	ret = read_gmdid(xe, GMDID_MEDIA, &ver, media_revid);
> @@ -732,8 +733,9 @@ static int handle_gmdid(struct xe_device *xe,
>  
>  	*media_ip = find_media_ip(ver);
>  	if (!*media_ip) {
> -		drm_err(&xe->drm, "Hardware reports unknown media version %u.%02u\n",
> -			ver / 100, ver % 100);
> +		xe_log_err(xe, GT, -EINVAL,
> +			   "Hardware reports unknown media version %u.%02u\n",

[Severity: Medium]
Like the graphics IP check above, will using the GT tag here also wrongly log
an unknown media IP version as an engine hang?

> +			   ver / 100, ver % 100);
>  	}
>  
>  	return 0;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.