summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gm20b/acr_gm20b.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
index 1d0379c5..1dda2d47 100644
--- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.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,
@@ -473,33 +473,32 @@ static int lsfm_discover_ucode_images(struct gk20a *g,
473 /* Obtain the PMU ucode image and add it to the list if required*/ 473 /* Obtain the PMU ucode image and add it to the list if required*/
474 memset(&ucode_img, 0, sizeof(ucode_img)); 474 memset(&ucode_img, 0, sizeof(ucode_img));
475 status = pmu_ucode_details(g, &ucode_img); 475 status = pmu_ucode_details(g, &ucode_img);
476 if (status == 0) { 476 if (status)
477 if (ucode_img.lsf_desc != NULL) { 477 return status;
478 /* The falon_id is formed by grabbing the static base 478
479 * falon_id from the image and adding the 479 /* The falon_id is formed by grabbing the static base
480 * engine-designated falcon instance.*/ 480 * falon_id from the image and adding the
481 pmu->pmu_mode |= PMU_SECURE_MODE; 481 * engine-designated falcon instance.*/
482 falcon_id = ucode_img.lsf_desc->falcon_id + 482 pmu->pmu_mode |= PMU_SECURE_MODE;
483 ucode_img.flcn_inst; 483 falcon_id = ucode_img.lsf_desc->falcon_id +
484 484 ucode_img.flcn_inst;
485 if (!lsfm_falcon_disabled(g, plsfm, falcon_id)) { 485
486 pmu->falcon_id = falcon_id; 486 if (!lsfm_falcon_disabled(g, plsfm, falcon_id)) {
487 if (lsfm_add_ucode_img(g, plsfm, &ucode_img, 487 pmu->falcon_id = falcon_id;
488 pmu->falcon_id) == 0) 488 if (lsfm_add_ucode_img(g, plsfm, &ucode_img,
489 pmu->pmu_mode |= PMU_LSFM_MANAGED; 489 pmu->falcon_id) == 0)
490 490 pmu->pmu_mode |= PMU_LSFM_MANAGED;
491 plsfm->managed_flcn_cnt++; 491
492 } else { 492 plsfm->managed_flcn_cnt++;
493 gm20b_dbg_pmu("id not managed %d\n", 493 } else {
494 ucode_img.lsf_desc->falcon_id); 494 gm20b_dbg_pmu("id not managed %d\n",
495 } 495 ucode_img.lsf_desc->falcon_id);
496 } 496 }
497 497
498 /*Free any ucode image resources if not managing this falcon*/ 498 /*Free any ucode image resources if not managing this falcon*/
499 if (!(pmu->pmu_mode & PMU_LSFM_MANAGED)) { 499 if (!(pmu->pmu_mode & PMU_LSFM_MANAGED)) {
500 gm20b_dbg_pmu("pmu is not LSFM managed\n"); 500 gm20b_dbg_pmu("pmu is not LSFM managed\n");
501 lsfm_free_ucode_img_res(&ucode_img); 501 lsfm_free_ucode_img_res(&ucode_img);
502 }
503 } 502 }
504 503
505 /* Enumerate all constructed falcon objects, 504 /* Enumerate all constructed falcon objects,