diff options
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index fae657c..3a65361 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -7249,6 +7249,40 @@ static int gsp_phys_rmcall_alloc_channel(void __iomem *bar0) vars = &gsp_phys_rmcall_channel_variants[0]; attempts = 1; } + /* + * Optional explicit force (gsp_phys_rmcall_channel=N): pin the walk to + * one variant after the mode-based selection so a bisection can pair + * any promote shape with any channel shape (e.g. V6 skip-ctxbuffer + + * the srvctx VA-only promote). + */ + if (gsp_phys_rmcall_engine_is_gr() && + gsp_phys_rmcall_channel_value() != 0) { + u32 force = (u32)gsp_phys_rmcall_channel_value(); + u32 j; + bool found = false; + + for (j = 0; j < ARRAY_SIZE(gsp_phys_rmcall_channel_variants); + j++) { + if (gsp_phys_rmcall_channel_variants[j].id != force) + continue; + vars = &gsp_phys_rmcall_channel_variants[j]; + found = true; + break; + } + if (!found && + gsp_phys_rmcall_channel_variant_skipctx.id == force) { + vars = &gsp_phys_rmcall_channel_variant_skipctx; + found = true; + } + if (!found) { + pr_err("vgsp-boot: rm-call: gsp_phys_rmcall_channel=%u is not a known variant id (1/3/4/5/6); aborting the ladder\n", + force); + return -EINVAL; + } + attempts = 1; + pr_info("vgsp-boot: rm-call: gsp_phys_rmcall_channel=%u forces channel variant V%u (%s) alone\n", + force, vars[0].id, vars[0].name); + } ret = -EIO; for (i = 0; i < attempts; i++) { |
