diff options
author | Vinod G <vinodg@nvidia.com> | 2018-07-25 16:08:40 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-07 00:13:43 -0400 |
commit | ea896018364560224f7047417e48b61e1c2bee38 (patch) | |
tree | 1fc5f94dfa56395eb57d7d1bfa7e588b76cc9c42 /drivers/gpu/nvgpu/include/nvgpu | |
parent | 7f8752fa45a774706c329d2daf94bdfff7721ed7 (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/nvgpu/include/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/as.h | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/pmu.h | 7 |
2 files changed, 12 insertions, 7 deletions
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 | ||
27 | struct vm_gk20a; | 29 | struct vm_gk20a; |
30 | struct gk20a; | ||
28 | 31 | ||
29 | struct gk20a_as { | 32 | struct 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); | |||
47 | int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size, | 50 | int 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 | 53 | struct 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__ */ | 515 | struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu); |
516 | #endif /* NVGPU_PMU_H */ | ||