diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-01-31 01:14:37 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:27:48 +0300 |
commit | 3319b213d7c8bdeaa001fec7b60aefa2390112d4 (patch) | |
tree | 608bfb15dd442d02ddf21ac41614953a77b0f972 /drivers/gpu/drm/xe/xe_gt_mcr.c | |
parent | 43f98df1f5f0ef94d79ba2ef4f841a3f547f7a04 (diff) | |
download | linux-3319b213d7c8bdeaa001fec7b60aefa2390112d4.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gt_mcr.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_gt_mcr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c index 7c97031cd716..d7c89f7b56e2 100644 --- a/drivers/gpu/drm/xe/xe_gt_mcr.c +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c @@ -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) |