Skip to content

Commit a9ff999

Browse files
kusmathierryreding
authored andcommitted
gpu: host1x: check relocs after all gathers are consumed
The num_relocs count are passed to the kernel per job, not per gather. For multi-gather jobs, we would previously fail if there were relocs in other gathers aside from the first one. Fix this by simply moving the check until all gathers have been consumed. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Acked-By: Terje Bergstrom <tbergstrom@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
1 parent f28c38a commit a9ff999

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/gpu/host1x/job.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
436436
}
437437
}
438438

439-
/* No relocs should remain at this point */
440-
if (fw->num_relocs)
441-
err = -EINVAL;
442-
443439
out:
444440
return err;
445441
}
@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
493489
offset += g->words * sizeof(u32);
494490
}
495491

492+
/* No relocs should remain at this point */
493+
if (fw.num_relocs)
494+
return -EINVAL;
495+
496496
return 0;
497497
}
498498

0 commit comments

Comments
 (0)