[PATCH v2] drm/xe/hwmon: Simplify and fix 32b wrap

Raag Jadav raag.jadav at intel.com
Mon Jun 2 16:16:16 UTC 2025


On Fri, May 30, 2025 at 03:31:57PM -0700, Lucas De Marchi wrote:
> Like done in commit eaa287069a70 ("drm/xe/guc_submit: Simplify and fix
> diff calculation"), just use u32 for wrapping the value, which is
> simpler and more correct: when wrapping on 32b, the accumulated value
> was off by one.
> 
> Also, do not mix the u64 value from pmt with the u32 value used for the
> calculation.
> 
> Cc: Badal Nilawar <badal.nilawar at intel.com>
> Cc: Raag Jadav <raag.jadav at intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> Changes in v2:
> - Rebase - now there's a u64 coming from pmt that was mixed as
>   "reg_val", so use separate variables.
> - Removed previous r-b due to the code changes. Raag, please let me know
>   if you are still ok with this

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


More information about the Intel-xe mailing list