gpu: host1x: do not check previously handled gathers
PATCH 1/1 gpu: host1x: do not check previously handled gathers
When patching gathers, we don't need to check against gathers with lower indices than the current one, as they are guaranteed to already have been handled.
---
Here's a trivial optimization I have been running with for a while.
drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/host1x/job.c +1 -1
@@ -534,7 +534,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev) g->base = job->gather_addr_phys[i]; -for (j =0 ; j < job->num_gathers; j++) +for (j = i +1 ; j < job->num_gathers; j++)if (job->gathers[j].bo == g->bo) job->gathers[j].handled = true;
Signature · 1 line
1.8.1.2
Ping?
Quoted 28 lines · Erik Faye-Lund
When patching gathers, we don't need to check against gathers with lower indices than the current one, as they are guaranteed to already have been handled.
Signed-off-by Erik Faye-Lund <[email protected]>---
Here's a trivial optimization I have been running with for a while.
drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/host1x/job.c +1
-2@@ -534,7 +534,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev) g->base = job->gather_addr_phys[i]; -for (j =0 ; j < job->num_gathers; j++) +for (j = i +1 ; j < job->num_gathers; j++)if (job->gathers[j].bo == g->bo) job->gathers[j].handled = true; --1.8.1.2
Quoted 17 lines · Erik Faye-Lund
When patching gathers, we don't need to check against gathers with lower indices than the current one, as they are guaranteed to already have been handled.
Signed-off-by Erik Faye-Lund <[email protected]>---
Here's a trivial optimization I have been running with for a while.
drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/host1x/job.c +0
-0
drivers/gpu/host1x/job.c int host1x_job_pin(struct host1x_job *job, struct device *dev) · line 540
Quoted 8 lines
drivers/gpu/host1x/job.c +1
-1@@ -534,7 +534,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev) g->base = job->gather_addr_phys[i]; -for (j =0 ; j < job->num_gathers; j++) +for (j = i +1 ; j < job->num_gathers; j++)if (job->gathers[j].bo == g->bo) job->gathers[j].handled = true;
Hi,
Thanks. This looks good logically, and I ran some tests that agree.
Terje
Thierry Reding
AppliedQuoted 11 lines · Erik Faye-Lund
When patching gathers, we don't need to check against gathers with lower indices than the current one, as they are guaranteed to already have been handled.
Signed-off-by Erik Faye-Lund <[email protected]>---
Here's a trivial optimization I have been running with for a while.
drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks!
Thierry
Thierry Reding
AppliedQuoted 11 lines · Erik Faye-Lund
When patching gathers, we don't need to check against gathers with lower indices than the current one, as they are guaranteed to already have been handled.
Signed-off-by Erik Faye-Lund <[email protected]>---
Here's a trivial optimization I have been running with for a while.
drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks!
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel