summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
diff options
context:
space:
mode:
authorVinod G <vinodg@nvidia.com>2018-04-27 12:33:07 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-04 02:57:12 -0400
commit010439ba08891ce97c53c239b5bb8c4a2f5b5f01 (patch)
tree0f7b6fdf83176183ddb9ee24e71e652a31528314 /drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
parent76597927e4059fd763949f633ef4f8f412e45f6b (diff)
gpu: nvgpu: add HALs to mmu fault descriptors.
mmu fault information for client and gpc differ on various chip. Add separate table for each chip based on that change and add hal functions to access those descriptors. bug 2050564 Change-Id: If15a4757762569d60d4ce1a6a47b8c9a93c11cb0 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1704105 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/fifo_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/fifo_gm20b.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
index 15612995..35a7a9e1 100644
--- a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GM20B Fifo 2 * GM20B Fifo
3 * 3 *
4 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-2018, 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"),
@@ -223,3 +223,34 @@ void gm20b_fifo_tsg_verify_status_ctx_reload(struct channel_gk20a *ch)
223 nvgpu_rwsem_up_read(&tsg->ch_list_lock); 223 nvgpu_rwsem_up_read(&tsg->ch_list_lock);
224 } 224 }
225} 225}
226
227static const char * const gm20b_gpc_client_descs[] = {
228 "l1 0", "t1 0", "pe 0",
229 "l1 1", "t1 1", "pe 1",
230 "l1 2", "t1 2", "pe 2",
231 "l1 3", "t1 3", "pe 3",
232 "rast", "gcc", "gpccs",
233 "prop 0", "prop 1", "prop 2", "prop 3",
234 "l1 4", "t1 4", "pe 4",
235 "l1 5", "t1 5", "pe 5",
236 "l1 6", "t1 6", "pe 6",
237 "l1 7", "t1 7", "pe 7",
238 "l1 9", "t1 9", "pe 9",
239 "l1 10", "t1 10", "pe 10",
240 "l1 11", "t1 11", "pe 11",
241 "unknown", "unknown", "unknown", "unknown",
242 "tpccs 0", "tpccs 1", "tpccs 2",
243 "tpccs 3", "tpccs 4", "tpccs 5",
244 "tpccs 6", "tpccs 7", "tpccs 8",
245 "tpccs 9", "tpccs 10", "tpccs 11",
246};
247
248void gm20b_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault)
249{
250 if (mmfault->client_id >= ARRAY_SIZE(gm20b_gpc_client_descs))
251 WARN_ON(mmfault->client_id >=
252 ARRAY_SIZE(gm20b_gpc_client_descs));
253 else
254 mmfault->client_id_desc =
255 gm20b_gpc_client_descs[mmfault->client_id];
256}