From e1200259ba3ad4ae416990b2f2abccb94565430f Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Wed, 28 Feb 2018 16:17:15 +0530 Subject: gpu: nvgpu: fix misc issue for dgpu code on QNX build - QNX is pulling dgpu code from linux which has multiple build failure on QNX. Like QNX needs explicit declaration for all non-static functions. Some linux specific headers need to be put under __KERNEL__ flag. Change-Id: I15af1a1f6a069c82f9a81449f4f7c7d48612de42 Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/1665752 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/vidmem.c | 2 -- drivers/gpu/nvgpu/gp106/flcn_gp106.c | 3 ++- drivers/gpu/nvgpu/gp106/fuse_gp106.c | 3 ++- drivers/gpu/nvgpu/gv100/mc_gv100.c | 2 +- drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 4 ++-- drivers/gpu/nvgpu/gv100/pmu_gv100.c | 1 + drivers/gpu/nvgpu/lpwr/rppg.c | 3 ++- drivers/gpu/nvgpu/volt/volt_dev.c | 3 ++- 8 files changed, 12 insertions(+), 9 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/common/mm/vidmem.c b/drivers/gpu/nvgpu/common/mm/vidmem.c index f534f45c..0fb423b6 100644 --- a/drivers/gpu/nvgpu/common/mm/vidmem.c +++ b/drivers/gpu/nvgpu/common/mm/vidmem.c @@ -20,8 +20,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include - #include #include #include diff --git a/drivers/gpu/nvgpu/gp106/flcn_gp106.c b/drivers/gpu/nvgpu/gp106/flcn_gp106.c index 7949edb7..f553f5e1 100644 --- a/drivers/gpu/nvgpu/gp106/flcn_gp106.c +++ b/drivers/gpu/nvgpu/gp106/flcn_gp106.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,6 +22,7 @@ #include "gk20a/gk20a.h" #include "gk20a/flcn_gk20a.h" #include "gp106/sec2_gp106.h" +#include "gp106/flcn_gp106.h" #include diff --git a/drivers/gpu/nvgpu/gp106/fuse_gp106.c b/drivers/gpu/nvgpu/gp106/fuse_gp106.c index 68c0db89..0303830c 100644 --- a/drivers/gpu/nvgpu/gp106/fuse_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fuse_gp106.c @@ -1,7 +1,7 @@ /* * GP106 FUSE * - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ #include #include "gk20a/gk20a.h" +#include "gp106/fuse_gp106.h" int gp106_fuse_check_priv_security(struct gk20a *g) { diff --git a/drivers/gpu/nvgpu/gv100/mc_gv100.c b/drivers/gpu/nvgpu/gv100/mc_gv100.c index a3f8ab06..5848a180 100644 --- a/drivers/gpu/nvgpu/gv100/mc_gv100.c +++ b/drivers/gpu/nvgpu/gv100/mc_gv100.c @@ -22,7 +22,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index d0dfebcf..d27239ae 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c @@ -202,7 +202,7 @@ static const struct __nvlink_reginit __nvlink_reginit_per_link_gpu[] = { #define NVL_DEVICE(str) nvlinkip_discovery_common_device_##str##_v() -const char * __gv100_device_type_to_str(u32 type) +static const char *__gv100_device_type_to_str(u32 type) { if (type == NVL_DEVICE(ioctrl)) return "IOCTRL"; @@ -1259,7 +1259,7 @@ static void gv100_nvlink_nvlipt_intr_enable(struct gk20a *g, u32 link_id, /* * Per-link NVLIPT ISR handler */ -bool gv100_nvlink_nvlipt_isr(struct gk20a *g, u32 link_id) +static bool gv100_nvlink_nvlipt_isr(struct gk20a *g, u32 link_id) { /* * Interrupt handling happens in leaf handlers. Assume all interrupts diff --git a/drivers/gpu/nvgpu/gv100/pmu_gv100.c b/drivers/gpu/nvgpu/gv100/pmu_gv100.c index 113e554b..9317f6b4 100644 --- a/drivers/gpu/nvgpu/gv100/pmu_gv100.c +++ b/drivers/gpu/nvgpu/gv100/pmu_gv100.c @@ -25,6 +25,7 @@ #include #include "gk20a/gk20a.h" +#include "gv100/pmu_gv100.h" int gv100_pmu_init_acr(struct gk20a *g) { diff --git a/drivers/gpu/nvgpu/lpwr/rppg.c b/drivers/gpu/nvgpu/lpwr/rppg.c index 6fc86b2b..1613e33b 100644 --- a/drivers/gpu/nvgpu/lpwr/rppg.c +++ b/drivers/gpu/nvgpu/lpwr/rppg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ #include "gk20a/gk20a.h" #include "gp106/bios_gp106.h" #include "pstate/pstate.h" +#include "lpwr/rppg.h" static void pmu_handle_rppg_init_msg(struct gk20a *g, struct pmu_msg *msg, void *param, u32 handle, u32 status) diff --git a/drivers/gpu/nvgpu/volt/volt_dev.c b/drivers/gpu/nvgpu/volt/volt_dev.c index 6ad658b8..38df2105 100644 --- a/drivers/gpu/nvgpu/volt/volt_dev.c +++ b/drivers/gpu/nvgpu/volt/volt_dev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,6 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include #include #include #include -- cgit v1.2.2