]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/pcode: Initialize data0 for pcode read routine
authorStuart Summers <stuart.summers@intel.com>
Tue, 19 Aug 2025 20:10:54 +0000 (20:10 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 22 Aug 2025 16:26:06 +0000 (12:26 -0400)
commit2515d2b9ab4108c11a0b23935e68de27abb8b2a7
tree19306fc59d1b83f8931d3e96be7f63875244b576
parentbc2b2062682a7f8d828b0020e37a84a9234f03a6
drm/xe/pcode: Initialize data0 for pcode read routine

There are two registers filled in when reading data from
pcode besides the mailbox itself. Currently, we allow a NULL
value for the second of these two (data1) and assume the first
is defined. However, many of the routines that are calling
this function assume that pcode will ignore the value being
passed in and so leave that first value (data0) defined but
uninitialized. To be safe, make sure this value is always
initialized to something (0 generally) in the event pcode
behavior changes and starts using this value.

v2: Fix sob/author

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://lore.kernel.org/r/20250819201054.393220-1-stuart.summers@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device_sysfs.c
drivers/gpu/drm/xe/xe_hwmon.c
drivers/gpu/drm/xe/xe_vram_freq.c