From 26deb61b3b12c8f876133b78e64575d1478d0c95 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 17 Apr 2017 14:47:26 +0530 Subject: gpu: nvgpu: Add wrapper nvgpu/kref.h Add wrapper header file nvgpu/kref.h. It #includes in Linux. JIRA NVGPU-13 Change-Id: Ib8b002268b1960646986551ecb9f286e1e21e7f6 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1463770 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_arb.c | 1 + drivers/gpu/nvgpu/gk20a/fence_gk20a.h | 3 ++- drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 2 ++ drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 1 + drivers/gpu/nvgpu/gk20a/sync_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | 1 + drivers/gpu/nvgpu/include/nvgpu/kref.h | 20 ++++++++++++++++++++ drivers/gpu/nvgpu/include/nvgpu/semaphore.h | 2 +- 9 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/kref.h (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 180b4fde..572de674 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "gk20a/gk20a.h" #include "clk/clk_arb.h" diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h index 77dae9a7..c26cd250 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h @@ -17,9 +17,10 @@ #ifndef _GK20A_FENCE_H_ #define _GK20A_FENCE_H_ -#include #include +#include + struct platform_device; struct sync_timeline; struct sync_fence; diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 70addf13..0bec9e82 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h @@ -25,6 +25,8 @@ #include "tsg_gk20a.h" #include "debug_gk20a.h" +#include + #define MAX_RUNLIST_BUFFERS 2 #define FIFO_INVAL_ENGINE_ID ((u32)~0) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 85878423..763cccaf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -42,6 +42,7 @@ struct dbg_profiler_object_data; #include #include #include +#include #include "clk_gk20a.h" #include "ce2_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 924c1d3d..7452a0c1 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef CONFIG_ARM64 #define outer_flush_range(a, b) diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index 04afe0a3..10c4f57b 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "../drivers/staging/android/sync.h" diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h index 178b8672..945058a2 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h @@ -17,6 +17,7 @@ #define __TSG_GK20A_H_ #include +#include #define NVGPU_INVALID_TSG_ID (-1) diff --git a/drivers/gpu/nvgpu/include/nvgpu/kref.h b/drivers/gpu/nvgpu/include/nvgpu/kref.h new file mode 100644 index 00000000..d24db603 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/kref.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ +#ifndef __NVGPU_KREF_H__ +#define __NVGPU_KREF_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif /* __NVGPU_KREF_H__ */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h index 6ab34d67..8e939e72 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h +++ b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h @@ -14,7 +14,6 @@ #ifndef SEMAPHORE_GK20A_H #define SEMAPHORE_GK20A_H -#include #include #include @@ -22,6 +21,7 @@ #include #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/mm_gk20a.h" -- cgit v1.2.2