diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2013-05-29 06:26:02 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2013-06-22 06:43:52 -0400 |
commit | 64c173d3a2bb367c901f1f0a66c1d4e338d8cb2c (patch) | |
tree | e895a5cbf3488498df3bf65463e540208b9d9406 /drivers/gpu/host1x | |
parent | 604faa7dcf772ea4d13f89f0c3cc642b15cc4f45 (diff) |
gpu: host1x: Check INCR opcode correctly
The firewall code used a wrong loop condition (pointer to a
structure) while checking INCR opcode. This patch fixes the code to
use correct loop condition (number of words remaining).
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/job.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index f665d679031c..2974ac8d70a7 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c | |||
@@ -330,7 +330,7 @@ static int check_incr(struct host1x_firewall *fw) | |||
330 | u32 count = fw->count; | 330 | u32 count = fw->count; |
331 | u32 reg = fw->reg; | 331 | u32 reg = fw->reg; |
332 | 332 | ||
333 | while (fw) { | 333 | while (count) { |
334 | if (fw->words == 0) | 334 | if (fw->words == 0) |
335 | return -EINVAL; | 335 | return -EINVAL; |
336 | 336 | ||