From: Arto Merilainen <amerilainen@nvidia.com>
To: thierry.reding@gmail.com
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, achew@nvidia.com,
srasal@nvidia.com, dnibade@nvidia.com
Subject: [PATCH 1/4] host1x: Store device address to all bufs
Date: Thu, 21 May 2015 16:20:22 +0300 [thread overview]
Message-ID: <1432214425-27137-2-git-send-email-amerilainen@nvidia.com> (raw)
In-Reply-To: <1432214425-27137-1-git-send-email-amerilainen@nvidia.com>
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@nvidia.com>
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
---
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 63bd63f3c7df..b72aa918fa69 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,
@@ -538,9 +538,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)
--
1.8.1.5
next prev parent reply other threads:[~2015-05-21 13:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 13:20 [PATCH 0/4] Add VIC support for Tegra124 Arto Merilainen
2015-05-21 13:20 ` Arto Merilainen [this message]
2015-05-21 13:20 ` [PATCH 2/4] host1x: Pass register value in firewall Arto Merilainen
2015-05-21 13:20 ` [PATCH 3/4] drm/tegra: Add VIC support Arto Merilainen
2015-05-21 14:40 ` Mikko Perttunen
2015-05-21 15:10 ` Arto Merilainen
2015-05-21 15:44 ` Mikko Perttunen
2015-05-22 10:02 ` Thierry Reding
2015-05-22 10:12 ` Arto Merilainen
2015-05-22 10:13 ` Arto Merilainen
2015-05-22 10:25 ` Thierry Reding
2015-05-25 7:11 ` Arto Merilainen
2015-05-22 11:47 ` Thierry Reding
2015-05-25 8:25 ` Arto Merilainen
2015-05-21 13:20 ` [PATCH 4/4] ARM: tegra: Add VIC for Tegra124 Arto Merilainen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432214425-27137-2-git-send-email-amerilainen@nvidia.com \
--to=amerilainen@nvidia.com \
--cc=achew@nvidia.com \
--cc=dnibade@nvidia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=srasal@nvidia.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®