summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVinod G <vinodg@nvidia.com>2018-07-25 16:08:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-07 00:13:43 -0400
commitea896018364560224f7047417e48b61e1c2bee38 (patch)
tree1fc5f94dfa56395eb57d7d1bfa7e588b76cc9c42 /drivers/gpu
parent7f8752fa45a774706c329d2daf94bdfff7721ed7 (diff)
gpu: nvgpu: Rearrange some definitions from gk20a header
Moved the gk20a_from_as and gk20a_from_pmu definitions from gk20a.h to as.h and pmu.h Correction for MISRA rule 21.1 error in as.h and pmu.h headers JIRA NVGPU-624 Change-Id: I57de604b47afc589a9778fe69e4856ffcabd9dfc Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1785951 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/as.h12
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pmu.h7
3 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 13c8928f..2f940553 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1650,9 +1650,6 @@ enum gk20a_nonstall_ops {
1650void __nvgpu_check_gpu_state(struct gk20a *g); 1650void __nvgpu_check_gpu_state(struct gk20a *g);
1651void __gk20a_warn_on_no_regs(void); 1651void __gk20a_warn_on_no_regs(void);
1652 1652
1653struct gk20a *gk20a_from_as(struct gk20a_as *as);
1654struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu);
1655
1656/* classes that the device supports */ 1653/* classes that the device supports */
1657/* TBD: get these from an open-sourced SDK? */ 1654/* TBD: get these from an open-sourced SDK? */
1658enum { 1655enum {
diff --git a/drivers/gpu/nvgpu/include/nvgpu/as.h b/drivers/gpu/nvgpu/include/nvgpu/as.h
index b16652da..f2249f9e 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/as.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/as.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Address Spaces 2 * GK20A Address Spaces
3 * 3 *
4 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -21,10 +21,13 @@
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24#ifndef __NVGPU_AS_H__ 24#ifndef NVGPU_AS_H
25#define __NVGPU_AS_H__ 25#define NVGPU_AS_H
26
27#include <nvgpu/types.h>
26 28
27struct vm_gk20a; 29struct vm_gk20a;
30struct gk20a;
28 31
29struct gk20a_as { 32struct gk20a_as {
30 int last_share_id; /* dummy allocator for now */ 33 int last_share_id; /* dummy allocator for now */
@@ -47,4 +50,5 @@ int gk20a_as_release_share(struct gk20a_as_share *as_share);
47int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size, 50int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size,
48 u32 flags, struct gk20a_as_share **out); 51 u32 flags, struct gk20a_as_share **out);
49 52
50#endif 53struct gk20a *gk20a_from_as(struct gk20a_as *as);
54#endif /* NVGPU_AS_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h
index 4d1bf75a..28374b9d 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_PMU_H__ 23#ifndef NVGPU_PMU_H
24#define __NVGPU_PMU_H__ 24#define NVGPU_PMU_H
25 25
26#include <nvgpu/kmem.h> 26#include <nvgpu/kmem.h>
27#include <nvgpu/nvgpu_mem.h> 27#include <nvgpu/nvgpu_mem.h>
@@ -512,4 +512,5 @@ int nvgpu_pmu_rpc_execute(struct nvgpu_pmu *pmu, struct nv_pmu_rpc_header *rpc,
512 u16 size_rpc, u16 size_scratch, pmu_callback callback, void *cb_param, 512 u16 size_rpc, u16 size_scratch, pmu_callback callback, void *cb_param,
513 bool is_copy_back); 513 bool is_copy_back);
514 514
515#endif /* __NVGPU_PMU_H__ */ 515struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu);
516#endif /* NVGPU_PMU_H */