diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-06-20 15:55:49 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-21 20:34:54 -0400 |
commit | 974379ebb7e7acddc143923f094c58becf3067f1 (patch) | |
tree | 15d9711042f7e03758169519e853c8bf1572d345 /drivers/gpu/nvgpu/common | |
parent | 92c43deefca150854193c6720717d56b61989c23 (diff) |
gpu: nvgpu: Move dma_params to os_linux
dma_params is inherently a Linux structure, so move it to os_linux.
JIRA NVGPU-38
Change-Id: If81249b3cb7d65187202df72b35a1d24e274263b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1505928
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/os_linux.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index e5462646..c4d40c35 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -27,11 +27,13 @@ | |||
27 | #include "gk20a/gk20a.h" | 27 | #include "gk20a/gk20a.h" |
28 | #include "gk20a/platform_gk20a.h" | 28 | #include "gk20a/platform_gk20a.h" |
29 | #include "module.h" | 29 | #include "module.h" |
30 | #include "os_linux.h" | ||
30 | 31 | ||
31 | #define EMC3D_DEFAULT_RATIO 750 | 32 | #define EMC3D_DEFAULT_RATIO 750 |
32 | 33 | ||
33 | static void nvgpu_init_vars(struct gk20a *g) | 34 | static void nvgpu_init_vars(struct gk20a *g) |
34 | { | 35 | { |
36 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
35 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 37 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); |
36 | 38 | ||
37 | init_waitqueue_head(&g->sw_irq_stall_last_handled_wq); | 39 | init_waitqueue_head(&g->sw_irq_stall_last_handled_wq); |
@@ -54,7 +56,7 @@ static void nvgpu_init_vars(struct gk20a *g) | |||
54 | g->emc3d_ratio = EMC3D_DEFAULT_RATIO; | 56 | g->emc3d_ratio = EMC3D_DEFAULT_RATIO; |
55 | 57 | ||
56 | /* Set DMA parameters to allow larger sgt lists */ | 58 | /* Set DMA parameters to allow larger sgt lists */ |
57 | g->dev->dma_parms = &g->dma_parms; | 59 | g->dev->dma_parms = &l->dma_parms; |
58 | dma_set_max_seg_size(g->dev, UINT_MAX); | 60 | dma_set_max_seg_size(g->dev, UINT_MAX); |
59 | 61 | ||
60 | nvgpu_init_list_node(&g->pending_sema_waits); | 62 | nvgpu_init_list_node(&g->pending_sema_waits); |
diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h index f23926b3..a61d07e6 100644 --- a/drivers/gpu/nvgpu/common/linux/os_linux.h +++ b/drivers/gpu/nvgpu/common/linux/os_linux.h | |||
@@ -64,6 +64,8 @@ struct nvgpu_os_linux { | |||
64 | } sched; | 64 | } sched; |
65 | 65 | ||
66 | dev_t cdev_region; | 66 | dev_t cdev_region; |
67 | |||
68 | struct device_dma_parameters dma_parms; | ||
67 | }; | 69 | }; |
68 | 70 | ||
69 | static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) | 71 | static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) |