mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 13:11:45 +00:00
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>
This commit is contained in:
parent
f28c38ae86
commit
a9ff999538
@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
|
||||
}
|
||||
}
|
||||
|
||||
/* No relocs should remain at this point */
|
||||
if (fw->num_relocs)
|
||||
err = -EINVAL;
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
|
||||
offset += g->words * sizeof(u32);
|
||||
}
|
||||
|
||||
/* No relocs should remain at this point */
|
||||
if (fw.num_relocs)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user