Skip to contentSkip to conversation

gpu: host1x: do not check previously handled gathers

PATCH Applied Erik Faye-Lund 3 participants 5 messages Jan 7, 2014 – Feb 12, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index de5ec33..e965805 100644
@@ -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
#1 lore raw

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.

---

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
index de5ec33..e965805 100644
@@ -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

Acked-by on v1 1/1
#2 lore raw
In reply to Erik Faye-Lund
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.

---

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
index de5ec33..e965805 100644

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

#3 lore raw
In reply to Erik Faye-Lund
Quoted 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.

---

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

#4 lore raw
In reply to Erik Faye-Lund
Quoted 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.

---

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