[PATCH] drm/xe/guc_submit: Simplify and fix diff calculation

Raag Jadav raag.jadav at intel.com
Tue May 13 14:59:54 UTC 2025


On Tue, May 13, 2025 at 07:25:49AM -0700, Lucas De Marchi wrote:
> With a u32 type, there's no need to check which one is greater: the
> current is always the latest and if it's less than the previous, it's
> because it wrapped: just do the unsigned calculation that will lead to
> the same result, or better the correct one. It fixes an off-by-one in
> the wrapped calculation, however that doesn't really matter for the
> timeout calculation.

I remember coming across something similar in hwmon as well.

> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Raag Jadav <raag.jadav at intel.com>


More information about the Intel-xe mailing list