drm/xe/mcr: Use designated init for xe_steering_types

There is already a BUILD_BUG_ON() check to make sure the size follow the
number of steering types. Also make sure the right index is being used
for each steering type.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Lucas De Marchi
2023-01-30 14:14:37 -08:00
committed by Rodrigo Vivi
parent 43f98df1f5
commit 3319b213d7

View File

@ -249,12 +249,12 @@ static const struct {
const char *name;
void (*init)(struct xe_gt *);
} xe_steering_types[] = {
{ "L3BANK", init_steering_l3bank },
{ "MSLICE", init_steering_mslice },
{ "LNCF", NULL }, /* initialized by mslice init */
{ "DSS", init_steering_dss },
{ "OADDRM", init_steering_oaddrm },
{ "INSTANCE 0", init_steering_inst0 },
[L3BANK] = { "L3BANK", init_steering_l3bank },
[MSLICE] = { "MSLICE", init_steering_mslice },
[LNCF] = { "LNCF", NULL }, /* initialized by mslice init */
[DSS] = { "DSS", init_steering_dss },
[OADDRM] = { "OADDRM", init_steering_oaddrm },
[INSTANCE0] = { "INSTANCE 0", init_steering_inst0 },
};
void xe_gt_mcr_init(struct xe_gt *gt)