[PATCH V2 3/3] gpu: host1x: Record the physical address for gathers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The gather's base physical address is recorded during patching of gathers,
but only the 1st one within the same buffer object has it set, subsequent
gathers in the same buffer are being skipped.
This patch records the phys addr during pin_job for all gathers.

Signed-off-by: David Ung <davidu@xxxxxxxxxx>
---
 drivers/gpu/host1x/job.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 7ecbefd..6b374bc 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -202,17 +202,16 @@ static unsigned int pin_job(struct host1x_job *job)
 	for (i = 0; i < job->num_gathers; i++) {
 		struct host1x_job_gather *g = &job->gathers[i];
 		struct sg_table *sgt;
-		dma_addr_t phys_addr;
 
 		g->bo = host1x_bo_get(g->bo);
 		if (!g->bo)
 			goto unpin;
 
-		phys_addr = host1x_bo_pin(g->bo, &sgt);
-		if (!phys_addr)
+		g->base = host1x_bo_pin(g->bo, &sgt);
+		if (!g->base)
 			goto unpin;
 
-		job->gather_addr_phys[i] = phys_addr;
+		job->gather_addr_phys[i] = g->base;
 		job->unpins[job->num_unpins].bo = g->bo;
 		job->unpins[job->num_unpins].sgt = sgt;
 		job->num_unpins++;
@@ -536,8 +535,6 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
 		if (g->handled)
 			continue;
 
-		g->base = job->gather_addr_phys[i];
-
 		for (j = i + 1; j < job->num_gathers; j++)
 			if (job->gathers[j].bo == g->bo)
 				job->gathers[j].handled = true;
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux