diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-02-10 07:05:58 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:19 -0400 |
commit | 0d8830394adf94fee8f69bc034293d1880e9d8db (patch) | |
tree | c708df6bc3bdd65fccbf4a6bea6e80a128318380 /drivers/gpu/nvgpu/common/pramin.c | |
parent | 1e355ca52e2b3ac5f4e433e1bb115f6fd8499954 (diff) |
gpu: nvgpu: use nvgpu list for page chunks
Use nvgpu list APIs instead of linux list APIs
to store chunks of page allocator
Jira NVGPU-13
Change-Id: I63375fc2df683e018c48a90b76eca368438cc32f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1326814
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pramin.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pramin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c index b9216309..aa732368 100644 --- a/drivers/gpu/nvgpu/common/pramin.c +++ b/drivers/gpu/nvgpu/common/pramin.c | |||
@@ -88,7 +88,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct mem_desc *mem, | |||
88 | u32 byteoff, start_reg, until_end, n; | 88 | u32 byteoff, start_reg, until_end, n; |
89 | 89 | ||
90 | alloc = get_vidmem_page_alloc(mem->sgt->sgl); | 90 | alloc = get_vidmem_page_alloc(mem->sgt->sgl); |
91 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { | 91 | nvgpu_list_for_each_entry(chunk, &alloc->alloc_chunks, |
92 | page_alloc_chunk, list_entry) { | ||
92 | if (offset >= chunk->length) | 93 | if (offset >= chunk->length) |
93 | offset -= chunk->length; | 94 | offset -= chunk->length; |
94 | else | 95 | else |
@@ -113,7 +114,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct mem_desc *mem, | |||
113 | size -= n; | 114 | size -= n; |
114 | 115 | ||
115 | if (n == (chunk->length - offset)) { | 116 | if (n == (chunk->length - offset)) { |
116 | chunk = list_next_entry(chunk, list_entry); | 117 | chunk = nvgpu_list_next_entry(chunk, page_alloc_chunk, |
118 | list_entry); | ||
117 | offset = 0; | 119 | offset = 0; |
118 | } else { | 120 | } else { |
119 | offset += n / sizeof(u32); | 121 | offset += n / sizeof(u32); |