drm/xe/migrate: Cap PTEs written by MI_STORE_DATA_IMM to 510
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 11 Jan 2024 22:02:38 +0000 (14:02 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 12 Jan 2024 17:09:06 +0000 (09:09 -0800)
commitca630876aa98c5118ada07604ed8688ee707ddfa
tree4a0cecd7a88f1bb58706b84c54b9407a600b5c26
parent1113e52ffee7b45def230d10edb1f2924c7b3f9e
drm/xe/migrate: Cap PTEs written by MI_STORE_DATA_IMM to 510

Although MI_STORE_DATA_IMM's "length" field is 10-bits, 0x3FE is
considered the largest legal value accepted.  Since that instruction
field is always encoded in (val-2) format, this translates to 0x400
dwords for the true maximum length of the instruction.  Subtracting the
instruction header (1 dword) and address (2 dwords), that leaves 0x3FD
dwords (i.e., 0x1FE qwords) for PTE values.

Bspec: 60246, 45753
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20240111220238.1467572-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_migrate.c