diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-09-20 11:48:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-09 16:03:35 -0400 |
commit | 697fe17dd612769633f8c93e37b65cc51966d7e7 (patch) | |
tree | cbf09661d91c10ca9149f40661aab119a7850302 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |
parent | 4cff26cd5b0096eeb26114cf36df8e2cb91821a8 (diff) |
gpu: nvgpu: Suppress error msg from VBIOS overlay
Suppress error message when nvgpu tries to load VBIOS overlay, but
one is not found. This situation is normal. This is done by moving
gk20a_request_firmware() to be nvgpu generic function
nvgpu_request_firmware(), and adding a NO_WARN flag to it.
Introduce also a NO_SOC flag to suppress attempt to load firmware
from SoC specific directory in addition to the chip specific
directory. Use it for dGPU firmware files.
Bug 200236777
Change-Id: I0294d3308f029a6a6d3c2effa579d5f69a91e418
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1223840
(cherry picked from commit cca44c3f010f15918cdd2259c15170ba1917828a)
Reviewed-on: http://git-master/r/1233353
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index ca9f2e15..fc95b5bc 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "hw_mc_gk20a.h" | 30 | #include "hw_mc_gk20a.h" |
31 | #include "hw_pwr_gk20a.h" | 31 | #include "hw_pwr_gk20a.h" |
32 | #include "hw_top_gk20a.h" | 32 | #include "hw_top_gk20a.h" |
33 | #include "nvgpu_common.h" | ||
33 | 34 | ||
34 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 35 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
35 | #include "nvgpu_gpuid_t18x.h" | 36 | #include "nvgpu_gpuid_t18x.h" |
@@ -2883,6 +2884,8 @@ void gk20a_remove_pmu_support(struct pmu_gk20a *pmu) | |||
2883 | 2884 | ||
2884 | if (gk20a_alloc_initialized(&pmu->dmem)) | 2885 | if (gk20a_alloc_initialized(&pmu->dmem)) |
2885 | gk20a_alloc_destroy(&pmu->dmem); | 2886 | gk20a_alloc_destroy(&pmu->dmem); |
2887 | |||
2888 | release_firmware(pmu->fw); | ||
2886 | } | 2889 | } |
2887 | 2890 | ||
2888 | static int gk20a_init_pmu_reset_enable_hw(struct gk20a *g) | 2891 | static int gk20a_init_pmu_reset_enable_hw(struct gk20a *g) |
@@ -2904,18 +2907,18 @@ static int gk20a_prepare_ucode(struct gk20a *g) | |||
2904 | struct mm_gk20a *mm = &g->mm; | 2907 | struct mm_gk20a *mm = &g->mm; |
2905 | struct vm_gk20a *vm = &mm->pmu.vm; | 2908 | struct vm_gk20a *vm = &mm->pmu.vm; |
2906 | 2909 | ||
2907 | if (g->pmu_fw) | 2910 | if (pmu->fw) |
2908 | return gk20a_init_pmu(pmu); | 2911 | return gk20a_init_pmu(pmu); |
2909 | 2912 | ||
2910 | g->pmu_fw = gk20a_request_firmware(g, GK20A_PMU_UCODE_IMAGE); | 2913 | pmu->fw = nvgpu_request_firmware(g, GK20A_PMU_UCODE_IMAGE, 0); |
2911 | if (!g->pmu_fw) { | 2914 | if (!pmu->fw) { |
2912 | gk20a_err(d, "failed to load pmu ucode!!"); | 2915 | gk20a_err(d, "failed to load pmu ucode!!"); |
2913 | return err; | 2916 | return err; |
2914 | } | 2917 | } |
2915 | 2918 | ||
2916 | gk20a_dbg_fn("firmware loaded"); | 2919 | gk20a_dbg_fn("firmware loaded"); |
2917 | 2920 | ||
2918 | pmu->desc = (struct pmu_ucode_desc *)g->pmu_fw->data; | 2921 | pmu->desc = (struct pmu_ucode_desc *)pmu->fw->data; |
2919 | pmu->ucode_image = (u32 *)((u8 *)pmu->desc + | 2922 | pmu->ucode_image = (u32 *)((u8 *)pmu->desc + |
2920 | pmu->desc->descriptor_size); | 2923 | pmu->desc->descriptor_size); |
2921 | 2924 | ||
@@ -2930,7 +2933,8 @@ static int gk20a_prepare_ucode(struct gk20a *g) | |||
2930 | return gk20a_init_pmu(pmu); | 2933 | return gk20a_init_pmu(pmu); |
2931 | 2934 | ||
2932 | err_release_fw: | 2935 | err_release_fw: |
2933 | release_firmware(g->pmu_fw); | 2936 | release_firmware(pmu->fw); |
2937 | pmu->fw = NULL; | ||
2934 | 2938 | ||
2935 | return err; | 2939 | return err; |
2936 | } | 2940 | } |