diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-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) |