diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2014-06-19 22:22:17 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:16 -0400 |
commit | 6f492c3834fe18fe3d00d0024b8178250bed7276 (patch) | |
tree | 78a8d84899b468a3ee0b85dd4558b0b6037a77ad | |
parent | 6838d9f05e0d712925f759b90c830b2d513ce7a6 (diff) |
gpu: nvgpu: make pm config as platform data
Make gpu power management feature configurations
as platform data. Keep existing sttaus for gk20a
and disable all power features for gm20b.
Bug 1523728
Change-Id: Ife7786863f18e21b882ac77085c7abc7c84d4cfc
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/426369
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Supriya Sharatkumar <ssharatkumar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 20 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 18 |
3 files changed, 45 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index c13c9614..c1150bac 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1455,14 +1455,18 @@ static int gk20a_probe(struct platform_device *dev) | |||
1455 | if (tegra_platform_is_silicon()) | 1455 | if (tegra_platform_is_silicon()) |
1456 | gk20a->timeouts_enabled = true; | 1456 | gk20a->timeouts_enabled = true; |
1457 | 1457 | ||
1458 | /* Set up initial clock gating settings */ | 1458 | /* Set up initial power settings. For non-slicon platforms, disable * |
1459 | if (tegra_platform_is_silicon()) { | 1459 | * power features and for silicon platforms, read from platform data */ |
1460 | gk20a->slcg_enabled = true; | 1460 | gk20a->slcg_enabled = |
1461 | gk20a->blcg_enabled = true; | 1461 | tegra_platform_is_silicon() ? platform->enable_slcg : false; |
1462 | gk20a->elcg_enabled = true; | 1462 | gk20a->blcg_enabled = |
1463 | gk20a->elpg_enabled = true; | 1463 | tegra_platform_is_silicon() ? platform->enable_blcg : false; |
1464 | gk20a->aelpg_enabled = true; | 1464 | gk20a->elcg_enabled = |
1465 | } | 1465 | tegra_platform_is_silicon() ? platform->enable_elcg : false; |
1466 | gk20a->elpg_enabled = | ||
1467 | tegra_platform_is_silicon() ? platform->enable_elpg : false; | ||
1468 | gk20a->aelpg_enabled = | ||
1469 | tegra_platform_is_silicon() ? platform->enable_aelpg : false; | ||
1466 | 1470 | ||
1467 | gk20a_create_sysfs(dev); | 1471 | gk20a_create_sysfs(dev); |
1468 | 1472 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 4e454140..c343ad27 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -61,6 +61,21 @@ struct gk20a_platform { | |||
61 | /* Delay before clock gated */ | 61 | /* Delay before clock gated */ |
62 | int clockgate_delay; | 62 | int clockgate_delay; |
63 | 63 | ||
64 | /* Second Level Clock Gating: true = enable false = disable */ | ||
65 | bool enable_slcg; | ||
66 | |||
67 | /* Block Level Clock Gating: true = enable flase = disable */ | ||
68 | bool enable_blcg; | ||
69 | |||
70 | /* Engine Level Clock Gating: true = enable flase = disable */ | ||
71 | bool enable_elcg; | ||
72 | |||
73 | /* Engine Level Power Gating: true = enable flase = disable */ | ||
74 | bool enable_elpg; | ||
75 | |||
76 | /* Adaptative ELPG: true = enable flase = disable */ | ||
77 | bool enable_aelpg; | ||
78 | |||
64 | /* Initialize the platform interface of the gk20a driver. | 79 | /* Initialize the platform interface of the gk20a driver. |
65 | * | 80 | * |
66 | * The platform implementation of this function must | 81 | * The platform implementation of this function must |
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 9f2a7971..28f82816 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | |||
@@ -534,6 +534,12 @@ struct gk20a_platform t132_gk20a_tegra_platform = { | |||
534 | .railgate_delay = 500, | 534 | .railgate_delay = 500, |
535 | .clockgate_delay = 50, | 535 | .clockgate_delay = 50, |
536 | .can_railgate = true, | 536 | .can_railgate = true, |
537 | .enable_slcg = true, | ||
538 | .enable_blcg = true, | ||
539 | .enable_elcg = true, | ||
540 | .enable_elpg = true, | ||
541 | .enable_aelpg = true, | ||
542 | |||
537 | 543 | ||
538 | .probe = gk20a_tegra_probe, | 544 | .probe = gk20a_tegra_probe, |
539 | .late_probe = gk20a_tegra_late_probe, | 545 | .late_probe = gk20a_tegra_late_probe, |
@@ -562,6 +568,11 @@ struct gk20a_platform gk20a_tegra_platform = { | |||
562 | .railgate_delay = 500, | 568 | .railgate_delay = 500, |
563 | .clockgate_delay = 50, | 569 | .clockgate_delay = 50, |
564 | .can_railgate = true, | 570 | .can_railgate = true, |
571 | .enable_slcg = true, | ||
572 | .enable_blcg = true, | ||
573 | .enable_elcg = true, | ||
574 | .enable_elpg = true, | ||
575 | .enable_aelpg = true, | ||
565 | 576 | ||
566 | .probe = gk20a_tegra_probe, | 577 | .probe = gk20a_tegra_probe, |
567 | .late_probe = gk20a_tegra_late_probe, | 578 | .late_probe = gk20a_tegra_late_probe, |
@@ -589,6 +600,13 @@ struct gk20a_platform gm20b_tegra_platform = { | |||
589 | /* power management configuration */ | 600 | /* power management configuration */ |
590 | .railgate_delay = 500, | 601 | .railgate_delay = 500, |
591 | .clockgate_delay = 50, | 602 | .clockgate_delay = 50, |
603 | /* Disable all power features for gm20b */ | ||
604 | .can_railgate = false, | ||
605 | .enable_slcg = false, | ||
606 | .enable_blcg = false, | ||
607 | .enable_elcg = false, | ||
608 | .enable_elpg = false, | ||
609 | .enable_aelpg = false, | ||
592 | 610 | ||
593 | .probe = gk20a_tegra_probe, | 611 | .probe = gk20a_tegra_probe, |
594 | .late_probe = gk20a_tegra_late_probe, | 612 | .late_probe = gk20a_tegra_late_probe, |