diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2018-07-11 05:30:45 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-31 04:25:41 -0400 |
commit | 2d454db04fcc0c03e05b4665831e5780240d79b8 (patch) | |
tree | c18fd4bc302ea68e57e1e1d95c0f253e800bc043 /drivers/gpu/nvgpu/include/nvgpu/pmu.h | |
parent | d32692ae2427693daf85b3c7b4e24cd36471dec6 (diff) |
gpu: nvgpu: falcon queue support
-Renamed "struct pmu_queue" to "struct
nvgpu_falcon_queue" & moved to falcon.h
-Renamed pmu_queue_* functions to flcn_queue_* &
moved to new file falcon_queue.c
-Created ops for queue functions in struct
nvgpu_falcon_queue to support different queue
types like DMEM/FB-Q.
-Created ops in nvgpu_falcon_engine_dependency_ops
to add engine specific queue functionality & assigned
correct HAL functions in hal*.c file.
-Made changes in dependent functions as needed to replace
struct pmu_queue & calling queue functions using
nvgpu_falcon_queue data structure.
-Replaced input param "struct nvgpu_pmu *pmu" with
"struct gk20a *g" for pmu ops pmu_queue_head/pmu_queue_tail
& also for functions gk20a_pmu_queue_head()/
gk20a_pmu_queue_tail().
-Made changes in nvgpu_pmu_queue_init() to use nvgpu_falcon_queue
for PMU queue.
-Modified Makefile to include falcon_queue.o
-Modified Makefile.sources to include falcon_queue.c
Change-Id: I956328f6631b7154267fd5a29eaa1826190d99d1
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776070
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/pmu.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/pmu.h | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h index 507b8133..4d1bf75a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <nvgpu/nvgpu_common.h> | 32 | #include <nvgpu/nvgpu_common.h> |
33 | #include <nvgpu/flcnif_cmn.h> | 33 | #include <nvgpu/flcnif_cmn.h> |
34 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | 34 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> |
35 | #include <nvgpu/falcon.h> | ||
35 | 36 | ||
36 | #define nvgpu_pmu_dbg(g, fmt, args...) \ | 37 | #define nvgpu_pmu_dbg(g, fmt, args...) \ |
37 | nvgpu_log(g, gpu_dbg_pmu, fmt, ##args) | 38 | nvgpu_log(g, gpu_dbg_pmu, fmt, ##args) |
@@ -266,30 +267,6 @@ struct pmu_ucode_desc_v1 { | |||
266 | u32 compressed; | 267 | u32 compressed; |
267 | }; | 268 | }; |
268 | 269 | ||
269 | struct pmu_queue { | ||
270 | |||
271 | /* used by hw, for BIOS/SMI queue */ | ||
272 | u32 mutex_id; | ||
273 | u32 mutex_lock; | ||
274 | /* used by sw, for LPQ/HPQ queue */ | ||
275 | struct nvgpu_mutex mutex; | ||
276 | |||
277 | /* current write position */ | ||
278 | u32 position; | ||
279 | /* physical dmem offset where this queue begins */ | ||
280 | u32 offset; | ||
281 | /* logical queue identifier */ | ||
282 | u32 id; | ||
283 | /* physical queue index */ | ||
284 | u32 index; | ||
285 | /* in bytes */ | ||
286 | u32 size; | ||
287 | |||
288 | /* open-flag */ | ||
289 | u32 oflag; | ||
290 | bool opened; /* opened implies locked */ | ||
291 | }; | ||
292 | |||
293 | struct pmu_mutex { | 270 | struct pmu_mutex { |
294 | u32 id; | 271 | u32 id; |
295 | u32 index; | 272 | u32 index; |
@@ -345,7 +322,7 @@ struct nvgpu_pmu { | |||
345 | 322 | ||
346 | struct pmu_sha1_gid gid_info; | 323 | struct pmu_sha1_gid gid_info; |
347 | 324 | ||
348 | struct pmu_queue queue[PMU_QUEUE_COUNT]; | 325 | struct nvgpu_falcon_queue queue[PMU_QUEUE_COUNT]; |
349 | 326 | ||
350 | struct pmu_sequence *seq; | 327 | struct pmu_sequence *seq; |
351 | unsigned long pmu_seq_tbl[PMU_SEQ_TBL_SIZE]; | 328 | unsigned long pmu_seq_tbl[PMU_SEQ_TBL_SIZE]; |
@@ -450,7 +427,6 @@ int nvgpu_pmu_mutex_release(struct nvgpu_pmu *pmu, u32 id, u32 *token); | |||
450 | 427 | ||
451 | int nvgpu_pmu_queue_init(struct nvgpu_pmu *pmu, u32 id, | 428 | int nvgpu_pmu_queue_init(struct nvgpu_pmu *pmu, u32 id, |
452 | union pmu_init_msg_pmu *init); | 429 | union pmu_init_msg_pmu *init); |
453 | bool nvgpu_pmu_queue_is_empty(struct nvgpu_pmu *pmu, struct pmu_queue *queue); | ||
454 | 430 | ||
455 | /* send a cmd to pmu */ | 431 | /* send a cmd to pmu */ |
456 | int nvgpu_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, | 432 | int nvgpu_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, |