Commit 27897d7a authored by Tvrtko Ursulin's avatar Tvrtko Ursulin

gem_wsim: Fix calibration handling

Intended use case was that run without arguments prints out the
calibrations which can be simply copied and pasted to the -n argument and
things should just work.

Two problems we need to solve: If the print out loops shows zero
calibrations (engine not present) they are later rejected and also if some
calibration is not given it is only an error if it needs to be used
(engine present).
Signed-off-by: Tvrtko Ursulin's avatarTvrtko Ursulin <>
Reviewed-by: Chris Wilson's avatarChris Wilson <>
parent 61d49ef6
Pipeline #164291 passed with stages
in 13 minutes and 43 seconds
......@@ -295,8 +295,8 @@ print_engine_calibrations(void)
printf("Nop calibration for %uus delay is: ", nop_calibration_us);
for (int i = 0; i < NUM_ENGINES; i++) {
/* skip DEFAULT and VCS engines */
if (i != DEFAULT && i != VCS) {
/* skip engines not present and DEFAULT and VCS */
if (i != DEFAULT && i != VCS && engine_calib_map[i]) {
if (first_entry) {
printf("%s=%lu", ring_str_map[i], engine_calib_map[i]);
first_entry = false;
......@@ -2831,22 +2831,6 @@ int main(int argc, char **argv)
if (verbose)
goto out;
} else {
bool missing = false;
for (i = 0; i < NUM_ENGINES; i++) {
if (i == VCS)
if (!engine_calib_map[i]) {
wsim_err("Missing calibration for '%s'!\n",
missing = true;
if (missing)
goto err;
if (!nr_w_args) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment