diff options
author | Vinod G <vinodg@nvidia.com> | 2018-04-27 12:33:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-04 02:57:12 -0400 |
commit | 010439ba08891ce97c53c239b5bb8c4a2f5b5f01 (patch) | |
tree | 0f7b6fdf83176183ddb9ee24e71e652a31528314 /drivers/gpu/nvgpu/gp106 | |
parent | 76597927e4059fd763949f633ef4f8f412e45f6b (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/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fifo_gp106.c | 71 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fifo_gp106.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 3 |
3 files changed, 78 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/fifo_gp106.c b/drivers/gpu/nvgpu/gp106/fifo_gp106.c index 77c09262..9b1dd768 100644 --- a/drivers/gpu/nvgpu/gp106/fifo_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fifo_gp106.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -32,3 +32,72 @@ u32 gp106_fifo_get_num_fifos(struct gk20a *g) | |||
32 | { | 32 | { |
33 | return ccsr_channel__size_1_v(); | 33 | return ccsr_channel__size_1_v(); |
34 | } | 34 | } |
35 | |||
36 | static const char * const gp106_hub_client_descs[] = { | ||
37 | "vip", "ce0", "ce1", "dniso", "fe", "fecs", "host", "host cpu", | ||
38 | "host cpu nb", "iso", "mmu", "mspdec", "msppp", "msvld", | ||
39 | "niso", "p2p", "pd", "perf", "pmu", "raster twod", "scc", | ||
40 | "scc nb", "sec", "ssync", "gr copy", "xv", "mmu nb", | ||
41 | "msenc", "d falcon", "sked", "a falcon", "n/a", | ||
42 | "hsce0", "hsce1", "hsce2", "hsce3", "hsce4", "hsce5", | ||
43 | "hsce6", "hsce7", "hsce8", "hsce9", "hshub", | ||
44 | "ptp x0", "ptp x1", "ptp x2", "ptp x3", "ptp x4", | ||
45 | "ptp x5", "ptp x6", "ptp x7", "vpr scrubber0", "vpr scrubber1", | ||
46 | "dwbif", "fbfalcon", | ||
47 | }; | ||
48 | |||
49 | static const char * const gp106_gpc_client_descs[] = { | ||
50 | "l1 0", "t1 0", "pe 0", | ||
51 | "l1 1", "t1 1", "pe 1", | ||
52 | "l1 2", "t1 2", "pe 2", | ||
53 | "l1 3", "t1 3", "pe 3", | ||
54 | "rast", "gcc", "gpccs", | ||
55 | "prop 0", "prop 1", "prop 2", "prop 3", | ||
56 | "l1 4", "t1 4", "pe 4", | ||
57 | "l1 5", "t1 5", "pe 5", | ||
58 | "l1 6", "t1 6", "pe 6", | ||
59 | "l1 7", "t1 7", "pe 7", | ||
60 | "l1 9", "t1 9", "pe 9", | ||
61 | "l1 10", "t1 10", "pe 10", | ||
62 | "l1 11", "t1 11", "pe 11", | ||
63 | "unknown", "unknown", "unknown", "unknown", | ||
64 | "tpccs 0", "tpccs 1", "tpccs 2", | ||
65 | "tpccs 3", "tpccs 4", "tpccs 5", | ||
66 | "tpccs 6", "tpccs 7", "tpccs 8", | ||
67 | "tpccs 9", "tpccs 10", "tpccs 11", | ||
68 | "tpccs 12", "tpccs 13", "tpccs 14", | ||
69 | "tpccs 15", "tpccs 16", "tpccs 17", | ||
70 | "tpccs 18", "tpccs 19", "unknown", "unknown", | ||
71 | "unknown", "unknown", "unknown", "unknown", | ||
72 | "unknown", "unknown", "unknown", "unknown", | ||
73 | "unknown", "unknown", | ||
74 | "l1 12", "t1 12", "pe 12", | ||
75 | "l1 13", "t1 13", "pe 13", | ||
76 | "l1 14", "t1 14", "pe 14", | ||
77 | "l1 15", "t1 15", "pe 15", | ||
78 | "l1 16", "t1 16", "pe 16", | ||
79 | "l1 17", "t1 17", "pe 17", | ||
80 | "l1 18", "t1 18", "pe 18", | ||
81 | "l1 19", "t1 19", "pe 19", | ||
82 | }; | ||
83 | |||
84 | void gp106_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault) | ||
85 | { | ||
86 | if (mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)) | ||
87 | WARN_ON(mmfault->client_id >= | ||
88 | ARRAY_SIZE(gp106_gpc_client_descs)); | ||
89 | else | ||
90 | mmfault->client_id_desc = | ||
91 | gp106_gpc_client_descs[mmfault->client_id]; | ||
92 | } | ||
93 | |||
94 | /* fill in mmu fault client description */ | ||
95 | void gp106_fifo_get_mmu_fault_client_desc(struct mmu_fault_info *mmfault) | ||
96 | { | ||
97 | if (mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)) | ||
98 | WARN_ON(mmfault->client_id >= | ||
99 | ARRAY_SIZE(gp106_hub_client_descs)); | ||
100 | else | ||
101 | mmfault->client_id_desc = | ||
102 | gp106_hub_client_descs[mmfault->client_id]; | ||
103 | } | ||
diff --git a/drivers/gpu/nvgpu/gp106/fifo_gp106.h b/drivers/gpu/nvgpu/gp106/fifo_gp106.h index 37b3f3e7..a6436a1b 100644 --- a/drivers/gpu/nvgpu/gp106/fifo_gp106.h +++ b/drivers/gpu/nvgpu/gp106/fifo_gp106.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -23,5 +23,9 @@ | |||
23 | #ifndef NVGPU_FIFO_GP106_H | 23 | #ifndef NVGPU_FIFO_GP106_H |
24 | #define NVGPU_FIFO_GP106_H | 24 | #define NVGPU_FIFO_GP106_H |
25 | struct gk20a; | 25 | struct gk20a; |
26 | struct mmu_fault_info; | ||
27 | |||
26 | u32 gp106_fifo_get_num_fifos(struct gk20a *g); | 28 | u32 gp106_fifo_get_num_fifos(struct gk20a *g); |
29 | void gp106_fifo_get_mmu_fault_client_desc(struct mmu_fault_info *mmfault); | ||
30 | void gp106_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault); | ||
27 | #endif | 31 | #endif |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 43b1d2e0..03e3bd07 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -478,6 +478,9 @@ static const struct gpu_ops gp106_ops = { | |||
478 | .update_runlist = gk20a_fifo_update_runlist, | 478 | .update_runlist = gk20a_fifo_update_runlist, |
479 | .trigger_mmu_fault = gm20b_fifo_trigger_mmu_fault, | 479 | .trigger_mmu_fault = gm20b_fifo_trigger_mmu_fault, |
480 | .get_mmu_fault_info = gp10b_fifo_get_mmu_fault_info, | 480 | .get_mmu_fault_info = gp10b_fifo_get_mmu_fault_info, |
481 | .get_mmu_fault_desc = gp10b_fifo_get_mmu_fault_desc, | ||
482 | .get_mmu_fault_client_desc = gp106_fifo_get_mmu_fault_client_desc, | ||
483 | .get_mmu_fault_gpc_desc = gp106_fifo_get_mmu_fault_gpc_desc, | ||
481 | .wait_engine_idle = gk20a_fifo_wait_engine_idle, | 484 | .wait_engine_idle = gk20a_fifo_wait_engine_idle, |
482 | .get_num_fifos = gp106_fifo_get_num_fifos, | 485 | .get_num_fifos = gp106_fifo_get_num_fifos, |
483 | .get_pbdma_signature = gp10b_fifo_get_pbdma_signature, | 486 | .get_pbdma_signature = gp10b_fifo_get_pbdma_signature, |