[PATCH v2] drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16

Nilawar, Badal badal.nilawar at intel.com
Tue Aug 27 11:12:29 UTC 2024



On 26-08-2024 19:06, Karthik Poosa wrote:
> WRITE_I1 sub command of POWER_SETUP pcode command takes param of u16
> instead u32. Corrected it.
> Without this pcode may return illegal sub command errorsCould you please rephrase the commit message. May be like this "The 
WRITE_I1 sub-command of the POWER_SETUP pcode command accepts a u16 
parameter instead of u32. This change prevents potential illegal 
sub-command errors."

Regards,
Badal
> 
> v2: Mask uval instead of changing the prototype. (Badal)
> 
> Signed-off-by: Karthik Poosa <karthik.poosa at intel.com>
> Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power")
> ---
>   drivers/gpu/drm/xe/xe_hwmon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 832ea81faeee..1faeca70900e 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -450,7 +450,7 @@ static int xe_hwmon_pcode_write_i1(struct xe_gt *gt, u32 uval)
>   {
>   	return xe_pcode_write(gt, PCODE_MBOX(PCODE_POWER_SETUP,
>   			      POWER_SETUP_SUBCOMMAND_WRITE_I1, 0),
> -			      uval);
> +			      (uval & POWER_SETUP_I1_DATA_MASK));
>   }
>   
>   static int xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, int channel,


More information about the Intel-xe mailing list