aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2013-10-04 16:18:33 -0400
committerThierry Reding <treding@nvidia.com>2013-10-31 04:20:04 -0400
commita9ff999538ab2bf6d3b1ed8ab5a016bfc6fe2cd1 (patch)
tree801777608998d0a63d02d9ade96248fbbc7ffe22
parentf28c38ae866af00140e8139726ed21de2f4b916b (diff)
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>
-rw-r--r--drivers/gpu/host1x/job.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index c4e1050f2252..c9ddff8c76cd 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
436 } 436 }
437 } 437 }
438 438
439 /* No relocs should remain at this point */
440 if (fw->num_relocs)
441 err = -EINVAL;
442
443out: 439out:
444 return err; 440 return err;
445} 441}
@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
493 offset += g->words * sizeof(u32); 489 offset += g->words * sizeof(u32);
494 } 490 }
495 491
492 /* No relocs should remain at this point */
493 if (fw.num_relocs)
494 return -EINVAL;
495
496 return 0; 496 return 0;
497} 497}
498 498