From 974379ebb7e7acddc143923f094c58becf3067f1 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 20 Jun 2017 12:55:49 -0700 Subject: 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 Reviewed-on: http://git-master/r/1505928 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/driver_common.c | 4 +++- drivers/gpu/nvgpu/common/linux/os_linux.h | 2 ++ drivers/gpu/nvgpu/gk20a/gk20a.h | 2 -- drivers/gpu/nvgpu/vgpu/vgpu.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers') 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 @@ #include "gk20a/gk20a.h" #include "gk20a/platform_gk20a.h" #include "module.h" +#include "os_linux.h" #define EMC3D_DEFAULT_RATIO 750 static void nvgpu_init_vars(struct gk20a *g) { + struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); struct gk20a_platform *platform = dev_get_drvdata(g->dev); init_waitqueue_head(&g->sw_irq_stall_last_handled_wq); @@ -54,7 +56,7 @@ static void nvgpu_init_vars(struct gk20a *g) g->emc3d_ratio = EMC3D_DEFAULT_RATIO; /* Set DMA parameters to allow larger sgt lists */ - g->dev->dma_parms = &g->dma_parms; + g->dev->dma_parms = &l->dma_parms; dma_set_max_seg_size(g->dev, UINT_MAX); 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 { } sched; dev_t cdev_region; + + struct device_dma_parameters dma_parms; }; static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index cda70249..c53e83dd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1196,8 +1196,6 @@ struct gk20a { struct gk20a_sched_ctrl sched_ctrl; - struct device_dma_parameters dma_parms; - struct gk20a_cde_app cde_app; bool mmu_debug_ctrl; diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index b3bb4242..f2abb76b 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -740,7 +740,7 @@ int vgpu_probe(struct platform_device *pdev) gk20a_debug_init(gk20a, "gpu.0"); /* Set DMA parameters to allow larger sgt lists */ - dev->dma_parms = &gk20a->dma_parms; + dev->dma_parms = &l->dma_parms; dma_set_max_seg_size(dev, UINT_MAX); gk20a->gr_idle_timeout_default = -- cgit v1.2.2