All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] gpu: host1x: Store device address to all bufs
@ 2016-11-08 17:51 Mikko Perttunen
       [not found] ` <20161108175135.32004-1-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2016-11-11 14:31 ` [PATCH 1/4] gpu: host1x: Store device address to all bufs Thierry Reding
  0 siblings, 2 replies; 8+ messages in thread
From: Mikko Perttunen @ 2016-11-08 17:51 UTC (permalink / raw)
  To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Arto Merilainen,
	Andrew Chew, Mikko Perttunen

From: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Currently job pinning is optimized to handle only the first buffer
using a certain host1x_bo object and all subsequent buffers using
the same host1x_bo are considered done.

In most cases this is correct, however, in case the same host1x_bo
is used in multiple gathers inside the same job, we skip also
storing the device address (physical or iova) to this buffer.

This patch reworks the host1x_job_pin() to store the device address
to all gathers.

Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/gpu/host1x/job.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index a91b7c4..92c3df9 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -1,7 +1,7 @@
 /*
  * Tegra host1x Job
  *
- * Copyright (c) 2010-2013, NVIDIA Corporation.
+ * Copyright (c) 2010-2015, NVIDIA Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -539,9 +539,12 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
 
 		g->base = job->gather_addr_phys[i];
 
-		for (j = i + 1; j < job->num_gathers; j++)
-			if (job->gathers[j].bo == g->bo)
+		for (j = i + 1; j < job->num_gathers; j++) {
+			if (job->gathers[j].bo == g->bo) {
 				job->gathers[j].handled = true;
+				job->gathers[j].base = g->base;
+			}
+		}
 
 		err = do_relocs(job, g->bo);
 		if (err)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-11 14:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 17:51 [PATCH 1/4] gpu: host1x: Store device address to all bufs Mikko Perttunen
     [not found] ` <20161108175135.32004-1-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-08 17:51   ` [PATCH 2/4] gpu: host1x: Add locking to syncpt Mikko Perttunen
     [not found]     ` <20161108175135.32004-2-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-11 14:33       ` Thierry Reding
2016-11-08 17:51   ` [PATCH 3/4] drm/tegra: Support kernel mappings with IOMMU Mikko Perttunen
     [not found]     ` <20161108175135.32004-3-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-11 14:36       ` Thierry Reding
2016-11-08 17:51   ` [PATCH 4/4] drm/tegra: Set sgt pointer in BO pin Mikko Perttunen
2016-11-11 14:38     ` Thierry Reding
2016-11-11 14:31 ` [PATCH 1/4] gpu: host1x: Store device address to all bufs Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.