summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-09-21 02:36:36 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-24 13:14:56 -0400
commite16843c2efdffa13c15cc0a014b2a5598cc2f4ec (patch)
tree2942e8a53e954ab30b564a3eb07efc8c10270e10 /drivers/gpu/nvgpu/include
parent2a26075b8408b45d18920e3f4ca08a457b23a7e0 (diff)
gpu: nvgpu: read GPC mask from h/w
In gk20a_ctrl_ioctl_gpu_characteristics() we right now just calculate GPC mask in s/w and return to user space But this could give incorrect result as any GPC could be floorswept in h/w Add gops.fuse.fuse_status_opt_gpc() to read GPC floorsweep status from fuse Add gops.gr.get_gpc_mask() to get actual GPC mask from h/w Set these HALs only for dGPUs right now. Fuse register to read GPC mask is not yet supported in simulation and hence simulation boot fails These HALs will be set for iGPU once simulation issue is resolved Use gops.gr.get_gpc_mask() if it is defined in gk20a_ctrl_ioctl_gpu_characteristics() to send the actual GPC mask to user space Jira NVGPUT-132 Change-Id: I3b552de07883328fcfa41d4334ec0d777e04bdd3 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822811 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fuse_gp106.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fuse_gv100.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h6
6 files changed, 27 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h
index d0f51055..593b553c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h
@@ -264,6 +264,7 @@ struct gpu_ops {
264 struct gk20a_ctxsw_ucode_segments *segments, 264 struct gk20a_ctxsw_ucode_segments *segments,
265 u32 reg_offset); 265 u32 reg_offset);
266 int (*load_ctxsw_ucode)(struct gk20a *g); 266 int (*load_ctxsw_ucode)(struct gk20a *g);
267 u32 (*get_gpc_mask)(struct gk20a *g);
267 u32 (*get_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index); 268 u32 (*get_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index);
268 void (*set_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index); 269 void (*set_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index);
269 int (*alloc_obj_ctx)(struct channel_gk20a *c, 270 int (*alloc_obj_ctx)(struct channel_gk20a *c,
@@ -1270,6 +1271,7 @@ struct gpu_ops {
1270 u32 (*fuse_status_opt_fbio)(struct gk20a *g); 1271 u32 (*fuse_status_opt_fbio)(struct gk20a *g);
1271 u32 (*fuse_status_opt_fbp)(struct gk20a *g); 1272 u32 (*fuse_status_opt_fbp)(struct gk20a *g);
1272 u32 (*fuse_status_opt_rop_l2_fbp)(struct gk20a *g, u32 fbp); 1273 u32 (*fuse_status_opt_rop_l2_fbp)(struct gk20a *g, u32 fbp);
1274 u32 (*fuse_status_opt_gpc)(struct gk20a *g);
1273 u32 (*fuse_status_opt_tpc_gpc)(struct gk20a *g, u32 gpc); 1275 u32 (*fuse_status_opt_tpc_gpc)(struct gk20a *g, u32 gpc);
1274 void (*fuse_ctrl_opt_tpc_gpc)(struct gk20a *g, u32 gpc, u32 val); 1276 void (*fuse_ctrl_opt_tpc_gpc)(struct gk20a *g, u32 gpc, u32 val);
1275 u32 (*fuse_opt_sec_debug_en)(struct gk20a *g); 1277 u32 (*fuse_opt_sec_debug_en)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h
index 99b4b3f3..d97eb7d8 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-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"),
@@ -56,6 +56,10 @@
56#ifndef _hw_fuse_gm20b_h_ 56#ifndef _hw_fuse_gm20b_h_
57#define _hw_fuse_gm20b_h_ 57#define _hw_fuse_gm20b_h_
58 58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
59static inline u32 fuse_status_opt_tpc_gpc_r(u32 i) 63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
60{ 64{
61 return 0x00021c38U + i*4U; 65 return 0x00021c38U + i*4U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fuse_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fuse_gp106.h
index 7d1fb075..bfb19b9b 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fuse_gp106.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fuse_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"),
@@ -56,6 +56,10 @@
56#ifndef _hw_fuse_gp106_h_ 56#ifndef _hw_fuse_gp106_h_
57#define _hw_fuse_gp106_h_ 57#define _hw_fuse_gp106_h_
58 58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
59static inline u32 fuse_status_opt_tpc_gpc_r(u32 i) 63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
60{ 64{
61 return 0x00021c38U + i*4U; 65 return 0x00021c38U + i*4U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h
index 29107fb8..521dcfe2 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-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"),
@@ -56,6 +56,10 @@
56#ifndef _hw_fuse_gp10b_h_ 56#ifndef _hw_fuse_gp10b_h_
57#define _hw_fuse_gp10b_h_ 57#define _hw_fuse_gp10b_h_
58 58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
59static inline u32 fuse_status_opt_tpc_gpc_r(u32 i) 63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
60{ 64{
61 return 0x00021c38U + i*4U; 65 return 0x00021c38U + i*4U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fuse_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fuse_gv100.h
index f7eacd29..48194ea9 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fuse_gv100.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fuse_gv100.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -56,6 +56,10 @@
56#ifndef _hw_fuse_gv100_h_ 56#ifndef _hw_fuse_gv100_h_
57#define _hw_fuse_gv100_h_ 57#define _hw_fuse_gv100_h_
58 58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
59static inline u32 fuse_status_opt_tpc_gpc_r(u32 i) 63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
60{ 64{
61 return 0x00021c38U + i*4U; 65 return 0x00021c38U + i*4U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h
index f8d9b196..9395da3f 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fuse_gv11b.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"),
@@ -56,6 +56,10 @@
56#ifndef _hw_fuse_gv11b_h_ 56#ifndef _hw_fuse_gv11b_h_
57#define _hw_fuse_gv11b_h_ 57#define _hw_fuse_gv11b_h_
58 58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
59static inline u32 fuse_status_opt_tpc_gpc_r(u32 i) 63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
60{ 64{
61 return 0x00021c38U + i*4U; 65 return 0x00021c38U + i*4U;