[bug report] drm/xe: Introduce a new DRM driver for Intel GPUs

Matthew Brost matthew.brost at intel.com
Wed Feb 19 17:58:14 UTC 2025


On Wed, Feb 19, 2025 at 12:29:13PM +0300, Dan Carpenter wrote:
> Hello Matthew Brost,
> 
> Commit dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel
> GPUs") from Mar 30, 2023 (linux-next), leads to the following Smatch
> static checker warning:
> 
> drivers/gpu/drm/xe/xe_guc.c:1241 xe_guc_suspend() warn: passing possitive error code '(-110),(-71),(-6),1-268435455' to 'ERR_PTR'
> drivers/gpu/drm/i915/gt/uc/intel_guc.c:698 intel_guc_suspend() warn: passing non-max range '1-268435455' to 'ERR_PTR'
> 
> drivers/gpu/drm/xe/xe_guc.c
>     1231 int xe_guc_suspend(struct xe_guc *guc)
>     1232 {
>     1233         struct xe_gt *gt = guc_to_gt(guc);
>     1234         u32 action[] = {
>     1235                 XE_GUC_ACTION_CLIENT_SOFT_RESET,
>     1236         };
>     1237         int ret;
>     1238 
>     1239         ret = xe_guc_mmio_send(guc, action, ARRAY_SIZE(action));
> 
> The xe_guc_mmio_send() function returns this:
> 
>   1388          /* Use data from the GuC response as our return value */
>   1389          return FIELD_GET(GUC_HXG_RESPONSE_MSG_0_DATA0, header);
> 
> All we know about it is that it's a positive number between 0-0xfffffff.
> 
>     1240         if (ret) {
> --> 1241                 xe_gt_err(gt, "GuC suspend failed: %pe\n", ERR_PTR(ret));
>                                                                             ^^^
> passing positives to ERR_PTR() is verboten.
> 

This looks like a problem. git blame shows this commit though:

12f95f9900c0 drm/xe/guc: Prefer GT oriented logs for GuC messages

Any reason this bug report is indicating 'Introduce a new DRM driver for Intel GPUs'?

Matt

>     1242                 return ret;
>     1243         }
>     1244 
>     1245         xe_guc_sanitize(guc);
>     1246         return 0;
>     1247 }
> 
> regards,
> dan carpenter


More information about the Intel-xe mailing list