diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/acr_gp106.c | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c index 58c4e68a..308f1caf 100644 --- a/drivers/gpu/nvgpu/gp106/acr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 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, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -173,7 +173,8 @@ static int pmu_ucode_details(struct gk20a *g, struct flcn_ucode_img_v1 *p_img) | |||
173 | 173 | ||
174 | err = gk20a_init_pmu(pmu); | 174 | err = gk20a_init_pmu(pmu); |
175 | if (err) { | 175 | if (err) { |
176 | gp106_dbg_pmu("failed to set function pointers\n"); | 176 | gk20a_err(dev_from_gk20a(g), |
177 | "failed to set function pointers\n"); | ||
177 | goto release_sig; | 178 | goto release_sig; |
178 | } | 179 | } |
179 | 180 | ||
@@ -455,33 +456,34 @@ static int lsfm_discover_ucode_images(struct gk20a *g, | |||
455 | /* Obtain the PMU ucode image and add it to the list if required*/ | 456 | /* Obtain the PMU ucode image and add it to the list if required*/ |
456 | memset(&ucode_img, 0, sizeof(ucode_img)); | 457 | memset(&ucode_img, 0, sizeof(ucode_img)); |
457 | status = pmu_ucode_details(g, &ucode_img); | 458 | status = pmu_ucode_details(g, &ucode_img); |
458 | if (status == 0) { | 459 | if (status) |
459 | if (ucode_img.lsf_desc != NULL) { | 460 | return status; |
460 | /* The falon_id is formed by grabbing the static base | 461 | |
461 | * falon_id from the image and adding the | 462 | if (ucode_img.lsf_desc != NULL) { |
462 | * engine-designated falcon instance.*/ | 463 | /* The falon_id is formed by grabbing the static base |
463 | pmu->pmu_mode |= PMU_SECURE_MODE; | 464 | * falon_id from the image and adding the |
464 | falcon_id = ucode_img.lsf_desc->falcon_id + | 465 | * engine-designated falcon instance.*/ |
465 | ucode_img.flcn_inst; | 466 | pmu->pmu_mode |= PMU_SECURE_MODE; |
466 | 467 | falcon_id = ucode_img.lsf_desc->falcon_id + | |
467 | if (!lsfm_falcon_disabled(g, plsfm, falcon_id)) { | 468 | ucode_img.flcn_inst; |
468 | pmu->falcon_id = falcon_id; | 469 | |
469 | if (lsfm_add_ucode_img(g, plsfm, &ucode_img, | 470 | if (!lsfm_falcon_disabled(g, plsfm, falcon_id)) { |
470 | pmu->falcon_id) == 0) | 471 | pmu->falcon_id = falcon_id; |
471 | pmu->pmu_mode |= PMU_LSFM_MANAGED; | 472 | if (lsfm_add_ucode_img(g, plsfm, &ucode_img, |
472 | 473 | pmu->falcon_id) == 0) | |
473 | plsfm->managed_flcn_cnt++; | 474 | pmu->pmu_mode |= PMU_LSFM_MANAGED; |
474 | } else { | 475 | |
475 | gp106_dbg_pmu("id not managed %d\n", | 476 | plsfm->managed_flcn_cnt++; |
476 | ucode_img.lsf_desc->falcon_id); | 477 | } else { |
477 | } | 478 | gp106_dbg_pmu("id not managed %d\n", |
479 | ucode_img.lsf_desc->falcon_id); | ||
478 | } | 480 | } |
481 | } | ||
479 | 482 | ||
480 | /*Free any ucode image resources if not managing this falcon*/ | 483 | /*Free any ucode image resources if not managing this falcon*/ |
481 | if (!(pmu->pmu_mode & PMU_LSFM_MANAGED)) { | 484 | if (!(pmu->pmu_mode & PMU_LSFM_MANAGED)) { |
482 | gp106_dbg_pmu("pmu is not LSFM managed\n"); | 485 | gp106_dbg_pmu("pmu is not LSFM managed\n"); |
483 | lsfm_free_ucode_img_res(&ucode_img); | 486 | lsfm_free_ucode_img_res(&ucode_img); |
484 | } | ||
485 | } | 487 | } |
486 | 488 | ||
487 | /* Enumerate all constructed falcon objects, | 489 | /* Enumerate all constructed falcon objects, |