diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-01-25 16:35:22 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-01 16:54:08 -0500 |
commit | 9e283f9f40be0d357e90a355eae6d3b183073184 (patch) | |
tree | cd120793463ee1d52bb17859a9bc665844bac08e /drivers/gpu/nvgpu/include | |
parent | 8ca1a765ee066b9f04f39c69d8f3678c06557257 (diff) |
gpu: nvgpu: Add tracking of dma_buf_attachment
VM and CDE code assumes that dma_buf_attachment is stored as a pointer
in the private dma_buf_drvdata, so it is not tracked. In Linux trees
without dma_buf_*_drvdata() support this is not true, so change the
code to explicitly track dma_buf_attachment.
JIRA NVGPU-4
Change-Id: I692f05a19a6469195d5444a7e5ff6e92f77ae272
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1648004
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h index d9f082af..97b8334b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -41,11 +41,13 @@ struct nvgpu_vm_area; | |||
41 | 41 | ||
42 | struct nvgpu_os_buffer { | 42 | struct nvgpu_os_buffer { |
43 | struct dma_buf *dmabuf; | 43 | struct dma_buf *dmabuf; |
44 | struct dma_buf_attachment *attachment; | ||
44 | struct device *dev; | 45 | struct device *dev; |
45 | }; | 46 | }; |
46 | 47 | ||
47 | struct nvgpu_mapped_buf_priv { | 48 | struct nvgpu_mapped_buf_priv { |
48 | struct dma_buf *dmabuf; | 49 | struct dma_buf *dmabuf; |
50 | struct dma_buf_attachment *attachment; | ||
49 | struct sg_table *sgt; | 51 | struct sg_table *sgt; |
50 | }; | 52 | }; |
51 | 53 | ||