diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-04-10 17:03:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-25 17:26:00 -0400 |
commit | 5714f5eaaf4715c9989e5c2bf732cdb9136b0fbe (patch) | |
tree | 65164fc80979817ae2a65ba20a0c9f1c8781f668 /drivers/gpu/nvgpu/common | |
parent | 126c735d3015f515bde9f26d10b4e34d6e194e36 (diff) |
gpu: nvgpu: Remove bools from nvgpu_mem
Replace a couple of boolean fields in nvgpu_mem with bits in a
bitmap introduced in an earlier patch.
JIRA NVGPU-12
JIRA NVGPU-30
Change-Id: Iffc31bd629cab9a37e5a4fd13377eb9090353410
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1464079
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/dma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index b943aabf..abcf36f1 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c | |||
@@ -204,9 +204,7 @@ int nvgpu_dma_alloc_flags_vid_at(struct gk20a *g, unsigned long flags, | |||
204 | } | 204 | } |
205 | 205 | ||
206 | if (at) | 206 | if (at) |
207 | mem->fixed = true; | 207 | mem->mem_flags |= NVGPU_MEM_FLAG_FIXED; |
208 | else | ||
209 | mem->fixed = false; | ||
210 | 208 | ||
211 | mem->priv.sgt = nvgpu_kzalloc(g, sizeof(struct sg_table)); | 209 | mem->priv.sgt = nvgpu_kzalloc(g, sizeof(struct sg_table)); |
212 | if (!mem->priv.sgt) { | 210 | if (!mem->priv.sgt) { |
@@ -375,7 +373,7 @@ static void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem) | |||
375 | /* Sanity check - only this supported when allocating. */ | 373 | /* Sanity check - only this supported when allocating. */ |
376 | WARN_ON(mem->priv.flags != NVGPU_DMA_NO_KERNEL_MAPPING); | 374 | WARN_ON(mem->priv.flags != NVGPU_DMA_NO_KERNEL_MAPPING); |
377 | 375 | ||
378 | if (mem->user_mem) { | 376 | if (mem->mem_flags & NVGPU_MEM_FLAG_USER_MEM) { |
379 | nvgpu_mutex_acquire(&g->mm.vidmem.clear_list_mutex); | 377 | nvgpu_mutex_acquire(&g->mm.vidmem.clear_list_mutex); |
380 | was_empty = nvgpu_list_empty(&g->mm.vidmem.clear_list_head); | 378 | was_empty = nvgpu_list_empty(&g->mm.vidmem.clear_list_head); |
381 | nvgpu_list_add_tail(&mem->clear_list_entry, | 379 | nvgpu_list_add_tail(&mem->clear_list_entry, |