diff options
author | Mayuresh Kulkarni <mkulkarni@nvidia.com> | 2012-04-09 12:21:24 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-05-24 14:43:25 -0700 |
commit | dfa3030e767dca384f5d159c6993d5ee25b416d7 (patch) | |
tree | cd37c5ddf6083a7bb207376148d23e559f7137c6 /drivers/video/tegra/host/nvhost_job.h | |
parent | 8e9dc6ce7d8cafba0e65123b2f76320309e8388c (diff) |
video: tegra: host: rewrite nvhost_job_pin/unpin APIs
- remove usage of custom interface of nvmap to patch the relocs and
and pin the gathers/relocs
- convert code that references nvmap_handle to nvmap_handle_ref
- add logic to pin and map only unique gathers and relocs
- rename nvhost_channel_gather to nvhost_job_gather, because it's
used in nvhost_job code only
Bug 965206
Change-Id: Iaa7fbac9e4a7b08c0a7c1e184b8dd3566e1edfe2
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/95299
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/nvhost_job.h')
-rw-r--r-- | drivers/video/tegra/host/nvhost_job.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/video/tegra/host/nvhost_job.h b/drivers/video/tegra/host/nvhost_job.h index ad9d1af60da1..48555a231412 100644 --- a/drivers/video/tegra/host/nvhost_job.h +++ b/drivers/video/tegra/host/nvhost_job.h @@ -29,6 +29,14 @@ struct nvmap_client; struct nvhost_waitchk; struct nvmap_handle; +struct nvhost_job_gather { + u32 words; + phys_addr_t mem; + u32 mem_id; + int offset; + struct nvmap_handle_ref *ref; +}; + /* * Each submit is tracked as a nvhost_job. */ @@ -50,10 +58,8 @@ struct nvhost_job { struct nvmap_client *nvmap; /* Gathers and their memory */ - struct nvmap_handle_ref *gather_mem; - struct nvhost_channel_gather *gathers; + struct nvhost_job_gather *gathers; int num_gathers; - int gather_mem_size; /* Wait checks to be processed at submit time */ struct nvhost_waitchk *waitchk; @@ -62,8 +68,8 @@ struct nvhost_job { /* Array of handles to be pinned & unpinned */ struct nvmap_pinarray_elem *pinarray; - int num_pins; - struct nvmap_handle **unpins; + int num_relocs; + struct nvmap_handle_ref **unpins; int num_unpins; /* Sync point id, number of increments and end related to the submit */ @@ -99,17 +105,6 @@ struct nvhost_job *nvhost_job_alloc(struct nvhost_channel *ch, int priority, int clientid); /* - * Allocate memory for a job. Just enough memory will be allocated to - * accomodate the submit announced in submit header. Gather memory from - * oldjob will be reused, and nvhost_job_put() will be called to it. - */ -struct nvhost_job *nvhost_job_realloc(struct nvhost_job *oldjob, - struct nvhost_hwctx *hwctx, - struct nvhost_submit_hdr_ext *hdr, - struct nvmap_client *nvmap, - int priority, int clientid); - -/* * Add a gather to a job. */ void nvhost_job_add_gather(struct nvhost_job *job, |