]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: API to add gather with IOVA
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 2 Feb 2015 10:38:03 +0000 (16:08 +0530)
committerArto Merilainen <amerilainen@nvidia.com>
Mon, 23 Feb 2015 14:12:55 +0000 (06:12 -0800)
Add and expose below API to add a gather along with
its IOVA address from within Kernel
nvhost_job_add_client_gather_address()

Bug 1584065

Change-Id: I77ecbee3b320afa2763e4aa04261c9a4b7057620
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/680109
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
drivers/video/tegra/host/nvhost_job.c
drivers/video/tegra/host/nvhost_job.h

index 81b10e0dbb23d5cc713e7155f01dba6845276bd4..1cad1d71aed13e9a88ed919657e3998e8af564ef 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Tegra Graphics Host Job
  *
- * Copyright (c) 2010-2014, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2015, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -142,6 +142,16 @@ void nvhost_job_put(struct nvhost_job *job)
        kref_put(&job->ref, job_free);
 }
 
+int nvhost_job_add_client_gather_address(struct nvhost_job *job,
+               u32 num_words, u32 class_id, dma_addr_t gather_address)
+{
+       nvhost_job_add_gather(job, 0, num_words, 0, class_id, 0);
+
+       job->gathers[0].mem_base = gather_address;
+
+       return 0;
+}
+
 void nvhost_job_add_gather(struct nvhost_job *job,
                u32 mem_id, u32 words, u32 offset, u32 class_id, int pre_fence)
 {
index 0302571bb54a22c1a57aff7c8ea6cf1b0d837744..52b70aa8f3bd63e7098265db1e3e5a8abe900308 100644 (file)
@@ -140,6 +140,12 @@ struct nvhost_job *nvhost_job_alloc(struct nvhost_channel *ch,
 void nvhost_job_add_gather(struct nvhost_job *job,
                u32 mem_id, u32 words, u32 offset, u32 class_id, int pre_fence);
 
+/*
+ * Add a gather with IOVA address to job
+ */
+int nvhost_job_add_client_gather_address(struct nvhost_job *job,
+               u32 num_words, u32 class_id, dma_addr_t gather_address);
+
 /*
  * Increment reference going to nvhost_job.
  */