diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.c | 23 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 1 |
5 files changed, 34 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.c b/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.c index 57b1443b..5ab890ad 100644 --- a/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.c +++ b/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2020, 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"), |
@@ -162,6 +162,11 @@ static const struct gating_desc gv11b_slcg_hshub[] = { | |||
162 | {.addr = 0x001fbbf4U, .prod = 0x00000000U, .disable = 0xfffffffeU}, | 162 | {.addr = 0x001fbbf4U, .prod = 0x00000000U, .disable = 0xfffffffeU}, |
163 | }; | 163 | }; |
164 | 164 | ||
165 | /* slcg Acb */ | ||
166 | static const struct gating_desc gv11b_slcg_acb[] = { | ||
167 | {.addr = 0x0010e48cU, .prod = 0x00000038U, .disable = 0x0000003eU}, | ||
168 | }; | ||
169 | |||
165 | /* blcg bus */ | 170 | /* blcg bus */ |
166 | static const struct gating_desc gv11b_blcg_bus[] = { | 171 | static const struct gating_desc gv11b_blcg_bus[] = { |
167 | {.addr = 0x00001c00U, .prod = 0x00000042U, .disable = 0x00000000U}, | 172 | {.addr = 0x00001c00U, .prod = 0x00000042U, .disable = 0x00000000U}, |
@@ -513,6 +518,22 @@ void gv11b_slcg_hshub_load_gating_prod(struct gk20a *g, | |||
513 | } | 518 | } |
514 | } | 519 | } |
515 | 520 | ||
521 | void gv11b_slcg_acb_load_gating_prod(struct gk20a *g, | ||
522 | bool prod) | ||
523 | { | ||
524 | u32 i; | ||
525 | u32 size = (u32)(sizeof(gv11b_slcg_acb) / GATING_DESC_SIZE); | ||
526 | |||
527 | if (nvgpu_is_enabled(g, NVGPU_GPU_CAN_SLCG)) { | ||
528 | for (i = 0; i < size; i++) { | ||
529 | u32 reg = gv11b_slcg_acb[i].addr; | ||
530 | u32 val = prod ? gv11b_slcg_acb[i].prod : | ||
531 | gv11b_slcg_acb[i].disable; | ||
532 | gk20a_writel(g, reg, val); | ||
533 | } | ||
534 | } | ||
535 | } | ||
536 | |||
516 | void gv11b_blcg_bus_load_gating_prod(struct gk20a *g, | 537 | void gv11b_blcg_bus_load_gating_prod(struct gk20a *g, |
517 | bool prod) | 538 | bool prod) |
518 | { | 539 | { |
diff --git a/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.h b/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.h index e1229dcf..ee4b6595 100644 --- a/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.h +++ b/drivers/gpu/nvgpu/common/clock_gating/gv11b_gating_reglist.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2019, NVIDIA Corporation. All rights reserved. | 2 | * Copyright (c) 2016-2020, 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"), |
@@ -72,6 +72,9 @@ void gv11b_slcg_xbar_load_gating_prod(struct gk20a *g, | |||
72 | void gv11b_slcg_hshub_load_gating_prod(struct gk20a *g, | 72 | void gv11b_slcg_hshub_load_gating_prod(struct gk20a *g, |
73 | bool prod); | 73 | bool prod); |
74 | 74 | ||
75 | void gv11b_slcg_acb_load_gating_prod(struct gk20a *g, | ||
76 | bool prod); | ||
77 | |||
75 | void gv11b_blcg_bus_load_gating_prod(struct gk20a *g, | 78 | void gv11b_blcg_bus_load_gating_prod(struct gk20a *g, |
76 | bool prod); | 79 | bool prod); |
77 | 80 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 347658b2..c3068b76 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-2019, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2020, 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"), |
@@ -145,6 +145,10 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
145 | g->gpu_reset_done = true; | 145 | g->gpu_reset_done = true; |
146 | } | 146 | } |
147 | 147 | ||
148 | if (g->ops.clock_gating.slcg_acb_load_gating_prod != NULL) { | ||
149 | g->ops.clock_gating.slcg_acb_load_gating_prod(g, true); | ||
150 | } | ||
151 | |||
148 | /* | 152 | /* |
149 | * Do this early so any early VMs that get made are capable of mapping | 153 | * Do this early so any early VMs that get made are capable of mapping |
150 | * buffers. | 154 | * buffers. |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index c0f7e4e3..994e1024 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -533,6 +533,8 @@ static const struct gpu_ops gv11b_ops = { | |||
533 | gv11b_slcg_xbar_load_gating_prod, | 533 | gv11b_slcg_xbar_load_gating_prod, |
534 | .slcg_hshub_load_gating_prod = | 534 | .slcg_hshub_load_gating_prod = |
535 | gv11b_slcg_hshub_load_gating_prod, | 535 | gv11b_slcg_hshub_load_gating_prod, |
536 | .slcg_acb_load_gating_prod = | ||
537 | gv11b_slcg_acb_load_gating_prod, | ||
536 | .blcg_bus_load_gating_prod = | 538 | .blcg_bus_load_gating_prod = |
537 | gv11b_blcg_bus_load_gating_prod, | 539 | gv11b_blcg_bus_load_gating_prod, |
538 | .blcg_ce_load_gating_prod = | 540 | .blcg_ce_load_gating_prod = |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 9ec4ab6b..aa95969d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h | |||
@@ -623,6 +623,7 @@ struct gpu_ops { | |||
623 | void (*slcg_therm_load_gating_prod)(struct gk20a *g, bool prod); | 623 | void (*slcg_therm_load_gating_prod)(struct gk20a *g, bool prod); |
624 | void (*slcg_xbar_load_gating_prod)(struct gk20a *g, bool prod); | 624 | void (*slcg_xbar_load_gating_prod)(struct gk20a *g, bool prod); |
625 | void (*slcg_hshub_load_gating_prod)(struct gk20a *g, bool prod); | 625 | void (*slcg_hshub_load_gating_prod)(struct gk20a *g, bool prod); |
626 | void (*slcg_acb_load_gating_prod)(struct gk20a *g, bool prod); | ||
626 | void (*blcg_bus_load_gating_prod)(struct gk20a *g, bool prod); | 627 | void (*blcg_bus_load_gating_prod)(struct gk20a *g, bool prod); |
627 | void (*blcg_ce_load_gating_prod)(struct gk20a *g, bool prod); | 628 | void (*blcg_ce_load_gating_prod)(struct gk20a *g, bool prod); |
628 | void (*blcg_ctxsw_firmware_load_gating_prod)(struct gk20a *g, bool prod); | 629 | void (*blcg_ctxsw_firmware_load_gating_prod)(struct gk20a *g, bool prod); |