From 6dde9e67d91419d1e671a520571a2be9bde93999 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 4 Jan 2018 11:09:57 -0800 Subject: gpu: nvgpu: allocate from coherent pool Maps memory coherently on devices that are connected to a coherent bus. (1) Add code to be able to get the platform device node. (2) Create a new flag to mark if the device is connected to a coherent bus (3) Map memory coherently on coherent devices. bug 2040331 Change-Id: Ide83a9261acdbbc6e9fef4fc5f38d6f9d0e5ab5b Signed-off-by: David Nieto Reviewed-on: https://git-master.nvidia.com/r/1633985 Reviewed-by: svc-mobile-coverity Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/nvhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux/nvhost.c') diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index b8e51aac..511cffc4 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c @@ -24,10 +24,11 @@ #include "gk20a/gk20a.h" #include "os_linux.h" +#include "module.h" int nvgpu_get_nvhost_dev(struct gk20a *g) { - struct device_node *np = dev_from_gk20a(g)->of_node; + struct device_node *np = nvgpu_get_node(g); struct platform_device *host1x_pdev = NULL; const __be32 *host1x_ptr; -- cgit v1.2.2