summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 7ae1febc..347658b2 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/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"),
@@ -126,6 +126,8 @@ int gk20a_finalize_poweron(struct gk20a *g)
126 u32 nr_pages; 126 u32 nr_pages;
127#endif 127#endif
128 128
129 u32 fuse_status;
130
129 nvgpu_log_fn(g, " "); 131 nvgpu_log_fn(g, " ");
130 132
131 if (g->power_on) { 133 if (g->power_on) {
@@ -264,14 +266,20 @@ int gk20a_finalize_poweron(struct gk20a *g)
264 g->ops.mc.intr_enable(g); 266 g->ops.mc.intr_enable(g);
265 267
266 /* 268 /*
267 * Overwrite can_tpc_powergate to false if the chip is ES fused and 269 * Power gate the chip as per the TPC PG mask
268 * already optimized with some TPCs already floorswept 270 * and the fuse_status register.
269 * via fuse. We will not support TPC-PG in those cases. 271 * If TPC PG mask is invalid halt the GPU poweron.
270 */ 272 */
273 g->can_tpc_powergate = false;
274 fuse_status = g->ops.fuse.fuse_status_opt_tpc_gpc(g, 0);
275
276 if (g->ops.tpc.tpc_powergate) {
277 err = g->ops.tpc.tpc_powergate(g, fuse_status);
278 }
271 279
272 if (g->ops.fuse.fuse_status_opt_tpc_gpc(g, 0) != 0x0) { 280 if (err) {
273 g->can_tpc_powergate = false; 281 nvgpu_err(g, "failed to power ON GPU");
274 g->tpc_pg_mask = 0x0; 282 goto done;
275 } 283 }
276 284
277 nvgpu_mutex_acquire(&g->tpc_pg_lock); 285 nvgpu_mutex_acquire(&g->tpc_pg_lock);