summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-04-18 08:46:58 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-20 14:35:14 -0400
commita6fd69993189436873bd5e6008a6a7433a3afe1d (patch)
treef5d1aa86af1aabae7de8b9858e41d68e8dc11869 /drivers
parentcb0492c7c82b29c3279973ed54c7b45333b579bb (diff)
gpu: nvgpu: Add wrapper nvgpu/log2.h
Add wrapper header file nvgpu/log2.h. It #includes <linux/log2.h> in Linux. JIRA NVGPU-13 Change-Id: Ie434e62f7ef2dce7692b1c2c12b4ad6453f1534a Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1464719 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_as.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/buddy_allocator.c1
-rw-r--r--drivers/gpu/nvgpu/common/mm/page_allocator.c1
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c1
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.h2
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c1
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/log2.h20
8 files changed, 29 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
index bedaea3d..d9316c7f 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
@@ -16,6 +16,8 @@
16#include <linux/cdev.h> 16#include <linux/cdev.h>
17#include <linux/uaccess.h> 17#include <linux/uaccess.h>
18 18
19#include <nvgpu/log2.h>
20
19#include <trace/events/gk20a.h> 21#include <trace/events/gk20a.h>
20 22
21#include <uapi/linux/nvgpu.h> 23#include <uapi/linux/nvgpu.h>
diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c
index 59227e4e..36095710 100644
--- a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c
@@ -17,6 +17,7 @@
17#include <nvgpu/allocator.h> 17#include <nvgpu/allocator.h>
18#include <nvgpu/kmem.h> 18#include <nvgpu/kmem.h>
19#include <nvgpu/bug.h> 19#include <nvgpu/bug.h>
20#include <nvgpu/log2.h>
20 21
21#include "gk20a/mm_gk20a.h" 22#include "gk20a/mm_gk20a.h"
22#include "gk20a/platform_gk20a.h" 23#include "gk20a/platform_gk20a.h"
diff --git a/drivers/gpu/nvgpu/common/mm/page_allocator.c b/drivers/gpu/nvgpu/common/mm/page_allocator.c
index 11d4ca73..6fbdbedd 100644
--- a/drivers/gpu/nvgpu/common/mm/page_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/page_allocator.c
@@ -21,6 +21,7 @@
21#include <nvgpu/page_allocator.h> 21#include <nvgpu/page_allocator.h>
22#include <nvgpu/kmem.h> 22#include <nvgpu/kmem.h>
23#include <nvgpu/bug.h> 23#include <nvgpu/bug.h>
24#include <nvgpu/log2.h>
24 25
25#include "buddy_allocator_priv.h" 26#include "buddy_allocator_priv.h"
26 27
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 519fa509..12bb3688 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -31,6 +31,7 @@
31#include <nvgpu/atomic.h> 31#include <nvgpu/atomic.h>
32#include <nvgpu/sort.h> 32#include <nvgpu/sort.h>
33#include <nvgpu/bug.h> 33#include <nvgpu/bug.h>
34#include <nvgpu/log2.h>
34 35
35#include "gk20a.h" 36#include "gk20a.h"
36#include "debug_gk20a.h" 37#include "debug_gk20a.h"
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index e16b77b7..1db52c85 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -16,7 +16,6 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19#include <linux/log2.h>
20#include <linux/scatterlist.h> 19#include <linux/scatterlist.h>
21#include <linux/dma-buf.h> 20#include <linux/dma-buf.h>
22#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
@@ -37,6 +36,7 @@
37#include <nvgpu/page_allocator.h> 36#include <nvgpu/page_allocator.h>
38#include <nvgpu/log.h> 37#include <nvgpu/log.h>
39#include <nvgpu/bug.h> 38#include <nvgpu/bug.h>
39#include <nvgpu/log2.h>
40 40
41#include "gk20a.h" 41#include "gk20a.h"
42#include "mm_gk20a.h" 42#include "mm_gk20a.h"
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.h b/drivers/gpu/nvgpu/gp106/xve_gp106.h
index 65c75bf0..2dbc1891 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.h
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.h
@@ -19,6 +19,8 @@
19 19
20#include "gk20a/gk20a.h" 20#include "gk20a/gk20a.h"
21 21
22#include <nvgpu/log2.h>
23
22int gp106_init_xve_ops(struct gpu_ops *gops); 24int gp106_init_xve_ops(struct gpu_ops *gops);
23 25
24/* 26/*
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index 019b2471..59e127b7 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -15,6 +15,7 @@
15 15
16#include <nvgpu/dma.h> 16#include <nvgpu/dma.h>
17#include <nvgpu/bug.h> 17#include <nvgpu/bug.h>
18#include <nvgpu/log2.h>
18 19
19#include "fifo_gp10b.h" 20#include "fifo_gp10b.h"
20 21
diff --git a/drivers/gpu/nvgpu/include/nvgpu/log2.h b/drivers/gpu/nvgpu/include/nvgpu/log2.h
new file mode 100644
index 00000000..e08a01e4
--- /dev/null
+++ b/drivers/gpu/nvgpu/include/nvgpu/log2.h
@@ -0,0 +1,20 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 */
13#ifndef __NVGPU_LOG2_H__
14#define __NVGPU_LOG2_H__
15
16#ifdef __KERNEL__
17#include <linux/log2.h>
18#endif
19
20#endif /* __NVGPU_LOG2_H__ */