Commit a9ff9995 authored by Erik Faye-Lund's avatar Erik Faye-Lund Committed by Thierry Reding

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: default avatarErik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: default avatarArto Merilainen <amerilainen@nvidia.com>
Acked-By: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent f28c38ae
...@@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g) ...@@ -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: out:
return err; return err;
} }
...@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev) ...@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
offset += g->words * sizeof(u32); offset += g->words * sizeof(u32);
} }
/* No relocs should remain at this point */
if (fw.num_relocs)
return -EINVAL;
return 0; return 0;
} }
......
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