diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-08-31 09:49:45 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-12 18:57:23 -0400 |
commit | 567fa9a827d1bd4506005e6d4a5f28e36f0048e2 (patch) | |
tree | 58bf0801bfdc71fcb84be5932663287269419ffe /drivers/gpu/nvgpu/common | |
parent | 402fce3c5e10226033b96e1903cd94f454cb10d3 (diff) |
gpu : nvgpu: PG503 PMU ucode support
- Added PMU app version
- Added method to init queue
- P4 CL# 22754073
JIRA NVGPUGV100-7
Change-Id: I095ee5d0ad59693ee7d9eb3035f85f63f1b033d3
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1549418
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu_fw.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c index 03c60449..7144bcf3 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #define NVGPU_PMU_NS_UCODE_IMAGE "gpmu_ucode.bin" | 24 | #define NVGPU_PMU_NS_UCODE_IMAGE "gpmu_ucode.bin" |
25 | 25 | ||
26 | /* PMU F/W version */ | 26 | /* PMU F/W version */ |
27 | #define APP_VERSION_BIGGPU 22752892 | ||
27 | #define APP_VERSION_NC_3 22204331 | 28 | #define APP_VERSION_NC_3 22204331 |
28 | #define APP_VERSION_NC_2 20429989 | 29 | #define APP_VERSION_NC_2 20429989 |
29 | #define APP_VERSION_NC_1 20313802 | 30 | #define APP_VERSION_NC_1 20313802 |
@@ -1219,6 +1220,32 @@ static void get_pmu_init_msg_pmu_queue_params_v4(struct pmu_queue *queue, | |||
1219 | queue->offset = init->queue_offset + current_ptr; | 1220 | queue->offset = init->queue_offset + current_ptr; |
1220 | } | 1221 | } |
1221 | 1222 | ||
1223 | static void get_pmu_init_msg_pmu_queue_params_v5(struct pmu_queue *queue, | ||
1224 | u32 id, void *pmu_init_msg) | ||
1225 | { | ||
1226 | struct pmu_init_msg_pmu_v4 *init = pmu_init_msg; | ||
1227 | u32 current_ptr = 0; | ||
1228 | u8 i; | ||
1229 | u8 tmp_id = id; | ||
1230 | |||
1231 | if (tmp_id == PMU_COMMAND_QUEUE_HPQ) | ||
1232 | tmp_id = PMU_QUEUE_HPQ_IDX_FOR_V3; | ||
1233 | else if (tmp_id == PMU_COMMAND_QUEUE_LPQ) | ||
1234 | tmp_id = PMU_QUEUE_LPQ_IDX_FOR_V3; | ||
1235 | else if (tmp_id == PMU_MESSAGE_QUEUE) | ||
1236 | tmp_id = PMU_QUEUE_MSG_IDX_FOR_V4; | ||
1237 | else | ||
1238 | return; | ||
1239 | |||
1240 | queue->index = init->queue_index[tmp_id]; | ||
1241 | queue->size = init->queue_size[tmp_id]; | ||
1242 | if (tmp_id != 0) { | ||
1243 | for (i = 0 ; i < tmp_id; i++) | ||
1244 | current_ptr += init->queue_size[i]; | ||
1245 | } | ||
1246 | queue->offset = init->queue_offset + current_ptr; | ||
1247 | } | ||
1248 | |||
1222 | static void get_pmu_init_msg_pmu_queue_params_v3(struct pmu_queue *queue, | 1249 | static void get_pmu_init_msg_pmu_queue_params_v3(struct pmu_queue *queue, |
1223 | u32 id, void *pmu_init_msg) | 1250 | u32 id, void *pmu_init_msg) |
1224 | { | 1251 | { |
@@ -1538,6 +1565,7 @@ static int nvgpu_init_pmu_fw_ver_ops(struct nvgpu_pmu *pmu) | |||
1538 | get_pmu_sequence_out_alloc_ptr_v1; | 1565 | get_pmu_sequence_out_alloc_ptr_v1; |
1539 | break; | 1566 | break; |
1540 | case APP_VERSION_NC_3: | 1567 | case APP_VERSION_NC_3: |
1568 | case APP_VERSION_BIGGPU: | ||
1541 | g->ops.pmu_ver.pg_cmd_eng_buf_load_size = | 1569 | g->ops.pmu_ver.pg_cmd_eng_buf_load_size = |
1542 | pg_cmd_eng_buf_load_size_v2; | 1570 | pg_cmd_eng_buf_load_size_v2; |
1543 | g->ops.pmu_ver.pg_cmd_eng_buf_load_set_cmd_type = | 1571 | g->ops.pmu_ver.pg_cmd_eng_buf_load_set_cmd_type = |
@@ -1600,8 +1628,12 @@ static int nvgpu_init_pmu_fw_ver_ops(struct nvgpu_pmu *pmu) | |||
1600 | pmu_allocation_get_fb_addr_v3; | 1628 | pmu_allocation_get_fb_addr_v3; |
1601 | g->ops.pmu_ver.pmu_allocation_get_fb_size = | 1629 | g->ops.pmu_ver.pmu_allocation_get_fb_size = |
1602 | pmu_allocation_get_fb_size_v3; | 1630 | pmu_allocation_get_fb_size_v3; |
1603 | g->ops.pmu_ver.get_pmu_init_msg_pmu_queue_params = | 1631 | if (pmu->desc->app_version == APP_VERSION_BIGGPU) |
1604 | get_pmu_init_msg_pmu_queue_params_v4; | 1632 | g->ops.pmu_ver.get_pmu_init_msg_pmu_queue_params = |
1633 | get_pmu_init_msg_pmu_queue_params_v5; | ||
1634 | else | ||
1635 | g->ops.pmu_ver.get_pmu_init_msg_pmu_queue_params = | ||
1636 | get_pmu_init_msg_pmu_queue_params_v4; | ||
1605 | g->ops.pmu_ver.get_pmu_msg_pmu_init_msg_ptr = | 1637 | g->ops.pmu_ver.get_pmu_msg_pmu_init_msg_ptr = |
1606 | get_pmu_msg_pmu_init_msg_ptr_v4; | 1638 | get_pmu_msg_pmu_init_msg_ptr_v4; |
1607 | g->ops.pmu_ver.get_pmu_init_msg_pmu_sw_mg_off = | 1639 | g->ops.pmu_ver.get_pmu_init_msg_pmu_sw_mg_off = |