summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 4f8006b2..223937c6 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics 2 * GK20A Graphics
3 * 3 *
4 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2019, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -3128,7 +3128,7 @@ int gk20a_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags)
3128 goto out; 3128 goto out;
3129 } 3129 }
3130 3130
3131 /* init golden image, ELPG enabled after this is done */ 3131 /* init golden image */
3132 err = gr_gk20a_init_golden_ctx_image(g, c); 3132 err = gr_gk20a_init_golden_ctx_image(g, c);
3133 if (err != 0) { 3133 if (err != 0) {
3134 nvgpu_err(g, 3134 nvgpu_err(g,
@@ -3136,6 +3136,17 @@ int gk20a_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags)
3136 goto out; 3136 goto out;
3137 } 3137 }
3138 3138
3139 /* Re-enable ELPG now that golden image has been initialized.
3140 * The PMU PG init code may already have tried to enable elpg, but
3141 * would not have been able to complete this action since the golden
3142 * image hadn't been initialized yet, so do this now.
3143 */
3144 err = nvgpu_pmu_reenable_elpg(g);
3145 if (err != 0) {
3146 nvgpu_err(g, "fail to re-enable elpg");
3147 goto out;
3148 }
3149
3139 /* load golden image */ 3150 /* load golden image */
3140 gr_gk20a_load_golden_ctx_image(g, c); 3151 gr_gk20a_load_golden_ctx_image(g, c);
3141 if (err != 0) { 3152 if (err != 0) {