Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/mcr: Avoid clobbering DSS steering

A couple copy/paste mistakes in the code that selects steering targets
for OADDRM and INSTANCE0 unintentionally clobbered the steering target
for DSS ranges in some cases.

The OADDRM/INSTANCE0 values were also not assigned as intended, although
that mistake wound up being harmless since the desired values for those
specific ranges were '0' which the kzalloc of the GT structure should
have already taken care of implicitly.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240626210536.1620176-2-matthew.d.roper@intel.com

+3 -3
+3 -3
drivers/gpu/drm/xe/xe_gt_mcr.c
··· 342 342 else 343 343 gt->steering[OADDRM].group_target = 1; 344 344 345 - gt->steering[DSS].instance_target = 0; /* unused */ 345 + gt->steering[OADDRM].instance_target = 0; /* unused */ 346 346 } 347 347 348 348 static void init_steering_sqidi_psmi(struct xe_gt *gt) ··· 357 357 358 358 static void init_steering_inst0(struct xe_gt *gt) 359 359 { 360 - gt->steering[DSS].group_target = 0; /* unused */ 361 - gt->steering[DSS].instance_target = 0; /* unused */ 360 + gt->steering[INSTANCE0].group_target = 0; /* unused */ 361 + gt->steering[INSTANCE0].instance_target = 0; /* unused */ 362 362 } 363 363 364 364 static const struct {